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=1, iterations=2, downsample=False, tg=False, task='status', debug=False)

Bases: MetaUtilities, TiffExtractor, PrepCreater, ParallelManager, Normalizer, MaskManager, ImageCleaner, HistogramMaker, ElastixManager, NgPrecomputedMaker, FileLogger

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 elastix transform'
TASK_CLEAN = 'Applying masks'
TASK_CREATE_METRICS = 'Creating elastix  metrics'
TASK_EXTRACT = 'Extracting TIFFs and meta-data'
TASK_EXTRA_CHANNEL = 'Creating separate channel'
TASK_HISTOGRAM = 'Making histogram'
TASK_MASK = 'Creating masks'
TASK_NEUROGLANCER = 'Neuroglancer'
align()

The number of iterations is set on the command line argument

static check_programs()

Make sure the necessary tools are installed on the machine and configures the memory of involving tools to work with big images. Some tools we use are based on java so we adjust the java heap size limit to 10 GB. This is big enough for our purpose but should be increased accordingly if your images are bigger If the check failed, check the workernoshell.err.log in your project directory for more information

check_status()
clean()
create_metrics()
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.

extract()
histogram()
mask()
neuroglancer()