scitiff.io.load_scitiff#
- scitiff.io.load_scitiff(file_path, *, squeeze=True, resolve_channels=False)[source]#
Load an image in SCITIFF format to a scipp data structure.
- Parameters:
file_path (
str
|Path
) – The path to the SCITIFF format image file.squeeze (
bool
, default:True
) – If True, the dimensions with size 1 are squeezed out. You can also do it manually usingsc.DataArray.squeeze
method.resolve_channels (
bool
, default:False
) –If True, the channel dimension is resolved as intensities, stdevs and mask.
Warning
This function is not yet officially supported by
Scitiff
schema. It may change in the future.
- Returns:
DataGroup
– The loaded image data inscipp.DataGroup
. The data group should have the same structure as thescitiff.SciTiffMetadataContainer
except the image data has values loaded from the tiff file not just the metadata.Note
If the metadata is not found in the tiff file or it is broken, the image is loaded with arbitrary dimensions and the metadata is discarded. The returned data group will have the same structure.
Warning
IncompatibleDtypeWarning
If the image data has incompatible dtype.
UnmatchedMetadataWarning
If the image data has incompatible size with the metadata. The metadata is discarded and the image is loaded with arbitrary dimensions.