CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
include/scanner/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 
20 class iScannerPET : public vScanner
21 {
22  // Constructor & Destructor
23  public:
28  iScannerPET();
29 
33  ~iScannerPET();
34 
35 
36  // -------------------------------------------------------------------
37  // Public member functions
38  public:
39  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
45  void DescribeSpecific();
54  int Instantiate(bool a_scannerFileIsLUT);
60  int CheckParameters();
66  int Initialize();
75  int BuildLUT(bool a_scannerFileIsLUT);
93  int GetPositionsAndOrientations( int a_index1, int a_index2,
94  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
95  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3],
96  FLTNB* ap_POI1 = NULL, FLTNB* ap_POI2 = NULL );
115  int GetRdmPositionsAndOrientations( int a_index1, int a_index2,
116  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
117  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3] );
128  int GetPositionWithRandomDepth( int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3] );
141  int GetTwoCorners( int a_index1, int a_index2,
142  FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3],
143  FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3] );
161  int GetEdgesCenterPositions( int a_index1, int a_index2,
162  FLTNB ap_pos_line_point1[3], FLTNB ap_pos_line_point2[3],
163  FLTNB ap_pos_point1_x[4], FLTNB ap_pos_point1_y[4], FLTNB ap_pos_point1_z[4],
164  FLTNB ap_pos_point2_x[4], FLTNB ap_pos_point2_y[4], FLTNB ap_pos_point2_z[4] );
169  inline int GetSystemNbElts()
170  {return m_nbCrystals;};
171 
186  int IsAvailableLOR(int a_elt1, int a_elt2);
193  int GetGeometricInfoFromDataFile(string a_pathToDataFilename);
199  inline int SetPETMaxAxialDiffmm(FLTNB a_maxAxialDiffmm)
200  {m_maxAxialDiffmm = a_maxAxialDiffmm; return 0;}
206  void ShowHelp();
213  {return mp_sizeCrystalTrans[0];}
220  {return mp_sizeCrystalAxial[0];}
221 
222  // -------------------------------------------------------------------
223  // Functions dedicated to Analytic Projection
231  int PROJ_GetPETSpecificParameters(FLTNB* ap_maxAxialDiffmm);
232 
233 
234  // -------------------------------------------------------------------
235  // Private member functions
236  private:
244  int LoadLUT();
254  int ComputeLUT();
261  int GetLayer(int a_idx);
262 
263 
264  // -------------------------------------------------------------------
265  // Data members
266  private:
267  int m_nbLayers;
268  int m_nbCrystals;
269  int* mp_nbCrystalsInLayer;
287 };
288 
289 
290 // 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)
292 
293 #endif
int GetPositionWithRandomDepth(int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3])
int CheckParameters()
Check if all parameters have been correctly initialized.
int Instantiate(bool a_scannerFileIsLUT)
int IsAvailableLOR(int a_elt1, int a_elt2)
#define FUNCTION_SCANNER(CLASS)
int Initialize()
Check general initialization and set several parameters to their default value.
int GetTwoCorners(int a_index1, int a_index2, FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3], FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3])
int SetPETMaxAxialDiffmm(FLTNB a_maxAxialDiffmm)
Declaration of class vScanner.
int GetSystemNbElts()
This is a pure virtual method that must be implemented by children.
int GetRdmPositionsAndOrientations(int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3], FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3])
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])
int GetGeometricInfoFromDataFile(string a_pathToDataFilename)
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)
int PROJ_GetPETSpecificParameters(FLTNB *ap_maxAxialDiffmm)
This class is used to represent any cylindrical PET scanner.
int LoadLUT()
Load a precomputed scanner LUT.
iScannerPET()
iScannerPET constructor. Initialize the member variables to their default values. ...
void ShowHelp()
Display help.
~iScannerPET()
iScannerPET destructor.
int BuildLUT(bool a_scannerFileIsLUT)
void DescribeSpecific()
Implementation of the pure virtual eponym function that simply prints info about the scanner...
Generic class for scanner objects.
#define CLASS_SCANNER(NAME, CLASS)
int ComputeLUT()
Compute the LUT of the scanner from a generic (.geom) file.