kernelkit.resolve_volume_geometry

kernelkit.resolve_volume_geometry#

kernelkit.resolve_volume_geometry(shape=None, extent_min=None, extent_max=None, voxel_size=None, projection_geometry=None, verbose=False)#

Resolves a VolumeGeometry given partial parameters.

Parameters:
shapearray-like, optional

The shape of the volume, by default None. Pass as a scalar, or a tuple of length 3 with (x ,y, z) filled with None for unknown dimensions.

extent_minarray-like, optional

The minimum extent of the volume, by default None. Pass as a scalar, or a tuple of length 3 with (x ,y, z) filled with None for unknown dimensions. Pass as a scalar, or a tuple of length 3 with (x ,y, z) filled with None for unknown dimensions.

extent_maxarray-like, optional

The maximum extent of the volume, by default None. Pass as a scalar, or a tuple of length 3 with (x ,y, z) filled with None for unknown dimensions.

voxel_sizearray-like, optional

The size of a single voxel, by default None. Pass as a scalar, or a tuple of length 3 with (x ,y, z) filled with None for unknown dimensions.

projection_geometryProjectionGeometry, optional

A projection geometry, by default None. Is used to suggest the volume extent in case insufficient information can be deduced from the other parameters.

verbosebool, optional

Whether to print the parameters solving process, by default False.

Returns:
VolumeGeometry

The resolved volume geometry.

Notes

  • Currently only volume geometries with isotropic voxels are deduced.

  • The function may not respect the input parameters exactly, if this is

    necessary to fulfill the constraint of isotropic voxels.