Flat2dDetector¶
- class odl.tomo.geometry.detector.Flat2dDetector(partition, axes, check_bounds=True)[source]¶
Bases:
DetectorA 2D flat panel detector aligned two given axes in 3D space.
- Attributes:
axesFixed array of unit vectors with which the detector is aligned.
check_boundsIf
True, methods computing vectors check input arguments.gridSampling grid of the parameters.
ndimNumber of dimensions of the parameters (= surface dimension).
paramsSurface parameter set of this detector.
partitionPartition of the detector parameter set into subsets.
shapeNumber of subsets (pixels) of the detector per axis.
sizeTotal number of pixels.
space_ndimNumber of dimensions of the embedding space.
Methods
surface(param)Return the detector surface point corresponding to
param.surface_deriv(param)Return the surface derivative at
param.surface_measure(param)Density function of the surface measure.
surface_normal(param)Unit vector perpendicular to the detector surface at
param.- __init__(partition, axes, check_bounds=True)[source]¶
Initialize a new instance.
- Parameters:
- partition2-dim.
RectPartition Partition of the parameter rectangle, corresponding to the pixels.
- axessequence of
array-like's Fixed pair of of unit vectors with which the detector is aligned. The vectors must have shape
(3,)and be linearly independent.- check_boundsbool, optional
If
True, methods computing vectors check input arguments. Checks are vectorized and add only a small overhead.
- partition2-dim.
Examples
>>> part = odl.uniform_partition([0, 0], [1, 1], (10, 10)) >>> det = Flat2dDetector(part, axes=[(1, 0, 0), (0, 0, 1)]) >>> det.axes array([[ 1., 0., 0.], [ 0., 0., 1.]]) >>> det.surface_normal([0, 0]) array([ 0., -1., 0.])