PyNutil.read_segmentation_dir#
- PyNutil.read_segmentation_dir(folder, pixel_id=None, segmentation_format='binary')[source]#
Discover segmentation image files in folder and return an
ImageSeries.Images are not loaded immediately — each section loads its image on demand when the pipeline processes it.
- Parameters:
folder (str or os.PathLike) – Path to a folder containing segmentation image files.
pixel_id (str, sequence of int, numpy.ndarray, or None) – RGB value or label identifying the segmented class of interest. Defaults to
[0, 0, 0].segmentation_format (str) – Name of the segmentation adapter to use, for example
"binary"or"cellpose".
- Returns:
One
Sectionper discovered file, withsection_numberinferred from the filename andpathset for lazy loading.- Return type: