multiimage

MultiImage

class skimage.io.MultiImage(filename, conserve_memory=True, dtype=None, **imread_kwargs) [source]

Bases: skimage.io.collection.ImageCollection

A class containing a single multi-frame image.

Parameters:

filename : str

The complete path to the image file.

conserve_memory : bool, optional

Whether to conserve memory by only caching a single frame. Default is True.

Notes

If conserve_memory=True the memory footprint can be reduced, however the performance can be affected because frames have to be read from file more often.

The last accessed frame is cached, all other frames will have to be read from file.

The current implementation makes use of tifffile for Tiff files and PIL otherwise.

Examples

>>> from skimage import data_dir
>>> img = MultiImage(data_dir + '/multipage.tif') 
>>> len(img) 
2
>>> for frame in img: 
...     print(frame.shape) 
(15, 10)
(15, 10)
__init__(filename, conserve_memory=True, dtype=None, **imread_kwargs) [source]

Load a multi-img.

filename
doc_scikit_image
2017-01-12 17:22:32
Comments
Leave a Comment

Please login to continue.