|
| 1 | +# PhysiCell Data Loader Tutorial: pcdl and Neuroglancer. |
| 2 | + |
| 3 | +[Neuroglancer](https://research.google/blog/an-interactive-automated-3d-reconstruction-of-a-fly-brain/) is a [WebGL](https://en.wikipedia.org/wiki/WebGL)-based viewer for volumetric data. |
| 4 | +It is capable of displaying arbitrary (non axis-aligned) cross-sectional views of volumetric data, as well as 3-D meshes and line-segment based models (skeletons). |
| 5 | + |
| 6 | +[Ome.tiff](https://www.openmicroscopy.org/ome-files/) is the open microscopy image standard format used by wet lab scientists to store (fluorescent) microscopy data. |
| 7 | + |
| 8 | +In 2022, in the middle of the pandemic, a small group of programmers undertook at the Image Analysis Working Group of the Cancer Systems Biology Consortium & Physical Sciences-Oncology Network [hackathon](https://github.com/IAWG-CSBC-PSON/hack2022-10-neuroglancer) the endeavor to write a python3 script that directly can render ome.tiff files into Neurogalncer. |
| 9 | +This script was adapted for the pcdl project. |
| 10 | + |
| 11 | + |
| 12 | +### ✨ command line |
| 13 | + |
| 14 | +With pcdl it is very easy to generate time step and time series ome.tiff files from regular PhysiCell output straight from the command line and render them into Neuroglancer. |
| 15 | + |
| 16 | +#### command line time step |
| 17 | +Generate time step 6 ome.tiff |
| 18 | + |
| 19 | +```bash |
| 20 | +pcdl_make_ome_tiff pcdl_make_ome_tiff output_2d/output00000006.xml |
| 21 | +``` |
| 22 | + |
| 23 | +Render time step 6 ome.tiff |
| 24 | + |
| 25 | +```bash |
| 26 | +pcdl_render_neuroglancer output_2d/output00000006_oxygen_water_default_blood_cells_ID.ome.tiff |
| 27 | +``` |
| 28 | + |
| 29 | +#### command line time series |
| 30 | + |
| 31 | +Generate time series ome.tiff |
| 32 | + |
| 33 | +```bash |
| 34 | +pcdl_make_ome_tiff output/ |
| 35 | +``` |
| 36 | + |
| 37 | +Render timer series time step 0. |
| 38 | + |
| 39 | +```bash |
| 40 | +pcdl_render_neuroglancer output/timeseries_oxygen_water_default_blood_cells_ID.ome.tiff |
| 41 | +``` |
| 42 | + |
| 43 | +Render time series time step 12. |
| 44 | + |
| 45 | +```bash |
| 46 | +pcdl_render_neuroglancer output/timeseries_oxygen_water_default_blood_cells_ID.ome.tiff 12 |
| 47 | +``` |
| 48 | + |
| 49 | +#### command line man pages |
| 50 | + |
| 51 | +```bash |
| 52 | +pcdl_make_ome_tiff -h |
| 53 | +``` |
| 54 | +```bash |
| 55 | +pcdl_render_neuroglancer -h |
| 56 | +``` |
| 57 | + |
| 58 | +### ✨ python |
| 59 | +With pcdl it is very easy to generate within python3 time steps and time series ome.tiff files from regular PhysiCell output and render them into Neuroglancer. |
| 60 | + |
| 61 | +#### python time step |
| 62 | + |
| 63 | +Generate and directly render time step 6. |
| 64 | +```python |
| 65 | +import pcdl |
| 66 | + |
| 67 | +mcds = pcdl.TimeStep('output_2d/output00000006.xml') |
| 68 | +mcds.render_neuroglancer(mcds.make_ome_tiff()) |
| 69 | +``` |
| 70 | + |
| 71 | +#### python time series |
| 72 | + |
| 73 | +Generate time series, then render. |
| 74 | +```python |
| 75 | +import pcdl |
| 76 | + |
| 77 | +mcdsts = pcdl.TimeSeries('output_2d/') |
| 78 | +s_pathfile = mcdsts.make_ome_tiff() |
| 79 | +mcdsts.render_neuroglancer(s_pathfile) # time step 0 |
| 80 | +``` |
| 81 | +```python |
| 82 | +mcdsts.render_neuroglancer(s_pathfile, 12) # time step 12 |
| 83 | +``` |
| 84 | + |
| 85 | +#### python docstrings |
| 86 | + |
| 87 | +```python |
| 88 | +import pcdl |
| 89 | +help(pcdl.render_neuroglancer) |
| 90 | +``` |
| 91 | + |
| 92 | +### ✨ Further readings |
| 93 | + |
| 94 | +Please work through the official documentation to learn how to run the Neuroglancer software. |
| 95 | ++ https://github.com/google/neuroglancer |
| 96 | ++ https://neuroglancer-docs.web.app/index.html |
| 97 | ++ https://research.google/blog/an-interactive-automated-3d-reconstruction-of-a-fly-brain/ |
| 98 | + |
| 99 | +That's it. The rest is analysis within neuroglancer! |
0 commit comments