CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
iScannerPET.hh
Go to the documentation of this file.
1 
8 #ifndef ISCANNERPET_HH
9 #define ISCANNERPET_HH 1
10 
11 #include "gVariables.hh"
12 #include "vScanner.hh"
13 #include "sAddonManager.hh"
14 
15 
21 class iScannerPET : public vScanner
22 {
23  // Constructor & Destructor
24  public:
29  iScannerPET();
30 
34  ~iScannerPET();
35 
36 
37  // -------------------------------------------------------------------
38  // Public member functions
39  public:
40  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
51  int Instantiate(bool a_scannerFileIsLUT);
57  int CheckParameters();
63  int Initialize();
72  int BuildLUT(bool a_scannerFileIsLUT);
90  int GetPositionsAndOrientations( int a_index1, int a_index2,
91  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
92  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3],
93  FLTNB* ap_POI1 = NULL, FLTNB* ap_POI2 = NULL );
112  int GetRdmPositionsAndOrientations( int a_index1, int a_index2,
113  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
114  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3] );
125  int GetPositionWithRandomDepth( int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3] );
138  int GetTwoCorners( int a_index1, int a_index2,
139  FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3],
140  FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3] );
145  inline int GetSystemNbElts()
146  {return m_nbCrystals;};
154  inline int GetScannerLayerNbRings(int a_layer)
155  {return (a_layer<m_nbLayers) ? mp_nbRings[a_layer] : -1;}
170  int IsAvailableLOR(int a_elt1, int a_elt2);
177  int GetGeometricInfoFromDatafile(string a_pathToDataFilename);
183  inline int SetPETMaxRingDiff(int a_maxRingDiff)
184  {m_maxRingDiff = a_maxRingDiff; return 0;}
190  void ShowHelp();
191 
192 
193  // -------------------------------------------------------------------
194  // Functions dedicated to Analytic Projection
202  int PROJ_GetPETSpecificParameters(int* ap_maxRingDiff);
203 
204 
205  // -------------------------------------------------------------------
206  // Private member functions
207  private:
215  int LoadLUT();
225  int ComputeLUT();
232  int GetLayer(int a_idx);
243  int GetRingID(int a_idx);
244 
245 
246  // -------------------------------------------------------------------
247  // Data members
248  private:
251  int* mp_nbRings;
270 };
271 
272 
273 // Class for automatic insertion (set here the visible scanner type name, put the class name as the parameters and do not add semi-colon at the end of the line)
275 
276 #endif
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...
This header file is mainly used to declare some macro definitions and all includes needed from the st...
int CheckParameters()
Check if all parameters have been correctly initialized.
Definition: iScannerPET.cc:250
int GetRingID(int a_idx)
Get the ring which the #a_idx crystal belongs to.
FLTNB * mp_sizeCrystalAxial
Definition: iScannerPET.hh:263
int Instantiate(bool a_scannerFileIsLUT)
Get mandatory informations from the scanner file and allocate memory for the member variables...
Definition: iScannerPET.cc:83
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...
#define FLTNB
Definition: gVariables.hh:55
FLTNB * mp_crystalOrientationX
Definition: iScannerPET.hh:258
int Initialize()
Check general initialization and set several parameters to their default value.
Definition: iScannerPET.cc:339
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.
FLTNB m_minAngleDifference
Definition: iScannerPET.hh:267
FLTNB * mp_crystalOrientationY
Definition: iScannerPET.hh:259
int GetSystemNbElts()
Definition: iScannerPET.hh:145
#define CLASS_SCANNER(NAME, CLASS)
Definition: vScanner.hh:383
FLTNB * mp_meanDepthOfInteraction
Definition: iScannerPET.hh:265
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.
FLTNB * mp_crystalOrientationZ
Definition: iScannerPET.hh:260
FLTNB * mp_crystalCentralPositionZ
Definition: iScannerPET.hh:256
int GetScannerLayerNbRings(int a_layer)
Return the number of rings for a specific crystal layer.
Definition: iScannerPET.hh:154
int SetPETMaxRingDiff(int a_maxRingDiff)
Set the maximal ring difference (if any)
Definition: iScannerPET.hh:183
Declaration of class vScanner.
int GetLayer(int a_idx)
Get the layer from which the 'a_index' crystal belongs to.
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.
Definition: iScannerPET.cc:957
FLTNB * mp_sizeCrystalDepth
Definition: iScannerPET.hh:264
This class is used to represent any cylindrical PET scanner.
Definition: iScannerPET.hh:21
int GetGeometricInfoFromDatafile(string a_pathToDataFilename)
Retrieve PET geometric informations from the datafile.
FLTNB * mp_crystalCentralPositionY
Definition: iScannerPET.hh:255
#define FUNCTION_SCANNER(CLASS)
Definition: vScanner.hh:379
int LoadLUT()
Load a precomputed scanner LUT.
Definition: iScannerPET.cc:374
iScannerPET()
iScannerPET constructor. Initialize the member variables to their default values. ...
Definition: iScannerPET.cc:28
void ShowHelp()
Display help.
FLTNB * mp_crystalCentralPositionX
Definition: iScannerPET.hh:254
FLTNB * mp_sizeCrystalTrans
Definition: iScannerPET.hh:262
~iScannerPET()
iScannerPET destructor.
Definition: iScannerPET.cc:60
int PROJ_GetPETSpecificParameters(int *ap_maxRingDiff)
Set pointers passed in argument with the related PET specific variables This function is used to reco...
int BuildLUT(bool a_scannerFileIsLUT)
Call the functions to generate the LUT or read the user-made LUT depending on the user choice...
Definition: iScannerPET.cc:208
Declaration of class sAddonManager.
Generic class for scanner objects.
Definition: vScanner.hh:48
int * mp_nbCrystalsInLayer
Definition: iScannerPET.hh:252
int * mp_nbRings
Definition: iScannerPET.hh:251
int ComputeLUT()
Compute the LUT of the scanner from a generic (.geom) file.
Definition: iScannerPET.cc:455