Image#
- class Image(*, scalar=None, vector=None, filepaths=None, meta=None)[source]#
Image dataclass. At least one of scalar, vector, or filepath attributes must be provided.
- scalar#
A 3D array representing scalar values of an image (e.g. binary image, pressure field, etc.)
- Type:
np.ndarray
- vector#
A list containing 3 np.ndarrays of the vector components (z, x, y)
- Type:
list[np.ndarray, np.ndarray, np.ndarray]
- filepaths#
A list containing the filepaths to the image data. Assumes the order of paths are scalar,
- Type:
list
- z-, y-, x- components of the vector field. If only providing vector field data, assign None to the 0th index
- meta#
A list containing dictionaries for the metadata of each image in filepaths used to read the image.
- Type:
list
- If no metadata is necessary, pass a list of empty dictionaries
- shape#
The shape of the 3D ndarray containing the image
- Type:
tuple
- nx#
Width of the image (in voxels)
- Type:
int
- ny#
Height of the image (in voxels)
- Type:
int
- nz#
Number of slices of the image
- Type:
int
- magnitude#
Magnitude of vector (if vector is provided)