Package qubx :: Module tifffile :: Class TiffPage
[hide private]
[frames] | no frames]

Class TiffPage

source code

object --+
         |
        TiffPage

A TIFF image file directory (IFD).

Attributes

index : int
Index of page in file.
dtype : str {TIFF_SAMPLE_DTYPES}
Data type of image, colormapped if applicable.
shape : tuple
Dimensions of the image array in TIFF page, colormapped and with one alpha channel if applicable.
axes : str
Axes label codes: 'X' width, 'Y' height, 'S' sample, 'P' plane, 'I' image series, 'Z' depth, 'C' color|em-wavelength|channel, 'E' ex-wavelength|lambda, 'T' time, 'R' region|tile, 'A' angle, 'F' phase, 'H' lifetime, 'L' exposure, 'V' event, 'Q' unknown, '_' missing
tags : TiffTags
Dictionary of tags in page. Tag values are also directly accessible as attributes.
color_map : numpy array
Color look up table, if exists.
mm_uic_tags: Record(dict)
Consolidated MetaMorph mm_uic# tags, if exists.
cz_lsm_scan_info: Record(dict)
LSM scan info attributes, if exists.
imagej_tags: Record(dict)
Consolidated ImageJ description and metadata tags, if exists.

All attributes are read-only.

Instance Methods [hide private]
 
__init__(self, parent)
Initialize instance from file.
source code
 
_fromfile(self)
Read TIFF IFD structure and its tags from file.
source code
 
_process_tags(self)
Validate standard tags and initialize attributes.
source code
 
asarray(self, squeeze=True, colormapped=True, rgbonly=True, memmap=False)
Read image data from file and return as numpy array.
source code
 
__str__(self)
Return string containing information about page.
source code
 
__getattr__(self, name)
Return tag value.
source code
 
is_rgb(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_palette(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_tiled(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_reduced(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_mdgel(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_mediacy(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_stk(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_lsm(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_fluoview(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_nih(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_ome(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_shaped(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_imagej(self)
Lazy object attribute whose value is computed on first access.
source code
 
is_micromanager(self)
Lazy object attribute whose value is computed on first access.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent)
(Constructor)

source code 
Initialize instance from file.
Overrides: object.__init__

_fromfile(self)

source code 

Read TIFF IFD structure and its tags from file.

File cursor must be at storage position of IFD offset and is left at offset to next IFD.

Raises StopIteration if offset (first bytes read) is 0.

_process_tags(self)

source code 

Validate standard tags and initialize attributes.

Raise ValueError if tag values are not supported.

asarray(self, squeeze=True, colormapped=True, rgbonly=True, memmap=False)

source code 

Read image data from file and return as numpy array.

Raise ValueError if format is unsupported. If any argument is False, the shape of the returned array might be different from the page shape.

Parameters

squeeze : bool
If True, all length-1 dimensions (except X and Y) are squeezed out from result.
colormapped : bool
If True, color mapping is applied for palette-indexed images.
rgbonly : bool
If True, return RGB(A) image without additional extra samples.
memmap : bool
If True, use numpy.memmap to read array if possible.

__str__(self)
(Informal representation operator)

source code 
Return string containing information about page.
Overrides: object.__str__

is_rgb(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_palette(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_tiled(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_reduced(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_mdgel(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_mediacy(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_stk(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_lsm(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_fluoview(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_nih(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_ome(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_shaped(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_imagej(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr

is_micromanager(self)

source code 
Lazy object attribute whose value is computed on first access.
Decorators:
  • @lazyattr