acquisition
voxel.cast_orientation(obj) -> Orientation
¶
Cast an object to an Orientation instance.
Parameters:
-
obj(Orientation | str | AffineMatrix) –Object to cast.
Returns:
-
Orientation–The cast orientation.
voxel.cast_acquisition_geometry(obj) -> AcquisitionGeometry
¶
Cast an object to an AcquisitionGeometry.
Parameters:
-
obj(Volume | AcquisitionGeometry | Warp) –Object to cast.
Returns:
-
AcquisitionGeometry–The cast geometry.
voxel.geometries_equal(a, b, tol=1e-06) -> bool
¶
Check if two geometries are equal within a given tolerance.
Parameters:
-
a(AcquisitionGeometry) –First geometry to compare.
-
b(AcquisitionGeometry) –Second geometry to compare.
-
tol(float, default:1e-06) –Tolerance for matrix comparison.
Returns:
-
bool–True if the geometries are equal, False otherwise.
voxel.geometry_from_spacing(baseshape, spacing, orientation='RAS', space='world', device=None) -> AcquisitionGeometry
¶
Construct an acquisition geometry with a given voxel spacing and anatomical orientation, centered at the world origin.
Parameters:
-
baseshape(Size) –The spatial shape (3D dimensions) of the acquisition.
-
spacing(float | Tensor) –Voxel spacing. An isotropic spacing is assumed if a scalar is provided.
-
orientation(Orientation | str, default:'RAS') –Anatomical orientation of the voxel coordinate system.
-
space(Space, default:'world') –Space of the spacing components. If 'world', components are ordered along the world axes and permuted to the corresponding grid dimensions. If 'voxel', they map directly to the grid dimensions.
-
device(device, default:None) –Device to store the matrix on. If None, the device of the
spacingtensor is used.
Returns:
-
AcquisitionGeometry–Constructed geometry.