PyNutil.Section#
- class PyNutil.Section(section_number, filename='', image=None, path=None)[source]#
A single section, identified by number and backed by an image.
Either image or path must be provided. When only path is given the image is loaded lazily the first time it is needed by the pipeline.
- Parameters:
section_number (
int) – Numeric identifier that must match a section in the alignment JSON.filename (
str) – Display name used insection_filenames. Defaults to path when not set explicitly.image (
Optional[ndarray]) – Pre-loaded image array (2-D or 3-Dnumpyarray). Provide this when you have already loaded or generated the image data yourself.path (
Optional[str]) – Path to the image file on disk. The image is loaded on demand by the configured segmentation adapter when the section is processed.