Flat2dDetector

class odl.applications.tomo.geometry.detector.Flat2dDetector(partition, axes, check_bounds=True)[source]

Bases: Detector

A 2D flat panel detector aligned two given axes in 3D space.

__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.

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.])