ParallelHoleCollimatorGeometry¶
- class odl.tomo.geometry.spect.ParallelHoleCollimatorGeometry(apart, dpart, det_radius, axis=(0, 0, 1), **kwargs)[source]¶
Bases:
Parallel3dAxisGeometryGeometry for SPECT Parallel hole collimator.
For details, check the online docs.
- Attributes:
anglesAll angles of this geometry as an array.
axisNormalized axis of rotation, a 3d vector.
check_boundsIf
True, methods computing vectors check input arguments.det_axes_initInitial axes of the detector.
det_gridSampling grid of
det_params.det_paramsContinuous detector parameter range, an
IntervalProd.det_partitionPartition of the detector parameter set into subsets.
det_pos_initInitial position of the detector reference point.
det_radiusRadius of the detector orbit.
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.
orig_to_det_initUnit vector from rotation center to initial detector position.
paramsJoined parameter set for motion and detector.
partitionJoined parameter set partition for motion and detector.
translationShift of the origin of this geometry.
Methods
det_axes(angle)Return the detector axes tuple at
angle.det_point_position(mparam, dparam)Return the detector point at
(mparam, dparam).det_refpoint(angle)Return the position(s) of the detector ref.
det_to_src(angle, dparam)Direction from a detector location to the source.
frommatrix(apart, dpart, det_radius, ...)Create a
ParallelHoleCollimatorGeometryusing a matrix.rotation_matrix(angle)Return the rotation matrix to the system state at
angle.- __init__(apart, dpart, det_radius, axis=(0, 0, 1), **kwargs)[source]¶
Initialize a new instance.
- Parameters:
- apart1-dim.
RectPartition Partition of the angle interval.
- dpart2-dim.
RectPartition Partition of the detector parameter rectangle.
- det_radiuspositive float
Radius of the circular detector orbit.
- axis
array-like, shape(3,), optional Vector defining the fixed rotation axis of this geometry.
- apart1-dim.
- Other Parameters:
- orig_to_det_init
array-like, shape(3,), optional Vector pointing towards the initial position of the detector reference point. The default depends on
axis, see Notes. The zero vector is not allowed.- det_axes_init2-tuple of
array-like's (shape(3,)), optional Initial axes defining the detector orientation. The default depends on
axis, see Notes.- translation
array-like, shape(3,), optional Global translation of the geometry. This is added last in any method that computes an absolute vector, e.g.,
det_refpoint, and also shifts the axis of rotation. Default:(0, 0, 0)- check_boundsbool, optional
If
True, methods perform sanity checks on provided input parameters. Default:True
- orig_to_det_init
Notes
In the default configuration, the rotation axis is
(0, 0, 1), the vector towards the initial detector reference point is(0, 1, 0), and the default detector axes are[(1, 0, 0), (0, 0, 1)]. If a differentaxisis provided, the new default initial position and the new default axes are the computed by rotating the original ones by a matrix that transforms(0, 0, 1)to the new (normalized)axis. This matrix is calculated with therotation_matrix_from_tofunction. Expressed in code, we haveinit_rot = rotation_matrix_from_to((0, 0, 1), axis) orig_to_det_init = init_rot.dot((0, 1, 0)) det_axes_init[0] = init_rot.dot((1, 0, 0)) det_axes_init[1] = init_rot.dot((0, 0, 1))