minerva.data.readers.tiff_reader
Classes
This class loads a TIFF file from a directory. It assumes that the TIFF |
Module Contents
- class minerva.data.readers.tiff_reader.TiffReader(path)
Bases:
minerva.data.readers.reader._Reader
This class loads a TIFF file from a directory. It assumes that the TIFF files are named with a number as the filename, starting from 0. This is shown below.
` /path/ ├── 0.tiff ├── 1.tiff ├── 2.tiff └── ... `
Thus, the element at index i will be the file i.tiff.
- Parameters:
path (str)
- __getitem__(index)
Retrieve the TIFF file at the specified index. The index will be used as the filename of the TIFF file.
Parameters
- indexint
Index of the TIFF file to retrieve.
Returns
- np.ndarray
The TIFF file as a NumPy array.
Raises
- ValueError
If the specified file does not exist in the given path.
- Parameters:
index (Union[int, slice])
- Return type:
numpy.ndarray