Bases: object
Implementation of the projector interface using the ASTRA toolbox with CUDA.
A projector needs to implement:
You can use this class as an abstracted weight matrix \(W\): multiplying an instance proj of this class by an image results in a forward projection of the image, and multiplying proj.T by a sinogram results in a backprojection of the sinogram:
proj = ASTRAProjector2D(...)
fp = proj*image
bp = proj.T*sinogram
Parameters: |
---|
Backproject a sinogram.
Parameters: | sinogram (numpy.ndarray) – The sinogram data |
---|---|
Returns: | numpy.ndarray – The backprojection. |
Forward project an image.
Parameters: | image (numpy.ndarray) – The image data. |
---|---|
Returns: | numpy.ndarray – The forward projection. |
Helper function to reconstruct a sinogram using the ASTRA toolbox.
This function does not have to be implemented by other projectors, as it is not used by PyNN-FBP.
Parameters: |
|
---|---|
Returns: | numpy.ndarray – The reconstruction. |
Implements the proj.T functionality.
Do not use directly, since it can be accessed as member .T of an ASTRAProjector2D object.