CASToR
2.0
Tomographic Reconstruction (PET/SPECT/CT)
|
Generic class for scanner objects. More...
#include <vScanner.hh>
Public Member Functions | |
vScanner () | |
vScanner constructor. Initialize the member variables to their default values. More... | |
virtual | ~vScanner () |
vScanner destructor. More... | |
void | Describe () |
A function used to describe the generic parts of the datafile. More... | |
virtual void | DescribeSpecific ()=0 |
A pure virtual function used to describe the specific parts of the scanner. More... | |
virtual int | Instantiate (bool a_scannerFileIsLUT)=0 |
This function is implemented in child classes. Read the mandatory fields from the scanner file and allocate memory for the member variables. More... | |
virtual int | BuildLUT (bool a_scannerFileIsLUT)=0 |
This function is implemented in child classes. Instantiate the scanner look-up-table (LUT) More... | |
virtual int | CheckParameters ()=0 |
This function is implemented in child classes. Check that all parameters have been correctly initialized. More... | |
virtual int | Initialize ()=0 |
This function is implemented in child classes. Check initialization and set several parameters to their default value. More... | |
virtual int | GetPositionsAndOrientations (int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3], FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3], FLTNB *ap_POI1=NULL, FLTNB *ap_POI2=NULL)=0 |
This is a pure virtual method that must be implemented by children. Get the central positions and orientations of the scanner elements from their indices. More... | |
virtual int | GetRdmPositionsAndOrientations (int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3], FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3])=0 |
This is a pure virtual method that must be implemented by children. Get random positions of the scanner elements and their orientations from their indices. More... | |
virtual int | GetPositionWithRandomDepth (int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3])=0 |
This is a pure virtual method that must be implemented by children. Get the positions of scanner elements from their indices, with a random depth. More... | |
virtual int | GetTwoCorners (int a_index1, int a_index2, FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3], FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3])=0 |
This is a pure virtual method that must be implemented by children. Get the cartesian coordinaters of the two opposite corners of a scanner element. More... | |
virtual int | GetEdgesCenterPositions (int a_index1, int a_index2, FLTNB ap_pos_line_point1[3], FLTNB ap_pos_line_point2[3], FLTNB ap_pos_point1_x[4], FLTNB ap_pos_point1_y[4], FLTNB ap_pos_point1_z[4], FLTNB ap_pos_point2_x[4], FLTNB ap_pos_point2_y[4], FLTNB ap_pos_point2_z[4])=0 |
This is a pure virtual method that must be implemented by children. Get the cartesian coordinaters of the center of the 4 edges of the detection element. It is typically used for the Distance Driven projector. More... | |
virtual int | ComputeLUT () |
Virtual function which should be implemented by the child classes. It computes the LUT of the scanner from a generic (.geom) file. The vScanner implementation throws error by default as it should be implemented by the child class. More... | |
virtual int | LoadLUT () |
Virtual function which should be implemented by the child classes. Load a precomputed scanner LUT. The vScanner implementation throws error by default as it should be implemented by the child class. More... | |
virtual int | GetSystemNbElts ()=0 |
This is a pure virtual method that must be implemented by children. More... | |
virtual int | IsAvailableLOR (int a_elt1, int a_elt2) |
This function is implemented in child classes. Check if the LOR is available according to the scanner restrictions. More... | |
virtual void | ShowHelp ()=0 |
This function is implemented in child classes Display help specific to the scanner class. More... | |
virtual int | GetGeometricInfoFromDataFile (string a_path)=0 |
This function is implemented in child classes Recover geometric informations specific to the scanner class from the datafile header. More... | |
int | GetScannerType () |
string | GetScannerTypeString () |
void | SetVerbose (int a_verboseLevel) |
Set verbosity. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ID) |
Set the pointer to the image dimensions and quantification object. More... | |
FLTNB | GetDefaultBedDisplacementInMm () |
virtual FLTNB | GetDetectionElementSizeTrans ()=0 |
virtual FLTNB | GetDetectionElementSizeAxial ()=0 |
virtual int | SetPETMaxAxialDiffmm (FLTNB a_maxAxialDiffmm) |
Set the maximal axial difference in mm between 2 crystals forming a lor. More... | |
virtual int | SetRotDirection (string a_rotDirection) |
Set rotation direction of the system. More... | |
virtual int | PROJ_GetPETSpecificParameters (FLTNB *ap_maxRingDiff) |
Get geometric PET specific parameters to initialize the datafile. More... | |
virtual int | GetSPECTSpecificParameters (uint16_t *ap_nbOfProjections, uint16_t *ap_nbHeads, FLTNB *ap_acquisitionZoom, uint16_t *ap_nbOfBins, FLTNB *ap_pixSizeXY, FLTNB *&ap_angles, FLTNB *&ap_CORtoDetectorDistance, int *ap_headRotDirection) |
Recover geometric SPECT specific parameters from the scanner to initialize the datafile. More... | |
virtual int | GetCTSpecificParameters (uint16_t *ap_nbOfProjections, FLTNB *&ap_angles, int *ap_detectorRotDirection) |
Recover geometric CT specific parameters from the scanner to initialize the datafile. More... | |
virtual int | PROJ_SetSPECTNbBins (uint16_t *ap_nbOfBins) |
Set SPECT number of Bins. More... | |
virtual int | PROJ_SetSPECTNbProjections (uint32_t a_nbOfProjections) |
Set SPECT number of views. More... | |
virtual int | PROJ_SetSPECTAngles (FLTNB *ap_projectionAngles) |
Set SPECT projection angles. More... | |
virtual int | PROJ_SetSPECTCORtoDetectorDistance (FLTNB a_CORtoDetectorDistance) |
Set distance between center of rotation and SPECT detectors. More... | |
virtual uint16_t | PROJ_GetSPECTNbProjections () |
return the total number of projections for a SPECT acquisition More... | |
virtual uint16_t | PROJ_GetSPECTNbPixels () |
return the total number of pixels for a SPECT reconstruction More... | |
Protected Attributes | |
int | m_scannerType |
int | m_verbose |
oImageDimensionsAndQuantification * | mp_ID |
bool | m_allParametersChecked |
oMatrix * | mp_rotationMatrix |
oMatrix * | mp_positionMatrix_ref |
oMatrix * | mp_positionMatrix_out |
int | m_rotDirection |
FLTNB | m_defaultBedDisplacementInMm |
Generic class for scanner objects.
This class is designed to be a mother virtual class that should not be used on its own; only its children are used.
It has a pure virtual function that is used to get the cartesian coordinates of any line described by two indices.
Although new scanner classes are not supposed to be added, it uses the same auto-declaration class system than other reconstruction classes for the initialization of its children.
Definition at line 62 of file vScanner.hh.
vScanner::vScanner | ( | ) |
vScanner constructor. Initialize the member variables to their default values.
Definition at line 39 of file vScanner.cc.
|
virtual |
vScanner destructor.
Definition at line 58 of file vScanner.cc.
|
pure virtual |
This function is implemented in child classes.
Instantiate the scanner look-up-table (LUT)
a_scannerFileIsLUT | : boolean indicating if the file describing the system is a generic file (0) or custom Look-up-table (1) |
Implemented in iScannerCT, iScannerSPECTConv, and iScannerPET.
|
pure virtual |
This function is implemented in child classes.
Check that all parameters have been correctly initialized.
Implemented in iScannerCT, iScannerSPECTConv, and iScannerPET.
|
virtual |
Virtual function which should be implemented by the child classes.
It computes the LUT of the scanner from a generic (.geom) file.
The vScanner implementation throws error by default as it should be implemented by the child class.
Reimplemented in iScannerSPECTConv, iScannerPET, and iScannerCT.
Definition at line 136 of file vScanner.cc.
void vScanner::Describe | ( | ) |
A function used to describe the generic parts of the datafile.
Definition at line 76 of file vScanner.cc.
|
pure virtual |
A pure virtual function used to describe the specific parts of the scanner.
Implemented in iScannerCT, iScannerSPECTConv, and iScannerPET.
|
virtual |
Recover geometric CT specific parameters from the scanner to initialize the datafile.
ap_nbOfProjections | |
ap_angles | |
ap_detectorRotDirection |
This function is surcharged by the CT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerCT.
Definition at line 268 of file vScanner.cc.
|
inline |
Definition at line 289 of file vScanner.hh.
|
inlinepure virtual |
Implemented in iScannerPET, iScannerSPECTConv, and iScannerCT.
|
inlinepure virtual |
Implemented in iScannerPET, iScannerCT, and iScannerSPECTConv.
|
pure virtual |
This is a pure virtual method that must be implemented by children.
Get the cartesian coordinaters of the center of the 4 edges of the detection element.
It is typically used for the Distance Driven projector.
int | a_index1 : 1st index of the event |
int | a_index2 : 2nd index of the event |
FLTNB | ap_pos_line_point1[3] : current position of point 1 of the ray (supposed to be centered in the section of the detection element and at the desired depth of interaction) |
FLTNB | ap_pos_line_point2[3] : current position of point 1 of the ray (supposed to be centered in the section of the detection element and at the desired depth of interaction) |
FLTNB | ap_pos_point1_x[4] : the resulting X position of the 4 edges of point 1 |
FLTNB | ap_pos_point1_y[4] : the resulting Y position of the 4 edges of point 1 |
FLTNB | ap_pos_point1_z[4] : the resulting Z position of the 4 edges of point 1 |
FLTNB | ap_pos_point2_x[4] : the resulting X position of the 4 edges of point 1 |
FLTNB | ap_pos_point2_y[4] : the resulting Y position of the 4 edges of point 1 |
FLTNB | ap_pos_point2_z[4] : the resulting Z position of the 4 edges of point 1 |
Implemented in iScannerPET, iScannerCT, and iScannerSPECTConv.
|
pure virtual |
This function is implemented in child classes
Recover geometric informations specific to the scanner class from the datafile header.
a_path | : string containing the path to datafile header |
Implemented in iScannerPET, iScannerCT, and iScannerSPECTConv.
|
pure virtual |
This is a pure virtual method that must be implemented by children.
Get the central positions and orientations of the scanner elements from their indices.
a_index1 | : 1st index of the event |
a_index2 | : 2nd index of the event |
ap_Position1[3] | : x,y,z cartesian position of the point related to the 1st index (see child function for more details) |
ap_Position2[3] | : x,y,z cartesian position of the point related to the 2st index (see child function for more details) |
ap_Orientation1[3] | : x,y,z components of the orientation vector related to the 1st index (see child function for more details) |
ap_Orientation2[3] | : x,y,z components of the orientation vector related to the 2nd index (see child function for more details) |
ap_POI1 | : x,y,z components of the Point Of Interation related to the 1st index (see child function for more details) |
ap_POI2 | : x,y,z components of the Point Of Interation related to the 2nd index (see child function for more details) |
Implemented in iScannerCT, iScannerPET, and iScannerSPECTConv.
|
pure virtual |
This is a pure virtual method that must be implemented by children.
Get the positions of scanner elements from their indices, with a random depth.
a_index1 | : 1st index of the event |
a_index2 | : 2nd index of the event |
ap_Position1[3] | : x,y,z cartesian position of the point related to the 1st event (see child function for more details) |
ap_Position2[3] | : x,y,z cartesian position of the point related to the 2st event (see child function for more details) |
Implemented in iScannerPET, iScannerCT, and iScannerSPECTConv.
|
pure virtual |
This is a pure virtual method that must be implemented by children.
Get random positions of the scanner elements and their orientations from their indices.
a_index1 | : 1st index of the event |
a_index2 | : 2nd index of the event |
ap_Position1[3] | : x,y,z cartesian position of the point related to the 1st index (see child function for more details) |
ap_Position2[3] | : x,y,z cartesian position of the point related to the 2st index (see child function for more details) |
ap_Orientation1[3] | : x,y,z components of the orientation vector related to the 1st index (see child function for more details) |
ap_Orientation2[3] | : x,y,z components of the orientation vector related to the 2nd index (see child function for more details) |
Implemented in iScannerPET, iScannerCT, and iScannerSPECTConv.
|
inline |
Definition at line 263 of file vScanner.hh.
|
inline |
Definition at line 101 of file vScanner.cc.
|
virtual |
Recover geometric SPECT specific parameters from the scanner to initialize the datafile.
ap_nbOfProjections | |
ap_nbHeads | |
ap_acquisitionZoom | |
ap_nbOfBins | |
ap_pixSizeXY | |
ap_angles | |
ap_CORtoDetectorDistance | |
ap_headRotDirection |
This function is surcharged by the SPECT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerSPECTConv.
Definition at line 238 of file vScanner.cc.
|
pure virtual |
This is a pure virtual method that must be implemented by children.
Implemented in iScannerCT, iScannerSPECTConv, and iScannerPET.
|
pure virtual |
This is a pure virtual method that must be implemented by children.
Get the cartesian coordinaters of the two opposite corners of a scanner element.
a_index1 | : 1st index of the event |
a_index2 | : 2nd index of the event |
ap_CornerInf1[3] | |
ap_CornerSup1[3] | |
ap_CornerInf2[3] | |
ap_CornerSup2[3] |
Implemented in iScannerPET, iScannerCT, and iScannerSPECTConv.
|
pure virtual |
This function is implemented in child classes.
Check initialization and set several parameters to their default value.
Implemented in iScannerCT, iScannerSPECTConv, and iScannerPET.
|
pure virtual |
This function is implemented in child classes. Read the mandatory fields from the scanner file and allocate memory for the member variables.
a_scannerFileIsLUT | : boolean indicating if the file describing the system is a generic file (0) or custom Look-up-table (1) |
Implemented in iScannerCT, iScannerSPECTConv, and iScannerPET.
|
virtual |
This function is implemented in child classes.
Check if the LOR is available according to the scanner restrictions.
a_elt1 | : index of the 1st scanner element |
a_elt2 | : index of the 2nd scanner element |
This function is related to analytic projection and list-mode sensitivity image generation
Reimplemented in iScannerSPECTConv, and iScannerPET.
Definition at line 181 of file vScanner.cc.
|
virtual |
Virtual function which should be implemented by the child classes.
Load a precomputed scanner LUT.
The vScanner implementation throws error by default as it should be implemented by the child class.
Reimplemented in iScannerSPECTConv, iScannerPET, and iScannerCT.
Definition at line 159 of file vScanner.cc.
|
virtual |
Get geometric PET specific parameters to initialize the datafile.
ap_maxRingDiff |
This function is surcharged by the PET scanner daughter classes
Returns an error by default.
Reimplemented in iScannerPET.
Definition at line 224 of file vScanner.cc.
|
virtual |
return the total number of pixels for a SPECT reconstruction
This function is surcharged by the SPECT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerSPECTConv.
Definition at line 432 of file vScanner.cc.
|
virtual |
return the total number of projections for a SPECT acquisition
This function is surcharged by the SPECT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerSPECTConv.
Definition at line 412 of file vScanner.cc.
|
virtual |
Set SPECT projection angles.
ap_projectionAngles |
This function is surcharged by the SPECT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerSPECTConv.
Definition at line 371 of file vScanner.cc.
|
virtual |
Set distance between center of rotation and SPECT detectors.
a_CORtoDetectorDistance |
This function is surcharged by the SPECT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerSPECTConv.
Definition at line 392 of file vScanner.cc.
|
virtual |
Set SPECT number of Bins.
ap_nbOfBins |
This function is surcharged by the SPECT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerSPECTConv.
Definition at line 326 of file vScanner.cc.
|
virtual |
Set SPECT number of views.
a_nbOfProjections |
This function is surcharged by the SPECT scanner daughter classes
Returns an error by default.
Reimplemented in iScannerSPECTConv.
Definition at line 347 of file vScanner.cc.
|
inline |
Set the pointer to the image dimensions and quantification object.
oImageDimensionsAndQuantification* | ap_ID |
Definition at line 283 of file vScanner.hh.
|
virtual |
Set the maximal axial difference in mm between 2 crystals forming a lor.
a_maxAxialDiffmm |
This function is surcharged by the PET scanner daughter class
Returns an error by default.
Reimplemented in iScannerPET.
Definition at line 203 of file vScanner.cc.
|
virtual |
Set rotation direction of the system.
a_rotDirection |
Set rotation direction of the scanner elements (head for SPECT, rsector/modules for PET) for the generation of the geometry
Definition at line 290 of file vScanner.cc.
|
inline |
Set verbosity.
a_verboseLevel |
Definition at line 276 of file vScanner.hh.
|
pure virtual |
This function is implemented in child classes
Display help specific to the scanner class.
Implemented in iScannerPET, iScannerCT, and iScannerSPECTConv.
|
protected |
Boolean indicating if all variables of the class have been checked. Default =false
Definition at line 440 of file vScanner.hh.
|
protected |
The default displacement of the scanner between two successive bed positions. Default = 0.
Definition at line 445 of file vScanner.hh.
|
protected |
Rotation Direction for the generation of the geometry (clockwise by default)
Definition at line 444 of file vScanner.hh.
|
protected |
System type. Default =-1 (unknown)
Definition at line 437 of file vScanner.hh.
|
protected |
Verbosity. Default =-1
Definition at line 438 of file vScanner.hh.
|
protected |
Image dimensions and quantification object
Definition at line 439 of file vScanner.hh.
|
protected |
Matrix strucure for rotation computations
Definition at line 443 of file vScanner.hh.
|
protected |
Matrix strucure for rotation computations
Definition at line 442 of file vScanner.hh.
|
protected |
Matrix strucure for rotation computations
Definition at line 441 of file vScanner.hh.