Geometry¶
-
class
odl.tomo.geometry.geometry.
Geometry
(ndim, motion_part, detector, translation=None, **kwargs)[source]¶ Bases:
object
Abstract 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_bounds
If
True
, methods computing vectors check input arguments.det_grid
Sampling grid of
det_params
.det_params
Continuous detector parameter range, an
IntervalProd
.det_partition
Partition of the detector parameter set into subsets.
detector
Detector representation of this geometry.
grid
Joined sampling grid for motion and detector.
implementation_cache
Dictionary acting as a cache for this geometry.
motion_grid
Sampling grid of
motion_params
.motion_params
Continuous motion parameter range, an
IntervalProd
.motion_partition
Partition of the motion parameter set into subsets.
ndim
Number of dimensions of the geometry.
params
Joined parameter set for motion and detector.
partition
Joined parameter set partition for motion and detector.
translation
Shift of the origin of this geometry.
Methods
det_point_position
(self, mparam, dparam)Return the detector point at
(mparam, dparam)
.det_refpoint
(self, mparam)Detector reference point function.
det_to_src
(self, mparam, dparam[, normalized])Vector pointing from a detector location to the source.
rotation_matrix
(self, mparam)Return the rotation matrix to the system state at
mparam
.-
__init__
(self, 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