![]() |
CASToR
1.0
Tomographic Reconstruction (PET/SPECT)
|
00001 00008 #ifndef ISCANNERSPECTConv_HH 00009 #define ISCANNERSPECTConv_HH 1 00010 00011 #include "gVariables.hh" 00012 #include "vScanner.hh" 00013 #include "sAddonManager.hh" 00014 00015 00022 class iScannerSPECTConv : public vScanner 00023 { 00024 // ------------------------------------------------------------------- 00025 // Constructor & Destructor 00026 public: 00031 iScannerSPECTConv(); 00035 ~iScannerSPECTConv(); 00036 00037 00038 // ------------------------------------------------------------------- 00039 // Public member functions 00040 public: 00041 // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line) 00042 FUNCTION_SCANNER(iScannerSPECTConv) 00051 int Instantiate(bool a_scannerFileIsLUT); 00058 int CheckParameters(); 00064 int Initialize(); 00072 int BuildLUT( bool a_scannerFileIsLUT ); 00088 int GetPositionsAndOrientations( int a_index1, int a_index2, 00089 FLTNB ap_Position1[3], FLTNB ap_Position2[3], 00090 FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3], 00091 FLTNB* ap_POI1 = NULL, FLTNB* ap_POI2 = NULL ); 00108 int GetRdmPositionsAndOrientations( int a_index1, int a_index2, 00109 FLTNB ap_Position1[3], FLTNB ap_Position2[3], 00110 FLTNB ap_Orientation1[3], FLTNB ap_Orientation2[3] ); 00121 int GetPositionWithRandomDepth( int a_index1, int a_index2, FLTNB ap_Position1[3], FLTNB ap_Position2[3] ); 00134 int GetTwoCorners( int a_index1, int a_index2, 00135 FLTNB ap_CornerInf1[3], FLTNB ap_CornerSup1[3], 00136 FLTNB ap_CornerInf2[3], FLTNB ap_CornerSup2[3] ); 00148 int GetGeometricInfoFromDatafile( string a_pathToDF ); 00155 inline int GetSystemNbElts() 00156 {return m_nbCrystals;} 00162 void ShowHelp(); 00163 00164 00165 // ------------------------------------------------------------------- 00166 // Functions dedicated to Analytic Projection 00167 public: 00177 inline int IsAvailableLOR(int a_elt1, int a_elt2) 00178 {return 1;}; 00192 int GetSPECTSpecificParameters( uint16_t* ap_nbOfProjections, 00193 uint16_t* ap_nbHeads, 00194 uint16_t* ap_nbOfBins, 00195 FLTNB* ap_pixSizeXY, 00196 FLTNB*& ap_angles, 00197 FLTNB*& ap_CORtoDetectorDistance, 00198 int* ap_headRotDirection); 00205 int PROJ_SetSPECTAngles(FLTNB* ap_projectionAngles); 00213 int PROJ_SetSPECTCORtoDetectorDistance(FLTNB a_distance); 00218 inline uint16_t PROJ_GetSPECTNbProjections() 00219 {return m_nbOfProjections;} 00224 inline uint16_t PROJ_GetSPECTNbPixels() 00225 {return m_vNbPixelsTrans*m_vNbPixelsAxial;} 00231 int PROJ_GetSPECTNbBins(uint16_t* ap_nbOfBins); 00238 int PROJ_SetSPECTNbBins(uint16_t* ap_nbOfBins); 00245 int PROJ_SetSPECTNbProjections(uint32_t a_nbOfProjections); 00252 int PROJ_SetSPECTRotDirection( string a_rotDirection ); 00253 00254 // ------------------------------------------------------------------- 00255 // Private member functions 00256 private: 00264 int LoadLUT(); 00273 int ComputeLUT(); 00290 int ComputeFocalPositions( FLTNB a_posX, FLTNB a_posY, FLTNB a_posZ, int a_headID, int a_cryID ); 00291 00292 00293 // ------------------------------------------------------------------- 00294 // Data members 00295 private: 00296 int m_nbCrystals; 00297 int m_nbHeads; 00299 uint16_t mp_nbOfBins[2]; 00300 uint16_t m_nbOfProjections; 00302 FLTNB* mp_projectionAngles; 00303 FLTNB* mp_CORtoDetectorDistance; 00304 FLTNB* mp_radius; 00305 int m_rotDirection; 00307 uint32_t m_nbPixelsTrans; 00308 FLTNB m_pixelsSizeTrans; 00309 FLTNB m_gapSizeTrans; 00311 uint32_t m_nbPixelsAxial; 00312 FLTNB m_pixelsSizeAxial; 00313 FLTNB m_gapSizeAxial; 00315 uint32_t m_vNbPixelsTrans; 00316 uint32_t m_vNbPixelsAxial; 00318 FLTNB m_vPixelsSizeTrans; 00319 FLTNB m_vPixelsSizeAxial; 00321 FLTNB m_crystalDepth; 00323 string* mp_focalModelTrans; 00324 uint8_t* mp_nbCoefModelTrans; 00325 FLTNB** m2p_transFocalParameters; 00327 string* mp_focalModelAxial; 00328 uint8_t* mp_nbCoefModelAxial; 00329 FLTNB** m2p_axialFocalParameters; 00331 FLTNB* mp_crystalCentralPositionX; 00332 FLTNB* mp_crystalCentralPositionY; 00333 FLTNB* mp_crystalCentralPositionZ; 00335 FLTNB* mp_crystalOrientationX; 00336 FLTNB* mp_crystalOrientationY; 00337 FLTNB* mp_crystalOrientationZ; 00339 FLTNB* mp_crystalFocalPositionX; 00340 FLTNB* mp_crystalFocalPositionY; 00341 FLTNB* mp_crystalFocalPositionZ; 00342 }; 00343 00344 00345 // 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) 00346 CLASS_SCANNER(SPECT_CONVERGENT,iScannerSPECTConv) 00347 00348 #endif