Flat1dDetector
- class odl.applications.tomo.geometry.detector.Flat1dDetector(partition, axis, check_bounds=True)[source]
Bases:
DetectorA 1d line detector aligned with a given axis in 2D space.
- __init__(partition, axis, check_bounds=True)[source]
Initialize a new instance.
Parameters
- partition1-dim.
RectPartition Partition of the parameter interval, corresponding to the line elements.
- axis
array-like, shape(2,) Fixed axis along which this detector is aligned.
- 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, 1, 10) >>> det = Flat1dDetector(part, axis=[1, 0]) >>> det.axis array([ 1., 0.]) >>> np.allclose(det.surface_normal(0), [0, -1]) True
- partition1-dim.