142 Cout(
"iScannerCT::DescribeSpecific() -> Here is some specific content of the SPECT convergent camera" << endl);
148 Cout(
" --> Total number of transaxial bins: " <<
mp_nbOfBins[0] << endl);
157 Cout(
" --> Projection angles (degree): "<< endl);
161 Cout(
" Head #"<<h<<
": "<< endl);
164 if( (nb_projections_by_head) > 10)
166 while ( pr< (h+1)*nb_projections_by_head-1
169 for (
int p=0 ; p<10 ; p++)
171 if(pr == (h+1)*nb_projections_by_head
182 for (
int p = h*nb_projections_by_head ; p<(h+1)*nb_projections_by_head ; p++)
194 Cout(
" --> Distance between the center of rotation and the detector surface: "<< endl);
198 Cout(
" Head #"<<h<<
": "<< endl);
201 if( (nb_projections_by_head) > 10)
203 while ( pr< (h+1)*nb_projections_by_head-1
206 for (
int p=0 ; p<10 ; p++)
208 if(pr == (h+1)*nb_projections_by_head
219 for (
int p = h*nb_projections_by_head ; p<(h+1)*nb_projections_by_head ; p++)
230 Cout(
" --> Default radius for each head: " << endl);
236 Cout(
" --> Total number of transaxial pixels as defined in the system file: " <<
m_nbPixelsTrans << endl);
238 Cout(
" --> Gap size between each transaxial pixe as defined in the system file: " <<
m_gapSizeTrans << endl);
239 Cout(
" --> Total number of axial pixels as defined in the system file: " <<
m_nbPixelsAxial << endl);
241 Cout(
" --> Gap size between each axial pixel as defined in the system file: " <<
m_gapSizeAxial << endl);
242 Cout(
" --> Number of transaxial virtual pixels (pixels actually used in reconstruction): " <<
m_vNbPixelsTrans << endl);
243 Cout(
" --> Number of axial virtual pixels (pixels actually used in reconstruction): " <<
m_vNbPixelsAxial << endl);
244 Cout(
" --> Transaxial size of virtual pixels (pixels actually used in reconstruction): " <<
m_vPixelsSizeTrans << endl);
245 Cout(
" --> Axial size of virtual pixels (pixels actually used in reconstruction): " <<
m_vPixelsSizeAxial << endl);
247 Cout(
" --> Focal models parameters: "<< endl);
251 Cout(
" For head #"<<h<<
":" << endl);
256 Cout(
" Coefficients: ");
265 Cout(
" Coefficients: ");
286 if (
m_verbose>=
VERBOSE_NORMAL)
Cout(
"iScannerSPECTConv::Instantiate() -> Create scanner structure and read parameters from configuration file"<< endl);
295 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the number of SPECT heads !" << endl);
311 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the number of SPECT heads !" << endl);
316 Cerr(
"***** iScannerSPECTConv::Instantiate() -> Scanner radius <= 0. ? really ? :) ... " << endl);
322 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the transaxial number of pixels !" << endl);
327 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the transaxial pixel size !" << endl);
332 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the axial number of pixels !" << endl);
337 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the axial pixel size !" << endl);
342 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read detector depth !" << endl);
347 string *head_name =
new string[ m_nbHeads + 1 ];
350 ostringstream oss( ostringstream::out );
351 oss <<
"head" << i+1;
352 head_name[ i ] = oss.str();
361 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read transaxial focal model of head " << i <<
" !" << endl);
366 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read transaxial number of coef model of head " << i <<
" !" << endl);
371 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read axial focal model of head " << i <<
" !" << endl);
376 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read axial number of coef model of head " << i <<
" !" << endl);
383 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read transaxial model parameters of head " << i <<
" !" << endl);
388 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read axial model parameters of head " << i <<
" !" << endl);
397 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the multiple bed displacement in the scanner header file !" << endl);
424 if (
m_verbose>=
VERBOSE_NORMAL)
Cout(
"iScannerSPECTConv::BuildLUT -> Build LUT for scanner elements coordinates and orientations"<< endl);
431 Cerr(
"***** iScannerSPECTConv::BuildLUT() -> Transaxial or axial number of pixels in the geometric file should be >0 !" << endl);
452 if (!a_scannerFileIsLUT)
456 Cerr(
"***** iScannerSPECTConv::BuildLUT() -> A problem occurred while generating scanner LUT !" << endl);
464 Cerr(
"***** iScannerSPECTConv::BuildLUT() -> A problem occurred while loading scanner LUT !" << endl);
490 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of crystals has not been initialized !" <<endl);
495 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of heads in the SPECT system has not been initialized !" <<endl);
500 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of projection angles has not been initialized !" <<endl);
505 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of transaxial/axial pixels have not correctly been initialized ! (should be >0)" <<endl);
510 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial pixel sizes have not correctly been initialized ! (should be >0)" <<endl);
515 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial number of virtual pixels have not correctly been initialized ! (should be >0)" <<endl);
520 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial virtual pixel sizes have not correctly been initialized ! (should be >0)" <<endl);
525 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial pixel gap sizes have not correctly been initialized ! (should be >0)" <<endl);
531 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Crystal depth has not correctly been initialized ! (should be >0)" <<endl);
536 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial focal models have not correctly been initialized !" <<endl);
541 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of coefficients for the transaxial/axial focal models have not correctly been initialized !" <<endl);
546 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Parameters for the transaxial/axial focal models have not correctly been initialized !" <<endl);
551 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Projection angles have not correctly been initialized !" <<endl);
556 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Default scanner radius for each detector heads (scanner file) not correctly initialized !" <<endl);
561 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Distances between center of rotation and each detector heads have not correctly been initialized !" <<endl);
568 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> LUT elements (crystal central positions) have not correctly been initialized !" <<endl);
575 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> LUT elements (crystal orientations) have not correctly been initialized !" <<endl);
582 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> LUT elements (crystal focal positions) have not correctly been initialized !" <<endl);
606 if (
m_verbose>=
VERBOSE_NORMAL)
Cout(
"iScannerSPECTConv::Initialize() -> Initialize remaining stuff for scanner to be ready"<< endl);
611 Cerr(
"***** iScannerSPECTConv::Initialize() -> Parameters have not been checked !" << endl);
635 Cerr(
"iScannerSPECTConv::LoadLUT() -> Not yet implemented !" << endl);
664 FLTNB *CORx, *CORy, *CORz;
665 FLTNB *head_angleX, *head_angleY, *head_angleZ;
692 crystal_center_ref[c] =
new oMatrix(3,1);
695 for(
int i=0 ; i<3 ; i++)
699 for(
int j=0 ; j<3 ; j++)
711 rotation_mtx[i] =
new oMatrix(3,3);
728 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An error occurred while trying to read the transaxial gap size !" << endl);
733 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An error occurred while trying to read the axial gap size !" << endl);
739 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> Crystal gap sizes cannot be negative !" << endl);
749 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> Number of bins provided in the datafile header while the scanner is not a monolithic crystal !" << endl);
755 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> Positive crystal gap sizes has no sense with monolithic crystals !" << endl);
761 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An acquisition zoom less than 1 has no sense !" << endl);
777 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An acquisition zoom has no sense with pixelated detectors !" << endl);
797 crystal_center_ref[ii + m_vNbPixelsTrans * jj]->
SetMatriceElt(0,0,Xcrist);
798 crystal_center_ref[ii + m_vNbPixelsTrans * jj]->
SetMatriceElt(1,0, 0);
799 crystal_center_ref[ii + m_vNbPixelsTrans * jj]->
SetMatriceElt(2,0,Zcrist);
820 int cryID = a*m_nbCrystals + c;
822 rotation_mtx[a]->
Multiplication(crystal_center_ref[c], crystal_center_out);
829 crystal_center_ref[c]->GetMatriceElt(1,0),
830 crystal_center_ref[c]->GetMatriceElt(2,0),
834 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An error occurred while computing the focal positions ! " << endl);
848 rotation_mtx[a]->
Multiplication(focal_projection_position_mtx, focal_projection_position_mtx_output);
861 delete[] rotation_mtx;
862 for (
int c=0; c<
m_nbCrystals; c++)
delete crystal_center_ref[c];
863 delete[] crystal_center_ref;
864 delete crystal_center_out;
865 delete focal_projection_position_mtx;
866 delete focal_projection_position_mtx_output;
867 delete[] head_angleX;
868 delete[] head_angleY;
869 delete[] head_angleZ;
919 FLTNB focal_posZ = 0;
930 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the axial model should be <4 (max : polynom order 2 = 3 coeffs) ! " << endl);
935 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the axial model should be >0 ('axial number of coef model' in geom file) ! " << endl);
950 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for a slanthole model should be equal to 1 (slope) : 'axial number of coef model' in geom file ! " << endl);
960 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
965 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
970 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
976 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, current model " <<
mp_focalModelAxial[a_headID] <<
" is unknown !" << endl);
977 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Should be either 'constant' (parallel), 'polynomial', 'hyperbolic, or 'custom'" << endl);
995 FLTNB focal_posX = 0;
1006 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the trans model should be <4 (max : polynom order 2 = 3 coeffs) ! " << endl);
1011 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the axial model should be >0 ('trans number of coef model' in geom file) ! " << endl);
1026 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for a slanthole model should be equal to 1 (slope) : 'trans number of coef model' in geom file ! " << endl);
1036 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
1041 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
1046 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
1052 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, current model " <<
mp_focalModelTrans[a_headID] <<
" is unknown !" << endl);
1053 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Should be either 'constant' (parallel), 'polynomial', 'hyperbolic, or 'custom'" << endl);
1066 FLTNB ap_Position1[3],
FLTNB ap_Position2[3],
1067 FLTNB ap_Orientation1[3],
FLTNB ap_Orientation2[3],
1077 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Projection index (" << a_index1 <<
") out of range [0:" <<
m_nbOfProjections-1 <<
"] !" << endl);
1084 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Crystal index (" << a_index2 <<
") out of range [0:" <<
m_nbCrystals-1 <<
"] !" << endl);
1112 else if (ap_POI2[2]<0.)
1114 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> POI management not implemented yet for SPECT !" << endl);
1118 else if (ap_POI2[0]==0. && ap_POI2[1]==0.)
1120 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> POI management not implemented yet for SPECT !" << endl);
1126 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> POI management not implemented yet for SPECT !" << endl);
1147 FLTNB ap_Position1[3],
FLTNB ap_Position2[3],
1148 FLTNB ap_Orientation1[3],
FLTNB ap_Orientation2[3] )
1157 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Projection index (" << a_index1 <<
") out of range [0:" <<
m_nbOfProjections-1 <<
"] !" << endl);
1164 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Crystal index (" << a_index2 <<
") out of range [0:" <<
m_nbCrystals-1 <<
"] !" << endl);
1187 ap_Position2[2] =
mp_crystalCentralPositionZ[index] + axial*sqrt(1-mp_crystalOrientationZ[index]*mp_crystalOrientationZ[index]);
1190 ap_Orientation1[0] = -1.;
1191 ap_Orientation1[1] = -1.;
1192 ap_Orientation1[2] = -1.;
1195 ap_Orientation2[2] = mp_crystalOrientationZ[a_index2];
1209 Cerr(
"***** iScannerSPECTConv::GetPositionWithRandomDepth() -> This function was implemented for PET testing purpose. Not implemented for SPECT !" << endl);
1219 FLTNB ap_CornerInf1[3],
FLTNB ap_CornerSup1[3],
1220 FLTNB ap_CornerInf2[3],
FLTNB ap_CornerSup2[3])
1223 Cerr(
"***** iScannerSPECTConv::GetTwoCorners() -> Not implemented yet !" << endl);
1233 FLTNB ap_pos_line_point1[3],
FLTNB ap_pos_line_point2[3],
1234 FLTNB ap_pos_point1_x[4],
FLTNB ap_pos_point1_y[4],
FLTNB ap_pos_point1_z[4],
1235 FLTNB ap_pos_point2_x[4],
FLTNB ap_pos_point2_y[4],
FLTNB ap_pos_point2_z[4]
1239 Cerr(
"***** iScannerSPECTConv::GetEdgesCenterPositions() -> Not implemented yet !" << endl);
1270 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading number of bins in the header data file " << endl);
1276 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading acquisition zoom in the header data file " << endl);
1282 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading number of projections in the header data file " << endl);
1286 string rotation_direction =
"";
1289 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading head rotation orientation in the header data file " << endl);
1295 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() ->Error occurred while trying to initialize head rotation orientation " << endl);
1301 FLTNB first_and_last_angles[2] = {-1.,-1.};
1310 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading Angle mandatory field in the header data file '" << endl);
1320 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading Angles field in the header data file !'" << endl);
1326 (first_and_last_angles[0] <0 || first_and_last_angles[1] <0) )
1328 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> No information on projection angles provided in the datafile !'" << endl);
1329 Cerr(
" This information should be provided using either the 'Angles' tag, or both 'First angles', 'Last angles' tags !'" << endl);
1335 while (first_and_last_angles[0]>=360.) first_and_last_angles[0] -= 360.;
1336 while (first_and_last_angles[0]<0.) first_and_last_angles[0] += 360.;
1337 while (first_and_last_angles[1]>=360.) first_and_last_angles[1] -= 360.;
1338 while (first_and_last_angles[1]<0.) first_and_last_angles[1] += 360.;
1342 FLTNB angle_increment = dir*(first_and_last_angles[1] - first_and_last_angles[0]);
1343 while (angle_increment>=360.) angle_increment -= 360.;
1344 while (angle_increment<0.) angle_increment += 360.;
1349 angles[a] = first_and_last_angles[0] + dir * angle_increment * ((
FLTNB)a);
1350 while (angles[a]>=360.) angles[a] -= 360.;
1351 while (angles[a]<0.) angles[a] += 360.;
1354 angles[m_nbOfProjections-1] = first_and_last_angles[1];
1370 for(
int a=0 ; a<m_nbOfProjections/
m_nbHeads ; a++)
1380 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading the distance between the camera detectors to the center of rotation in the header data file " << endl);
1384 else if (read_flag==2)
1394 else if(read_flag==1)
1397 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading the global distance between the camera detectors to the center of rotation in the header data file " << endl);
1400 else if (read_flag==2)
1404 for(
int a=0 ; a<m_nbOfProjections/
m_nbHeads ; a++)
1420 uint16_t* ap_nbHeads,
1421 FLTNB* ap_acquisitionZoom,
1422 uint16_t* ap_nbOfBins,
1423 FLTNB* ap_pixSizeXY,
1425 FLTNB*& ap_CORtoDetectorDistance,
1426 int* ap_headRotDirection)
1434 Cerr(
"***** iScannerSPECTConv::GetSPECTSpecificParameters() -> Parameters have not been checked !" << endl);
1471 Cerr(
"***** iScannerSPECTConv::PROJ_SetSPECTAngles -> Error number of projection should be >0 ! '" << endl);
1505 Cerr(
"***** iScannerSPECTConv::PROJ_SetSPECTCORtoDetectorDistance -> Error number of projection should be >0 ! '" << endl);
1558 for(
int i=0 ; i<2 ; i++)
1593 cout <<
"This scanner class is dedicated to the description of parallel, convergent and multi-convergent SPECT systems." << endl;
static sScannerManager * GetInstance()
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
static sRandomNumberGenerator * GetInstance()
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
#define VERBOSE_DEBUG_EVENT
string * mp_focalModelAxial
FLTNB * mp_crystalOrientationY
FLTNB * mp_crystalCentralPositionX
uint16_t m_nbOfProjections
uint32_t m_vNbPixelsTrans
FLTNB * mp_crystalFocalPositionZ
int GetSPECTSpecificParameters(uint16_t *ap_nbOfProjections, uint16_t *ap_nbHeads, FLTNB *ap_acquisitionZoom, uint16_t *ap_nbOfBins, FLTNB *ap_pixSizeXY, FLTNB *&ap_angles, FLTNB *&ap_CORtoDetectorDistance, int *ap_headRotDirection)
Set pointers passed in argument with the related SPECT specific variables This function is used to ...
FLTNB m_defaultBedDisplacementInMm
FLTNB ** m2p_axialFocalParameters
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...
void DescribeSpecific()
Implementation of the pure virtual eponym function that simply prints info about the scanner...
uint32_t m_vNbPixelsAxial
FLTNB ** m2p_transFocalParameters
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...
string GetPathToScannerFile()
void ShowHelp()
Display help.
int GetGeometricInfoFromDataFile(string a_pathToDF)
Recover geometric informations specific to the scanner class from the datafile header.
int PROJ_SetSPECTCORtoDetectorDistance(FLTNB a_distance)
Set distance between the center of rotation and SPECT detectors if arg value>0, Set with the geomet...
FLTNB * mp_crystalCentralPositionY
iScannerSPECTConv()
iScannerSPECTConv constructor. Initialize the member variables to their default values.
int PROJ_SetSPECTAngles(FLTNB *ap_projectionAngles)
Set the projection angles with the array provided in parameter.
#define SCANNER_SPECT_CONVERGENT
int ComputeLUT()
Computes the LUT of the scanner from a generic (.geom) file.
uint8_t * mp_nbCoefModelTrans
#define VERBOSE_DEBUG_LIGHT
virtual int SetRotDirection(string a_rotDirection)
Set rotation direction of the system.
FLTNB * mp_CORtoDetectorDistance
int ReadDataASCIIFile(const string &a_file, const string &a_keyword, T *ap_return, int a_nbElts, bool a_mandatoryFlag)
Look for "a_nbElts" elts in the "a_file" file matching the "a_keyword" string passed as parameter a...
Singleton class that Instantiate and initialize the scanner object.
Declaration of class sScannerManager.
Declaration of class iScannerSPECTConv.
int BuildLUT(bool a_scannerFileIsLUT)
Call the functions to generate the LUT or read the user-made LUT depending on the user choice...
HPFLTNB GenerateRdmNber()
Generate a random number for the thread which index is recovered from the OpenMP function.
HPFLTNB GetMatriceElt(uint16_t l, uint16_t c)
bool m_allParametersChecked
#define KEYWORD_MANDATORY
string * mp_focalModelTrans
FLTNB * mp_crystalOrientationZ
Singleton class that generate a thread-safe random generator number for openMP As singleton...
FLTNB * mp_projectionAngles
int ComputeFocalPositions(FLTNB a_posX, FLTNB a_posY, FLTNB a_posZ, int a_headID, int a_cryID)
Compute focal positions for a specific crystal ID.
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. Not yet implemented for the SPECT conver...
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...
Declaration of class sOutputManager.
uint8_t * mp_nbCoefModelAxial
int Initialize()
Check general initialization and set several parameters to their default value.
Structure designed for basic matrices operations.
int PROJ_SetSPECTNbBins(uint16_t *ap_nbOfBins)
Set number of bins.
int CheckParameters()
Check that all parameters have been correctly initialized.
int PROJ_SetSPECTNbProjections(uint32_t a_nbOfProjections)
Set number of projections.
FLTNB * mp_crystalCentralPositionZ
#define DEBUG_VERBOSE(IGNORED1, IGNORED2)
int PROJ_GetSPECTNbBins(uint16_t *ap_nbOfBins)
Get the number of SPECT heads in the pointer provided in parameter.
int Instantiate(bool a_scannerFileIsLUT)
Get mandatory informations from the scanner file and allocate memory for the member variables...
~iScannerSPECTConv()
iScannerSPECTConv destructor.
FLTNB * mp_crystalOrientationX
int Multiplication(oMatrix *ap_Mtx, oMatrix *ap_MtxResult)
Multiply the member matrix with the matrix provided in 1st parameter Return the result in the matric ...
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 * mp_crystalFocalPositionY
int SetMatriceElt(uint16_t l, uint16_t c, HPFLTNB a_val)
Set the matrix element corresponding to the argument indices with the provided value.
FLTNB * mp_crystalFocalPositionX
Generic class for scanner objects.
int LoadLUT()
Load a precomputed scanner LUT.
#define VERBOSE_DEBUG_NORMAL