Skip to content

acquisition

voxel.cast_orientation(obj) -> Orientation

Cast an object to an Orientation instance.

Parameters:

Returns:

voxel.cast_acquisition_geometry(obj) -> AcquisitionGeometry

Cast an object to an AcquisitionGeometry.

Parameters:

Returns:

voxel.geometries_equal(a, b, tol=1e-06) -> bool

Check if two geometries are equal within a given tolerance.

Parameters:

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 spacing tensor is used.

Returns: