pub fn load_tiff_folder(
dir: &Path,
pattern: Option<&str>,
) -> Result<Array3<f64>, IoError>Expand description
Load a directory of TIFFs matching a glob pattern as a 3D stack.
Applies the default TiffFolderOptions: chunked VENUS folders
(<prefix>_<chunk>_<frame>.tif) are detected automatically, ordered by
numeric frame index, and chunks covering identical frame ranges are
summed element-wise. Only folders not following the chunk
convention load in lexicographic filename order — name legacy files
with zero-padded indices (e.g., frame_0001.tif, frame_0002.tif,
…). No provenance is returned; use
load_tiff_folder_with_options to get a TiffLoadInfo and to
control chunk summing.
Only files with .tif or .tiff extensions (case-insensitive) are considered.
When pattern is None, all such files are loaded. When Some, the pattern
is additionally matched against each filename (not the full path) and supports
* (matches any sequence of characters) and ? (matches a single character).
Examples: "*.tif", "frame_*.tiff", "scan_*" (the extension guard still
applies, so non-TIFF files are never decoded).
§Arguments
dir— Path to the directory containing TIFF files.pattern— Optional glob pattern to filter filenames.
§Returns
3D array with shape (n_files, height, width) and f64 values.
§Errors
IoError::FileNotFoundifdirdoes not exist.IoError::NotADirectoryifdirexists but is not a directory.IoError::NoMatchingFilesif no files match the pattern.IoError::DimensionMismatchif frames have inconsistent dimensions.IoError::ChunkMismatchif a chunked folder is internally inconsistent and chunk summing is enabled (the default); withsum_chunks = falsethe inconsistency is reported viaTiffLoadInfo::chunk_inconsistentinstead of raised.