rockverse.voxel_image.VoxelImage#
- class rockverse.voxel_image.VoxelImage(z)[source]#
The basic type for RockVerse Digital Rock Petrophysics, intended to contain voxelized 3D images and scalar fields in general. The class builds upon Zarr arrays by adding attributes and methods specifically designed for digital rock petrophysics in a high performance parallel computing environment.
Note
This class should not be instantiated directly. Instead, use the provided creation functions.
Attributes#
The image data type. |
|
General image or scalar field description. |
|
Name for the stored scalar field. |
|
Unit for the stored scalar field. |
|
The number of voxels in x-direction (first axis). |
|
The number of voxels in y-direction (second axis). |
|
The number of voxels in z-direction (third axis). |
|
The image shape. |
|
Spatial x-coordinate for the first voxel in x-direction (first axis). |
|
Spatial y-coordinate for the first voxel in y-direction (second axis). |
|
Spatial z-coordinate for the first voxel in z-direction (third axis). |
|
Image voxel origin for each direction. |
|
Voxel length in x-direction (first axis). |
|
Voxel length in y-direction (second axis). |
|
Voxel length in z-direction (third axis). |
|
Returns the image voxel length in each spatial direction (x, y, z) as a tuple. |
|
Image voxel unit. |
|
Image voxel unit. |
|
Image total dimension in each direction. |
|
Image bounding box in voxel units. |
|
Return voxel image meta data as a dictionary. |
|
The image number of dimensions. |
|
The image chunk shape. |
|
The image number of chunks. |
|
The underlying Zarr array object. |
Basic methods#
|
Calculate the slice indices for a given Zarr chunk. |
|
Get the spatial coordinates of the voxel at a given position. |
|
Get the voxel index closest to a given spatial position. |
|
Validate mask and segmentation compatibility. |
|
Create a mask voxel image. |
Parallel math#
|
Element-wise math operations. |
|
Combine another voxel image by element-wise math operations. |
Saving to disk#
|
Copy the voxel image to a new store. |
|
Export a voxel image to a raw file and corresponding metadata to a JSON file. |