dacapo.experiments.datasplits.datasets.arrays.tiff_array

Attributes

logger

Classes

TiffArray

This class provides the necessary configuration for a tiff array.

Module Contents

dacapo.experiments.datasplits.datasets.arrays.tiff_array.logger
class dacapo.experiments.datasplits.datasets.arrays.tiff_array.TiffArray(array_config)

This class provides the necessary configuration for a tiff array.

_offset

Coordinate The offset of the array.

_file_name

Path The file name of the tiff.

_voxel_size

Coordinate The voxel size of the array.

_axes

List[str] The axes of the array.

attrs() Dict

Return the attributes of the tiff.

Note

This class is a subclass of Array.

abstract property attrs

Return the attributes of the tiff.

Returns:

The attributes of the tiff.

Return type:

Dict

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.attrs
{'axes': ['x', 'y', 'z'], 'offset': [0, 0, 0], 'voxel_size': [1, 1, 1]}

Note

Tiffs have tons of different locations for metadata.

property axes: List[str]

Return the axes of the array.

Returns:

The axes of the array.

Return type:

List[str]

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.axes
['x', 'y', 'z']

Note

Tiffs have tons of different locations for metadata.

property dims: int

Return the number of dimensions of the array.

Returns:

The number of dimensions of the array.

Return type:

int

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.dims
3

Note

Tiffs have tons of different locations for metadata.

shape() funlib.geometry.Coordinate

Return the shape of the array.

Returns:

The shape of the array.

Return type:

Coordinate

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.shape
Coordinate([100, 100, 100])

Note

Tiffs have tons of different locations for metadata.

voxel_size() funlib.geometry.Coordinate

Return the voxel size of the array.

Returns:

The voxel size of the array.

Return type:

Coordinate

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.voxel_size
Coordinate([1, 1, 1])

Note

Tiffs have tons of different locations for metadata.

roi() funlib.geometry.Roi

Return the region of interest of the array.

Returns:

The region of interest of the array.

Return type:

Roi

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.roi
Roi([0, 0, 0], [100, 100, 100])

Note

Tiffs have tons of different locations for metadata.

property writable: bool

Return whether the array is writable.

Returns:

Whether the array is writable.

Return type:

bool

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.writable
False

Note

Tiffs have tons of different locations for metadata.

property dtype
Return the data type of the array.
Returns:

The data type of the array.

Return type:

np.dtype

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.dtype
np.float32

Note

Tiffs have tons of different locations for metadata.

property num_channels: int | None

Return the number of channels of the array.

Returns:

The number of channels of the array.

Return type:

Optional[int]

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.num_channels
1

Note

Tiffs have tons of different locations for metadata.

property spatial_axes: List[str]

Return the spatial axes of the array.

Returns:

The spatial axes of the array.

Return type:

List[str]

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.spatial_axes
['x', 'y', 'z']

Note

Tiffs have tons of different locations for metadata.

data()

Return the data of the tiff.

Returns:

The data of the tiff.

Return type:

np.ndarray

Raises:

NotImplementedError – Tiffs have tons of different locations for metadata.

Examples

>>> tiff_array.data
np.ndarray

Note

Tiffs have tons of different locations for metadata.