Pipeline process class
This class is used to run the entire preprocessing pipeline - from CZI files to a pyramid of tiles that can be viewed in neuroglancer.
Args are animal, self.channel, and downsample. With animal being the only required argument. All imports are listed by the order in which they are used in the
- class library.image_manipulation.pipeline_process.Pipeline(animal, rescan_number=0, channel='C1', downsample=False, task='status', debug=False)
Bases:
library.image_manipulation.meta_manager.MetaUtilities
,library.image_manipulation.tiff_extractor_manager.TiffExtractor
,library.image_manipulation.prep_manager.PrepCreater
,library.image_manipulation.parallel_manager.ParallelManager
,library.image_manipulation.normalizer_manager.Normalizer
,library.image_manipulation.mask_manager.MaskManager
,library.image_manipulation.image_cleaner.ImageCleaner
,library.image_manipulation.histogram_maker.HistogramMaker
,library.image_manipulation.elastix_manager.ElastixManager
,library.image_manipulation.precomputed_manager.NgPrecomputedMaker
,library.image_manipulation.file_logger.FileLogger
,library.cell_labeling.cell_manager.CellMaker
,library.image_manipulation.omezarr_manager.OmeZarrManager
This is the main class that handles the preprocessing pipeline responsible for converting Zeiss microscopy images (.czi) into neuroglancer viewable formats. The Zeiss module can be swapped out to make the pipeline compatible with other microscopy setups
- TASK_ALIGN = 'Creating alignment process'
- TASK_CELL_LABELS = 'Creating centroids for cells'
- TASK_CLEAN = 'Applying masks'
- TASK_EXTRACT = 'Extracting TIFFs and meta-data'
- TASK_EXTRA_CHANNEL = 'Creating separate channel'
- TASK_HISTOGRAM = 'Making histogram'
- TASK_MASK = 'Creating masks'
- TASK_NEUROGLANCER = 'Creating Neuroglancer data'
- TASK_OMEZARR = 'Creating multiscaled ome zarr'
- TASK_REALIGN = 'Creating alignment improvements'
- affine_align()
Perform the section to section alignment (registration) This method needs work. It is not currently used.
- align()
Perform the section to section alignment (registration) We need to set the maskpath to get information from ImageManager
- cell_labels()
USED FOR AUTOMATED CELL LABELING - FINAL OUTPUT FOR CELLS DETECTED
- static check_programs()
Make sure imagemagick is installed. Make sure there is a ./src/settings.py file
- check_status()
- clean()
- extra_channel()
This step is in case self.channel X differs from self.channel 1 and came from a different set of CZI files. This step will do everything for the self.channel, so you don’t need to run self.channel X for step 2, or 4. You do need to run step 0 and step 1. TODO fix for channel variable name
- extract()
- get_section_count()
- histogram()
- mask()
- neuroglancer()
This is a convenience method to run the entire neuroglancer process. We also define the input, output and progress directories.
- omezarr()
- realign()
Perform the improvement of the section to section alignment We need two sets of neuroglancer data, one from the cropped data which is unaligned, and one from the aligned data. So first check if they both exist, if not, create them.
- report_status()
- run_neuroglancer()
The input and output directories are set in either the self.neuroglancer method or the self.realign method. This method is used to run the neuroglancer process.