.settings | ||
src/stack3d | ||
test | ||
.gitignore | ||
.project | ||
.pydevproject | ||
LICENSE | ||
README.md |
This is a collection of tools for working with 3D image stacks of microvessel networks
All Dependencies (individual scripts have only a subset of these dependencies)
- bftools
- pyxb
- VTK with Python Interface
- [Scikit Image]
- VMTK
- Microvessel Chaste
Working with ZEISS (IMS, LSM, CZI) Image Data
It is useful to first extract the image metadata. This requires a copy of bftools.
Download it and set$BFTOOLS_DIR
to the directory obtained after unzipping. Then do:
python format_conversion/extract_zeiss_metadata.py -i $IMAGE_PATH -o $OUTPUT_FILE --verbose 1
To proceed we need to convert the format to an OME TIFF and then a generic TIFF. It is easiest to work with one series and one channel at a time. Since we work with large images it is best to split the images into tiles and work in parallel.
python format_conversion/zeiss_to_tiff.py -i $IMAGE_PATH -o $OUTPUT_FOLDER
Working with 3D TIFFs
After conversion we can work with the 3D TIFFs using packages like sci-kit. It is important to remember that the generic TIFFs we have produced have all of their physical dimensions stripped. We do not trust any tools to preserve physical dimensions. The original OME metadata XML is the only reference we use.
For easy visualization it is useful to downsample and then re-assemble the tiles.
python image/downsample_tiffs.py -i $IMAGE_PATH -x 3 -y 3 -z 1
Visualizing
We can use FIJI or VTK to visualize. VTK is nicer, but struggles with full resolution datasets. We can downsample as described previoulsy and then create VTK files for use in paraview.
python format_conversion/tiff_to_vtk.py -i $IMAGE_PATH -m $METADATA_FILE -tx 1024 -ty 1024 -dx 3 -dy 3 -dz 1
Even with this it is difficult to make nice volume renders as resource use is high. To launch a simple VTK window do: