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.
Files are sorted lexicographically by name, so they should be named with
zero-padded indices (e.g., frame_0001.tif, frame_0002.tif, …).
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::NoMatchingFilesif no files match the pattern.IoError::DimensionMismatchif frames have inconsistent dimensions.