Geometry¶
- class odl.tomo.geometry.geometry.Geometry(ndim, motion_part, detector, translation=None, **kwargs)[source]¶
Bases:
objectAbstract geometry class.
A geometry is described by
a detector,
a set of detector motion parameters,
a function mapping motion parameters to the location of a reference point (e.g. the center of the detector surface),
a rotation applied to the detector surface, depending on the motion parameters,
a mapping from the motion and surface parameters to the detector pixel direction to the source,
optionally a mapping from the motion parameters to the source position,
optionally a global translation of the geometry (shift of the origin)
For details, check the online docs.
- Attributes:
check_boundsIf
True, methods computing vectors check input arguments.det_gridSampling grid of
det_params.det_paramsContinuous detector parameter range, an
IntervalProd.det_partitionPartition of the detector parameter set into subsets.
detectorDetector representation of this geometry.
gridJoined sampling grid for motion and detector.
implementation_cacheDictionary acting as a cache for this geometry.
motion_gridSampling grid of
motion_params.motion_paramsContinuous motion parameter range, an
IntervalProd.motion_partitionPartition of the motion parameter set into subsets.
ndimNumber of dimensions of the geometry.
paramsJoined parameter set for motion and detector.
partitionJoined parameter set partition for motion and detector.
translationShift of the origin of this geometry.
Methods
det_point_position(mparam, dparam)Return the detector point at
(mparam, dparam).det_refpoint(mparam)Detector reference point function.
det_to_src(mparam, dparam[, normalized])Vector pointing from a detector location to the source.
rotation_matrix(mparam)Return the rotation matrix to the system state at
mparam.- __init__(ndim, motion_part, detector, translation=None, **kwargs)[source]¶
Initialize a new instance.
- Parameters:
- ndimpositive int
Number of dimensions of this geometry, i.e. dimensionality of the physical space in which this geometry is embedded.
- motion_part
RectPartition Partition for the set of "motion" parameters.
- detector
Detector The detector of this geometry.
- translation
array-like, optional Global translation of the geometry. This is added last in any method that computes an absolute vector, e.g.,
det_refpoint. Default: zero vector of lengthndim
- Other Parameters:
- check_boundsbool, optional
If
True, methods computing vectors check input arguments. Checks are vectorized and add only a small overhead. Default:True