![]() |
CASToR
1.0
Tomographic Reconstruction (PET/SPECT)
|
This class is used to represent any cylindrical PET scanner. More...
#include <iScannerPET.hh>
Public Member Functions | |
iScannerPET () | |
iScannerPET constructor. Initialize the member variables to their default values. | |
~iScannerPET () | |
iScannerPET destructor. | |
int | Instantiate (bool a_scannerFileIsLUT) |
Get mandatory informations from the scanner file and allocate memory for the member variables. | |
int | CheckParameters () |
Check if all parameters have been correctly initialized. | |
int | Initialize () |
Check general initialization and set several parameters to their default value. | |
int | BuildLUT (bool a_scannerFileIsLUT) |
Call the functions to generate the LUT or read the user-made LUT depending on the user choice. | |
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) |
Get the central positions and orientations of the scanner elements from their indices. | |
int | GetRdmPositionsAndOrientations (int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3], FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3]) |
Get random positions of the scanner elements and their orientations from their indices. | |
int | GetPositionWithRandomDepth (int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3]) |
Get the positions and orientations of scanner elements from their indices, with a random depth. | |
int | GetTwoCorners (int a_index1, int a_index2, FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3], FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3]) |
Get the cartesian coordinaters of the two opposite corners of a scanner element. | |
int | GetSystemNbElts () |
int | GetScannerLayerNbRings (int a_layer) |
Return the number of rings for a specific crystal layer. | |
int | IsAvailableLOR (int a_elt1, int a_elt2) |
Check if the LOR formed by the crystalf whose indices are passed in parameters is available according to the scanner restrictions. | |
int | GetGeometricInfoFromDatafile (string a_pathToDataFilename) |
Retrieve PET geometric informations from the datafile. | |
int | SetPETMaxRingDiff (int a_maxRingDiff) |
Set the maximal ring difference (if any) | |
void | ShowHelp () |
Display help. | |
int | PROJ_GetPETSpecificParameters (int *ap_maxRingDiff) |
Set pointers passed in argument with the related PET specific variables This function is used to recover these values in the datafile object. | |
Private Member Functions | |
int | LoadLUT () |
Load a precomputed scanner LUT. | |
int | ComputeLUT () |
Compute the LUT of the scanner from a generic (.geom) file. | |
int | GetLayer (int a_idx) |
Get the layer from which the 'a_index' crystal belongs to. | |
int | GetRingID (int a_idx) |
Get the ring which the #a_idx crystal belongs to. | |
Private Attributes | |
int | m_nbLayers |
int | m_nbCrystals |
int * | mp_nbRings |
int * | mp_nbCrystalsInLayer |
FLTNB * | mp_crystalCentralPositionX |
FLTNB * | mp_crystalCentralPositionY |
FLTNB * | mp_crystalCentralPositionZ |
FLTNB * | mp_crystalOrientationX |
FLTNB * | mp_crystalOrientationY |
FLTNB * | mp_crystalOrientationZ |
FLTNB * | mp_sizeCrystalTrans |
FLTNB * | mp_sizeCrystalAxial |
FLTNB * | mp_sizeCrystalDepth |
FLTNB * | mp_meanDepthOfInteraction |
FLTNB | m_minAngleDifference |
int | m_maxRingDiff |
This class is used to represent any cylindrical PET scanner.
Inherits from vScanner
Definition at line 21 of file iScannerPET.hh.
iScannerPET constructor. Initialize the member variables to their default values.
Definition at line 31 of file iScannerPET.cc.
iScannerPET destructor.
Definition at line 70 of file iScannerPET.cc.
int iScannerPET::BuildLUT | ( | bool | a_scannerFileIsLUT | ) | [virtual] |
Call the functions to generate the LUT or read the user-made LUT depending on the user choice.
a_scannerFileIsLUT | : boolean indicating if the file describing the SPECT camera is a generic file (0) or custom Look-up-table (1) |
Implements vScanner.
Definition at line 212 of file iScannerPET.cc.
int iScannerPET::CheckParameters | ( | ) | [virtual] |
Check if all parameters have been correctly initialized.
Implements vScanner.
Definition at line 253 of file iScannerPET.cc.
int iScannerPET::ComputeLUT | ( | ) | [private, virtual] |
Compute the LUT of the scanner from a generic (.geom) file.
Read mandatory data from the geom file. Then compute the LUT elements for each crystal from the geometry described in the file
Compute the look-up-tables of the system containing the locations of the scanner elements center in space and their orientations
Reimplemented from vScanner.
Definition at line 473 of file iScannerPET.cc.
int iScannerPET::GetGeometricInfoFromDatafile | ( | string | a_pathToDataFilename | ) | [virtual] |
Retrieve PET geometric informations from the datafile.
Recover the (axial) max ring difference
Implements vScanner.
Definition at line 1430 of file iScannerPET.cc.
int iScannerPET::GetLayer | ( | int | a_idx | ) | [private] |
Get the layer from which the 'a_index' crystal belongs to.
a_idx | : index of the crystal in the loaded LUT |
Definition at line 1296 of file iScannerPET.cc.
int iScannerPET::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 |
||
) | [virtual] |
Get the central positions and orientations of the scanner elements from their indices.
a_index1 | : index of the 1st crystal |
a_index2 | : index of the 2nd crystal |
ap_Position1[3] | : x,y,z cartesian position of center of the 1st crystal |
ap_Position2[3] | : x,y,z cartesian position of center of the 2nd crystal |
ap_Orientation1[3] | : x,y,z components of the orientation vector related to the 1st crystal |
ap_Orientation2[3] | : x,y,z components of the orientation vector related to the 2nd crystal |
ap_POI1 | : x,y,z components of the Point Of Interation related to the 1st crystal |
ap_POI2 | : x,y,z components of the Point Of Interation related to the 2nd crystal |
This method is very general and is used by the vProjector. From these positions and orientations, other methods can be used by specific projectors to get specific positions. Position calculations include POI and mean depth of interaction
Implements vScanner.
Definition at line 970 of file iScannerPET.cc.
int iScannerPET::GetPositionWithRandomDepth | ( | int | a_index1, |
int | a_index2, | ||
FLTNB | ap_Position1[3], | ||
FLTNB | ap_Position2[3] | ||
) | [virtual] |
Get the positions and orientations of scanner elements from their indices, with a random depth.
a_index1 | : index of the 1st crystal |
a_index2 | : index of the 2nd crystal |
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) |
Method for testing purposes. Does not include POI and mean depth of interaction
Implements vScanner.
Definition at line 1207 of file iScannerPET.cc.
int iScannerPET::GetRdmPositionsAndOrientations | ( | int | a_index1, |
int | a_index2, | ||
FLTNB | ap_Position1[3], | ||
FLTNB | ap_Position2[3], | ||
FLTNB | ap_Orientation1[3], | ||
FLTNB | ap_Orientation2[3] | ||
) | [virtual] |
Get random positions of the scanner elements and their orientations from their indices.
a_index1 | : index of the 1st crystal |
a_index2 | : index of the 2nd crystal |
ap_Position1[3] | : x,y,z cartesian position of center of the 1st crystal |
ap_Position2[3] | : x,y,z cartesian position of center of the 2nd crystal |
ap_Orientation1[3] | : x,y,z components of the orientation vector related to the 1st crystal |
ap_Orientation2[3] | : x,y,z components of the orientation vector related to the 2nd crystal |
Position calculations include POI and mean depth of interaction
Implements vScanner.
Definition at line 1093 of file iScannerPET.cc.
int iScannerPET::GetRingID | ( | int | a_idx | ) | [private] |
Get the ring which the #a_idx crystal belongs to.
a_idx | : index of the crystal in the loaded LUT |
Definition at line 1332 of file iScannerPET.cc.
int iScannerPET::GetScannerLayerNbRings | ( | int | a_layer | ) | [inline, virtual] |
Return the number of rings for a specific crystal layer.
a_layer |
Reimplemented from vScanner.
Definition at line 154 of file iScannerPET.hh.
int iScannerPET::GetSystemNbElts | ( | ) | [inline, virtual] |
Implements vScanner.
Definition at line 145 of file iScannerPET.hh.
int iScannerPET::GetTwoCorners | ( | int | a_index1, |
int | a_index2, | ||
FLTNB | ap_CornerInf1[3], | ||
FLTNB | ap_CornerSup1[3], | ||
FLTNB | ap_CornerInf2[3], | ||
FLTNB | ap_CornerSup2[3] | ||
) | [virtual] |
Get the cartesian coordinaters of the two opposite corners of a scanner element.
a_index1 | : index of the 1st crystal |
a_index2 | : index of the 2nd crystal |
ap_CornerInf1[3] | |
ap_CornerSup1[3] | |
ap_CornerInf2[3] | |
ap_CornerSup2[3] |
Implements vScanner.
Definition at line 1257 of file iScannerPET.cc.
int iScannerPET::Initialize | ( | ) | [virtual] |
Check general initialization and set several parameters to their default value.
Implements vScanner.
Definition at line 359 of file iScannerPET.cc.
int iScannerPET::Instantiate | ( | bool | a_scannerFileIsLUT | ) | [virtual] |
Get mandatory informations 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) |
Implements vScanner.
Definition at line 96 of file iScannerPET.cc.
int iScannerPET::IsAvailableLOR | ( | int | a_elt1, |
int | a_elt2 | ||
) | [virtual] |
Check if the LOR formed by the crystalf whose indices are passed in parameters is available according to the scanner restrictions.
a_elt1 | : index of the 1st crystal |
a_elt2 | : index of the 2nd crystal |
This function is dedicated to analytic projection and list-mode sensitivity image generation
The PET implementation checks the LOR availability according to the minimal (transaxial) angle difference and the maximal ring difference between two crystals
Reimplemented from vScanner.
Definition at line 1386 of file iScannerPET.cc.
int iScannerPET::LoadLUT | ( | ) | [private, virtual] |
Load a precomputed scanner LUT.
Read mandatory data from the header of the LUT.
Then load the LUT elements for each crystal
Reimplemented from vScanner.
Definition at line 393 of file iScannerPET.cc.
int iScannerPET::PROJ_GetPETSpecificParameters | ( | int * | ap_maxRingDiff | ) | [virtual] |
Set pointers passed in argument with the related PET specific variables This function is used to recover these values in the datafile object.
ap_maxRingDiff |
Reimplemented from vScanner.
Definition at line 1457 of file iScannerPET.cc.
int iScannerPET::SetPETMaxRingDiff | ( | int | a_maxRingDiff | ) | [inline, virtual] |
Set the maximal ring difference (if any)
a_maxRingDiff |
Reimplemented from vScanner.
Definition at line 183 of file iScannerPET.hh.
void iScannerPET::ShowHelp | ( | ) | [virtual] |
int iScannerPET::m_maxRingDiff [private] |
Maximal ring difference for a specific acquisition
Definition at line 269 of file iScannerPET.hh.
FLTNB iScannerPET::m_minAngleDifference [private] |
Minimal transaxial angle difference for the system
Definition at line 267 of file iScannerPET.hh.
int iScannerPET::m_nbCrystals [private] |
Total number of crystal in the scanner
Definition at line 250 of file iScannerPET.hh.
int iScannerPET::m_nbLayers [private] |
Number of crystal layers in the scanner
Definition at line 249 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_crystalCentralPositionX [private] |
Cartesian coordinate on X-axis of the center of each crystal
Definition at line 254 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_crystalCentralPositionY [private] |
Cartesian coordinate on Y-axis of the center of each crystal
Definition at line 255 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_crystalCentralPositionZ [private] |
Cartesian coordinate on Z-axis of the center of each crystal
Definition at line 256 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_crystalOrientationX [private] |
X-axis orientation of each crystal
Definition at line 258 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_crystalOrientationY [private] |
Y-axis orientation of each crystal
Definition at line 259 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_crystalOrientationZ [private] |
Z-axis orientation of each crystal
Definition at line 260 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_meanDepthOfInteraction [private] |
Mean depth of interaction in a crystal (for each layer)
Definition at line 265 of file iScannerPET.hh.
int* iScannerPET::mp_nbCrystalsInLayer [private] |
Number of crystals (for each layer)
Definition at line 252 of file iScannerPET.hh.
int* iScannerPET::mp_nbRings [private] |
Number of rings (for each layer)
Definition at line 251 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_sizeCrystalAxial [private] |
Axial size of a crystal (for each layer)
Definition at line 263 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_sizeCrystalDepth [private] |
Depth of a crystal (for each layer)
Definition at line 264 of file iScannerPET.hh.
FLTNB* iScannerPET::mp_sizeCrystalTrans [private] |
Transaxial size of a crystal (for each layer)
Definition at line 262 of file iScannerPET.hh.