CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
iScannerCT.hh
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
30 #ifndef ISCANNERCT_HH
31 #define ISCANNERCT_HH 1
32 
33 #include "gVariables.hh"
34 #include "vScanner.hh"
35 #include "sAddonManager.hh"
36 
44 class iScannerCT : public vScanner
45 {
46  // -------------------------------------------------------------------
47  // Constructor & Destructor
48  public:
53  iScannerCT();
57  ~iScannerCT();
58 
59 
60  // -------------------------------------------------------------------
61  // Public member functions
62  public:
63  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
69  void DescribeSpecific();
78  int Instantiate(bool a_scannerFileIsLUT);
85  int CheckParameters();
91  int Initialize();
99  int BuildLUT( bool a_scannerFileIsLUT );
115  int GetPositionsAndOrientations( int a_index1, int a_index2,
116  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
117  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3],
118  FLTNB* ap_POI1 = NULL, FLTNB* ap_POI2 = NULL );
135  int GetRdmPositionsAndOrientations( int a_index1, int a_index2,
136  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
137  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3] );
148  int GetPositionWithRandomDepth( int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3] );
161  int GetTwoCorners( int a_index1, int a_index2,
162  FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3],
163  FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3] );
181  int GetEdgesCenterPositions( int a_index1, int a_index2,
182  FLTNB ap_pos_line_point1[3], FLTNB ap_pos_line_point2[3],
183  FLTNB ap_pos_point1_x[4], FLTNB ap_pos_point1_y[4], FLTNB ap_pos_point1_z[4],
184  FLTNB ap_pos_point2_x[4], FLTNB ap_pos_point2_y[4], FLTNB ap_pos_point2_z[4] );
196  int GetGeometricInfoFromDataFile( string a_pathToDF );
203  inline int GetSystemNbElts()
204  {return m_nbPixels;}
210  void ShowHelp();
216  {return m_pixelsSizeTrans;}
222  {return m_pixelsSizeAxial;}
232  int GetCTSpecificParameters( uint16_t* ap_nbOfProjections,
233  FLTNB*& ap_angles,
234  int* ap_detectorRotDirection );
235 
236  // -------------------------------------------------------------------
237  // Private member functions
238  private:
246  int LoadLUT();
255  int ComputeLUT();
256 
257  // -------------------------------------------------------------------
258  // Data members
259  private:
262  uint16_t m_nbOfProjections;
267  uint32_t m_nbPixelsTrans;
271  uint32_t m_nbPixelsAxial;
279  // For the LUT
291 };
292 
293 // 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)
295 
296 #endif
iScannerCT()
iScannerCT constructor. Initialize the member variables to their default values.
Definition: iScannerCT.cc:39
This header file is mainly used to declare some macro definitions and all includes needed from the st...
int LoadLUT()
Load a precomputed scanner LUT.
Definition: iScannerCT.cc:384
FLTNB m_spotSizeWidth
Definition: iScannerCT.hh:276
#define FLTNB
Definition: gVariables.hh:81
FLTNB m_detectorDepth
Definition: iScannerCT.hh:275
FLTNB * mp_crystalOrientationZ
Definition: iScannerCT.hh:286
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...
Definition: iScannerCT.cc:640
uint32_t m_nbPixelsTrans
Definition: iScannerCT.hh:267
FLTNB m_CORtoDetectorDistance
Definition: iScannerCT.hh:264
FLTNB * mp_projectionAngles
Definition: iScannerCT.hh:263
FLTNB * mp_sourcePositionX
Definition: iScannerCT.hh:288
#define CLASS_SCANNER(NAME, CLASS)
Definition: vScanner.hh:457
int ComputeLUT()
Computes the LUT of the scanner from a generic (.geom) file.
Definition: iScannerCT.cc:397
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 the focal point and random positions on the crystal surface and its orientations from the event i...
Definition: iScannerCT.cc:624
FLTNB * mp_crystalOrientationX
Definition: iScannerCT.hh:284
int Initialize()
Check general initialization and set several parameters to their default value.
Definition: iScannerCT.cc:360
FLTNB GetDetectionElementSizeTrans()
Definition: iScannerCT.hh:215
This class is used to represent any CT camera with either a CBCT ascii description or a LUT file for ...
Definition: iScannerCT.hh:44
FLTNB m_pixelsSizeAxial
Definition: iScannerCT.hh:272
int GetGeometricInfoFromDataFile(string a_pathToDF)
Recover geometric informations specific to the scanner class from the datafile header.
Definition: iScannerCT.cc:742
uint16_t m_nbOfProjections
Definition: iScannerCT.hh:262
int BuildLUT(bool a_scannerFileIsLUT)
Call the functions to generate the LUT or read the user-made LUT depending on the user choice...
Definition: iScannerCT.cc:230
FLTNB m_CORtoSourceDistance
Definition: iScannerCT.hh:265
int CheckParameters()
Check that all parameters have been correctly initialized.
Definition: iScannerCT.cc:278
FLTNB * mp_sourcePositionY
Definition: iScannerCT.hh:289
Declaration of class vScanner.
FLTNB * mp_crystalOrientationY
Definition: iScannerCT.hh:285
FLTNB * mp_crystalCentralPositionX
Definition: iScannerCT.hh:280
uint32_t m_nbPixelsAxial
Definition: iScannerCT.hh:271
void DescribeSpecific()
Implementation of the pure virtual eponym function that simply prints info about the scanner...
Definition: iScannerCT.cc:99
FLTNB m_pixelsSizeTrans
Definition: iScannerCT.hh:268
FLTNB m_gapSizeAxial
Definition: iScannerCT.hh:273
FLTNB m_spotSizeDepth
Definition: iScannerCT.hh:277
int m_nbPixels
Definition: iScannerCT.hh:260
#define FUNCTION_SCANNER(CLASS)
Definition: vScanner.hh:453
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.
Definition: iScannerCT.cc:653
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])
Implementation of the pure virtual function from vScanner. Get the cartesian coordinaters of the ce...
Definition: iScannerCT.cc:667
~iScannerCT()
iScannerCT destructor.
Definition: iScannerCT.cc:74
FLTNB GetDetectionElementSizeAxial()
Definition: iScannerCT.hh:221
FLTNB * mp_crystalCentralPositionY
Definition: iScannerCT.hh:281
int GetSystemNbElts()
Get the number of elements in the system. For a CT system, returns the number of pixels in the detect...
Definition: iScannerCT.hh:203
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)
This is a pure virtual method that must be implemented by children. Get the central positions and o...
Definition: iScannerCT.cc:547
int GetCTSpecificParameters(uint16_t *ap_nbOfProjections, FLTNB *&ap_angles, int *ap_detectorRotDirection)
Set pointers passed in argument with the related CT specific variables This function is used to rec...
Definition: iScannerCT.cc:842
int Instantiate(bool a_scannerFileIsLUT)
Get mandatory informations from the scanner file and allocate memory for the member variables...
Definition: iScannerCT.cc:156
FLTNB m_gapSizeTrans
Definition: iScannerCT.hh:269
FLTNB * mp_crystalCentralPositionZ
Definition: iScannerCT.hh:282
Declaration of class sAddonManager.
Generic class for scanner objects.
Definition: vScanner.hh:61
void ShowHelp()
Display help.
Definition: iScannerCT.cc:869
FLTNB * mp_sourcePositionZ
Definition: iScannerCT.hh:290