imagej_description¶
- tifffile.imagej_description(shape, /, axes=None, rgb=None, colormaped=False, **metadata)¶
Return ImageJ image description from data shape and metadata.
- Parameters:
shape (Sequence[int]) – Shape of image array.
axes (str | None) – Character codes for dimensions in shape. ImageJ can handle up to 6 dimensions in order TZCYXS. Axes and shape are used to determine the images, channels, slices, and frames entries of the image description.
rgb (bool | None) – Image is RGB type.
colormaped (bool) – Image is indexed color.
**metadata (Any) –
Additional items to be included in image description:
- hyperstack (bool):
Image is a hyperstack. The default is True unless colormapped is true.
- mode (str):
Display mode: ‘grayscale’, ‘composite’, or ‘color’. The default is ‘grayscale’ unless rgb or colormaped are true. Ignored if hyperstack is false.
- loop (bool):
Loop frames back and forth. The default is False.
- finterval (float):
Frame interval in seconds.
- fps (float):
Frames per seconds. The inverse of finterval.
- spacing (float):
Voxel spacing in unit units.
- unit (str):
Unit for spacing and X/YResolution tags. Usually ‘um’ (micrometer) or ‘pixel’.
- xorigin, yorigin, zorigin (float):
X, Y, and Z origins in pixel units.
- version (str):
ImageJ version string. The default is ‘1.11a’.
- images, channels, slices, frames (int):
Ignored.
- Return type:
str
Examples
>>> imagej_description((51, 5, 2, 196, 171)) ImageJ=1.11a images=510 channels=2 slices=5 frames=51 hyperstack=true mode=grayscale loop=false