spacr.tiff_io¶
Canonical TIFF writing for spaCR’s scientific image arrays.
Functions¶
|
Write a TIFF with an explicit, stable sample interpretation. |
Module Contents¶
- spacr.tiff_io.write_tiff(path: TiffPath, array: numpy.ndarray, **kwargs: Any) None[source]¶
Write a TIFF with an explicit, stable sample interpretation.
spaCR arrays are scientific intensity planes or label masks, including arrays whose leading dimension happens to contain three or four planes. Tifffile historically guessed RGB for those shapes and is changing that guess. Declaring
minisblackprevents channel/z/time stacks from being mislabeled as color, whilecontigmakes the planar choice explicit.Callers writing a true display RGB image may override either value through
photometric=andplanarconfig=. All other tifffile options (axes metadata, compression, BigTIFF, ImageJ compatibility, and so on) pass through unchanged.- Parameters:
path – destination TIFF path.
array – image, stack, or label array.
kwargs – additional
tifffile.imwrite()options.
- Returns:
None.