CASToR
1.1
Tomographic Reconstruction (PET/SPECT)
|
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... | |
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 | 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 () |
void | SetVerbose (int a_verboseLevel) |
Set verbosity. More... | |
FLTNB | GetMultiBedDisplacementInMm () |
virtual int | SetPETMaxRingDiff (int a_maxRingDiff) |
Set the maximal ring difference. More... | |
virtual int | GetScannerLayerNbRings (int a_layer) |
Return an error by default. More... | |
virtual int | SetRotDirection (string a_rotDirection) |
Set rotation direction of the system. More... | |
virtual int | PROJ_GetPETSpecificParameters (int *ap_maxRingDiff) |
Get geometric PET specific parameters to initialize the datafile. More... | |
virtual int | GetSPECTSpecificParameters (uint16_t *ap_nbOfProjections, uint16_t *ap_nbHeads, 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 | 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 |
bool | m_allParametersChecked |
oMatrix * | mp_rotationMatrix |
oMatrix * | mp_positionMatrix_ref |
oMatrix * | mp_positionMatrix_out |
int | m_rotDirection |
FLTNB | m_multiBedDisplacementInMm |
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 48 of file vScanner.hh.
vScanner::vScanner | ( | ) |
vScanner constructor. Initialize the member variables to their default values.
Definition at line 28 of file vScanner.cc.
|
virtual |
vScanner destructor.
Definition at line 46 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 iScannerPET, and iScannerSPECTConv.
|
pure virtual |
This function is implemented in child classes.
Check that all parameters have been correctly initialized.
Implemented in 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, and iScannerPET.
Definition at line 70 of file vScanner.cc.
|
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, and iScannerSPECTConv.
|
inline |
Definition at line 231 of file vScanner.hh.
|
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 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, 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, and iScannerSPECTConv.
|
virtual |
Return an error by default.
a_layer |
This function is surcharged by the PET scanner daughter class
Reimplemented in iScannerPET.
Definition at line 155 of file vScanner.cc.
|
inline |
Definition at line 218 of file vScanner.hh.
|
virtual |
Recover geometric SPECT specific parameters from the scanner to initialize the datafile.
ap_nbOfProjections | |
ap_nbHeads | |
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 204 of file vScanner.cc.
|
pure virtual |
This is a pure virtual method that must be implemented by children.
Implemented in 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, and iScannerSPECTConv.
|
pure virtual |
This function is implemented in child classes.
Check initialization and set several parameters to their default value.
Implemented in 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 iScannerPET, and iScannerSPECTConv.
|
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 115 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, and iScannerPET.
Definition at line 93 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 176 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 374 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 354 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 313 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 334 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 268 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 289 of file vScanner.cc.
|
virtual |
Set the maximal ring difference.
a_maxRingDiff |
This function is surcharged by the PET scanner daughter class
Returns an error by default.
Reimplemented in iScannerPET.
Definition at line 137 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 232 of file vScanner.cc.
|
inline |
Set verbosity.
a_verboseLevel |
Definition at line 225 of file vScanner.hh.
|
pure virtual |
This function is implemented in child classes
Display help specific to the scanner class.
Implemented in iScannerPET, and iScannerSPECTConv.
|
protected |
Boolean indicating if all variables of the class have been checked. Default =false
Definition at line 365 of file vScanner.hh.
|
protected |
The displacement of the scanner between two successive bed positions. Default = 0.
Definition at line 370 of file vScanner.hh.
|
protected |
Rotation Direction for the generation of the geometry (clockwise by default)
Definition at line 369 of file vScanner.hh.
|
protected |
System type. Default =-1 (unknown)
Definition at line 363 of file vScanner.hh.
|
protected |
Verbosity. Default =-1
Definition at line 364 of file vScanner.hh.
|
protected |
Matrix strucure for rotation computations
Definition at line 368 of file vScanner.hh.
|
protected |
Matrix strucure for rotation computations
Definition at line 367 of file vScanner.hh.
|
protected |
Matrix strucure for rotation computations
Definition at line 366 of file vScanner.hh.