CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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-2018 all CASToR contributors listed below:
18 
19  --> current contributors: Thibaut MERLIN, Simon STUTE, Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Mael MILLARDET
20  --> past contributors: Valentin VIELZEUF
21 
22 This is CASToR version 2.0.
23 */
24 
31 #ifndef ISCANNERCT_HH
32 #define ISCANNERCT_HH 1
33 
34 #include "gVariables.hh"
35 #include "vScanner.hh"
36 #include "sAddonManager.hh"
37 
45 class iScannerCT : public vScanner
46 {
47  // -------------------------------------------------------------------
48  // Constructor & Destructor
49  public:
54  iScannerCT();
58  ~iScannerCT();
59 
60 
61  // -------------------------------------------------------------------
62  // Public member functions
63  public:
64  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
70  void DescribeSpecific();
79  int Instantiate(bool a_scannerFileIsLUT);
86  int CheckParameters();
92  int Initialize();
100  int BuildLUT( bool a_scannerFileIsLUT );
116  int GetPositionsAndOrientations( int a_index1, int a_index2,
117  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
118  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3],
119  FLTNB* ap_POI1 = NULL, FLTNB* ap_POI2 = NULL );
136  int GetRdmPositionsAndOrientations( int a_index1, int a_index2,
137  FLTNB ap_Position1[3], FLTNB ap_Position2[3],
138  FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3] );
149  int GetPositionWithRandomDepth( int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3] );
162  int GetTwoCorners( int a_index1, int a_index2,
163  FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3],
164  FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3] );
182  int GetEdgesCenterPositions( int a_index1, int a_index2,
183  FLTNB ap_pos_line_point1[3], FLTNB ap_pos_line_point2[3],
184  FLTNB ap_pos_point1_x[4], FLTNB ap_pos_point1_y[4], FLTNB ap_pos_point1_z[4],
185  FLTNB ap_pos_point2_x[4], FLTNB ap_pos_point2_y[4], FLTNB ap_pos_point2_z[4] );
197  int GetGeometricInfoFromDataFile( string a_pathToDF );
204  inline int GetSystemNbElts()
205  {return m_nbPixels;}
211  void ShowHelp();
217  {return m_pixelsSizeTrans;}
223  {return m_pixelsSizeAxial;}
233  int GetCTSpecificParameters( uint16_t* ap_nbOfProjections,
234  FLTNB*& ap_angles,
235  int* ap_detectorRotDirection );
236 
237  // -------------------------------------------------------------------
238  // Private member functions
239  private:
247  int LoadLUT();
256  int ComputeLUT();
257 
258  // -------------------------------------------------------------------
259  // Data members
260  private:
263  uint16_t m_nbOfProjections;
268  uint32_t m_nbPixelsTrans;
272  uint32_t m_nbPixelsAxial;
280  // For the LUT
292 };
293 
294 // 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)
296 
297 #endif
iScannerCT()
iScannerCT constructor. Initialize the member variables to their default values.
Definition: iScannerCT.cc:40
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:385
FLTNB m_spotSizeWidth
Definition: iScannerCT.hh:277
#define FLTNB
Definition: gVariables.hh:81
FLTNB m_detectorDepth
Definition: iScannerCT.hh:276
FLTNB * mp_crystalOrientationZ
Definition: iScannerCT.hh:287
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:641
uint32_t m_nbPixelsTrans
Definition: iScannerCT.hh:268
FLTNB m_CORtoDetectorDistance
Definition: iScannerCT.hh:265
FLTNB * mp_projectionAngles
Definition: iScannerCT.hh:264
FLTNB * mp_sourcePositionX
Definition: iScannerCT.hh:289
#define CLASS_SCANNER(NAME, CLASS)
Definition: vScanner.hh:458
int ComputeLUT()
Computes the LUT of the scanner from a generic (.geom) file.
Definition: iScannerCT.cc:398
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:625
FLTNB * mp_crystalOrientationX
Definition: iScannerCT.hh:285
int Initialize()
Check general initialization and set several parameters to their default value.
Definition: iScannerCT.cc:361
FLTNB GetDetectionElementSizeTrans()
Definition: iScannerCT.hh:216
This class is used to represent any CT camera with either a CBCT ascii description or a LUT file for ...
Definition: iScannerCT.hh:45
FLTNB m_pixelsSizeAxial
Definition: iScannerCT.hh:273
int GetGeometricInfoFromDataFile(string a_pathToDF)
Recover geometric informations specific to the scanner class from the datafile header.
Definition: iScannerCT.cc:743
uint16_t m_nbOfProjections
Definition: iScannerCT.hh:263
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:231
FLTNB m_CORtoSourceDistance
Definition: iScannerCT.hh:266
int CheckParameters()
Check that all parameters have been correctly initialized.
Definition: iScannerCT.cc:279
FLTNB * mp_sourcePositionY
Definition: iScannerCT.hh:290
Declaration of class vScanner.
FLTNB * mp_crystalOrientationY
Definition: iScannerCT.hh:286
FLTNB * mp_crystalCentralPositionX
Definition: iScannerCT.hh:281
uint32_t m_nbPixelsAxial
Definition: iScannerCT.hh:272
void DescribeSpecific()
Implementation of the pure virtual eponym function that simply prints info about the scanner...
Definition: iScannerCT.cc:100
FLTNB m_pixelsSizeTrans
Definition: iScannerCT.hh:269
FLTNB m_gapSizeAxial
Definition: iScannerCT.hh:274
FLTNB m_spotSizeDepth
Definition: iScannerCT.hh:278
int m_nbPixels
Definition: iScannerCT.hh:261
#define FUNCTION_SCANNER(CLASS)
Definition: vScanner.hh:454
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:654
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:668
~iScannerCT()
iScannerCT destructor.
Definition: iScannerCT.cc:75
FLTNB GetDetectionElementSizeAxial()
Definition: iScannerCT.hh:222
FLTNB * mp_crystalCentralPositionY
Definition: iScannerCT.hh:282
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:204
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:548
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:843
int Instantiate(bool a_scannerFileIsLUT)
Get mandatory informations from the scanner file and allocate memory for the member variables...
Definition: iScannerCT.cc:157
FLTNB m_gapSizeTrans
Definition: iScannerCT.hh:270
FLTNB * mp_crystalCentralPositionZ
Definition: iScannerCT.hh:283
Declaration of class sAddonManager.
Generic class for scanner objects.
Definition: vScanner.hh:62
void ShowHelp()
Display help.
Definition: iScannerCT.cc:870
FLTNB * mp_sourcePositionZ
Definition: iScannerCT.hh:291