stitching
For parallel stitching with multiple threads, use the following class:
Class for parallel stitching of image tiles and generating a mosaic. For applicable steps multi-threading is used for faster processing.
Parameters:
- input_dirstr
Directory containing the input image tiles.
- slidenamestr
Name of the slide.
- outdirstr
Output directory to save the stitched mosaic.
- stitching_channelstr
Name of the channel to be used for stitching.
- patternstr
File pattern to match the image tiles.
- overlapfloat, optional
Overlap between adjacent image tiles (default is 0.1).
- max_shiftfloat, optional
Maximum allowed shift during alignment (default is 30).
- filter_sigmaint, optional
Sigma value for Gaussian filter applied during alignment (default is 0).
- do_intensity_rescalebool or “full_image”, optional
Flag to indicate whether to rescale image intensities (default is True). Alternatively, set to “full_image” to rescale the entire image.
- rescale_rangetuple or dictionary, optional
If all channels should be rescaled to the same range pass a tuple with the percentiles for rescaleing (default is (1, 99)). Alternatively a dictionary can be passed with the channel names as keys and the percentiles as values if each channel should be rescaled to a different range.
- channel_orderlist, optional
Order of channels in the generated output mosaic. If none (default value) the order of the channels is left unchanged.
- reader_typeclass, optional
Type of reader to use for reading image tiles (default is FilePatternReaderRescale).
- orientationdict, optional
Dictionary specifiying which dimensions of the slide to flip (default is {‘flip_x’: False, ‘flip_y’: True}).
- plot_QCbool, optional
Flag to indicate whether to plot quality control (QC) figures (default is True).
- overwritebool, optional
Flag to indicate whether to overwrite the output directory if it already exists (default is False).
- cachestr, optional
Directory to store temporary files during stitching (default is None). If set to none this directory will be created in the outdir.
- threadsint, optional
Number of threads to use for parallel processing (default is 20).