SciFiReaders.readers.generic.image.ImageReader¶
- class SciFiReaders.readers.generic.image.ImageReader(*args, **kwargs)[source]¶
Bases:
sidpy.sid.reader.Reader
Translates data from an image file to an HDF5 file
- Parameters
file_path (str) – Path to the file that needs to be read
Notes
This method will check to make sure that the provided file_path is indeed a string and a valid file path.
Consider calling
can_read()
within__init__()
for validating the provided file
- Raises
Methods
Tests whether or not the provided file has a .ndata extension
Translates the image in the provided file into a USID HDF5 file
- read(bin_factor=None, interp_func=3, normalize=False, **image_args)[source]¶
Translates the image in the provided file into a USID HDF5 file
- Parameters
bin_factor (uint or array-like of uint, optional) – Down-sampling factor for each dimension. Default is None. If specifying different binning for each dimension, please specify as (height binning, width binning)
interp_func (int, optional. Default =
PIL.Image.BICUBIC
) – How the image will be interpolated to provide the down-sampled or binned image. For more information see instructions for the resample argument forPIL.Image.resize()
normalize (boolean, optional. Default = False) – Should the raw image be normalized between the values of 0 and 1
image_args (dict) – Arguments to be passed to read_image. Arguments depend on the type of image.