CTL
0.6.1
Computed Tomography Library
|
The GeometryDecoder class provides the functionality to extract the system configuration from a set of projection matrices. More...
#include <geometrydecoder.h>
Public Types | |
enum | PhysicalDimension { PixelWidth, PixelHeight, SourceDetectorDistance } |
Public Member Functions | |
GeometryDecoder (const QSize &pixelPerModule, const QSizeF &pixelSize) | |
GeometryDecoder (const QSize &pixelPerModule, PhysicalDimension physicalDimension=PixelWidth, double mm=1.0) | |
AcquisitionSetup | decodeFullGeometry (const FullGeometry &geometry) const |
const QPair< PhysicalDimension, double > & | dimensionReference () const |
const QSize & | pixelPerModule () const |
const QSizeF & | pixelDimensions () const |
const QSizeF & | pixelSize () const |
void | setDimensionReference (PhysicalDimension physicalDimension, double mm) |
void | setPixelPerModule (const QSize &value) |
void | setPixelDimensions (const QSizeF &value) |
void | setPixelSize (const QSizeF &value) |
void | setReferenceModuleID (int moduleID) |
Static Public Member Functions | |
static SimpleCTSystem | decodeSingleViewGeometry (const SingleViewGeometry &singleViewGeometry, const QSize &pixelPerModule, PhysicalDimension physicalDimension=PixelWidth, double mm=1.0, int referenceModuleID=-1) |
static AcquisitionSetup | decodeFullGeometry (const FullGeometry &geometry, const QSize &pixelPerModule, const QSizeF &pixelSize, int referenceModuleID=-1) |
static AcquisitionSetup | decodeFullGeometry (const FullGeometry &geometry, const QSize &pixelPerModule, PhysicalDimension physicalDimension=PixelWidth, double mm=1.0, int referenceModuleID=-1) |
Static Private Member Functions | |
static QSizeF | computePixelSize (const mat::ProjectionMatrix &pMat, PhysicalDimension physicalDimension, double mm) |
static QVector< mat::Location > | computeModuleLocations (const SingleViewGeometry &singleViewGeometry, const Vector3x1 &sourcePosition, const QSize &pixelPerModule, double pixelWidth) |
static Matrix3x3 | computeSourceRotation (const QVector< mat::Location > &moduleLocations, const Vector3x1 &sourcePosition) |
static mat::Location | referenceModuleLocation (const QVector< mat::Location > &moduleLocations, int referenceModuleID) |
static void | adaptModuleLocationsToReference (QVector< mat::Location > &moduleLocations, const mat::Location &referenceLocation) |
Private Attributes | |
QSize | _pixelPerModule |
Number of pixels of the assumed detector. | |
QSizeF | _pixelSize |
Pixel size of the assumed detector. | |
QPair< PhysicalDimension, double > | _physicalDimensionReference = { PixelWidth, 1.0 } |
int | _referenceModule = -1 |
The GeometryDecoder class provides the functionality to extract the system configuration from a set of projection matrices.
This class can be used to generate an AcquisitionSetup that fully represents a set of given projection matrices. Besides the projection matrices themselves, information about the detector dimensions (i.e. number of pixels in each module and their (physical) size) is required.
The projection matrices must be passed as a FullGeometry object. In doing so, the routine can automatically readout the number of individual modules in the detector.
CTL::GeometryDecoder::GeometryDecoder | ( | const QSize & | pixelPerModule, |
const QSizeF & | pixelSize | ||
) |
Constructs a GeometryDecoder object.
|
staticprivate |
Computes the physical center of the modules in world coordinates.
|
staticprivate |
Returns matrix that rotates source perpendicular to the centroid of detector locations
AcquisitionSetup CTL::GeometryDecoder::decodeFullGeometry | ( | const FullGeometry & | geometry | ) | const |
See decodeFullGeometry(const FullGeometry& geometry, const QSize& pixelPerModule, const QSizeF& pixelSize). It uses the internal _pixelPerModule
and _pixelSize
of the object.
|
static |
Decodes the set of projection matrices in geometry and constructs a GenericAcquisitionSetup that represents all the geometry information that has been extracted.
Besides projection matrices, information about the detector dimensions (i.e. number of pixels in each module and their (physical) size) is required. The number of individual flat panel modules is automatically readout from geometry.
This method constructs a SimpleCTSystem consisting of a GenericSource, GenericDetector and a GenericGantry component.
Some remarks on system configuration: All source settings remain at default values (i.e. source spectrum, focal spot size and focal spot position). Consider changing these afterwards, if required. The full geometry information regarding the detector is stored in the location specification of the individual detector modules. In particular, this means that the (global) detector positioning - as queried for example by GenericGantry::detectorPosition() - will carry no information (position defaults to (0,0,0) and rotation to identity matrix). Additionally, the rotation of the source component cannot be determined without further information. Hence, it remains at default value (i.e. identity matrix).
const QSizeF & CTL::GeometryDecoder::pixelDimensions | ( | ) | const |
This function has been deprecated. Use pixelSize() instead.
const QSize & CTL::GeometryDecoder::pixelPerModule | ( | ) | const |
Returns the number of pixels per module of the detector that the geometry decoder shall assume for the system.
const QSizeF & CTL::GeometryDecoder::pixelSize | ( | ) | const |
Returns the pixel size [mm] of the detector that the geometry decoder shall assume for the system.
void CTL::GeometryDecoder::setPixelDimensions | ( | const QSizeF & | value | ) |
This function has been deprecated. Use setPixelSize(const QSizeF& value) instead.
void CTL::GeometryDecoder::setPixelPerModule | ( | const QSize & | value | ) |
Sets the number of pixels per module of the detector that the geometry decoder shall assume for the system to value.
void CTL::GeometryDecoder::setPixelSize | ( | const QSizeF & | value | ) |
Sets the pixel size [mm] of the detector that the geometry decoder shall assume for the system to value.
void CTL::GeometryDecoder::setReferenceModuleID | ( | int | moduleID | ) |
Sets the reference module that the geometry decoder shall use to compute the detector location to moduleID. If moduleID < 0, automatic selection will be performed, i.e. the central module ID (nbModules
/ 2) will be used.
Note that moduleID must be a valid id in the data to be decoded (i.e. moduleID < nbModules
).