143 Cout(
"iScannerCT::DescribeSpecific() -> Here is some specific content of the SPECT convergent camera" << endl);
149 Cout(
" --> Total number of transaxial bins: " <<
mp_nbOfBins[0] << endl);
158 Cout(
" --> Projection angles (degree): "<< endl);
162 Cout(
" Head #"<<h<<
": "<< endl);
165 if( (nb_projections_by_head) > 10)
167 while ( pr< (h+1)*nb_projections_by_head-1
170 for (
int p=0 ; p<10 ; p++)
172 if(pr == (h+1)*nb_projections_by_head
183 for (
int p = h*nb_projections_by_head ; p<(h+1)*nb_projections_by_head ; p++)
195 Cout(
" --> Distance between the center of rotation and the detector surface: "<< endl);
199 Cout(
" Head #"<<h<<
": "<< endl);
202 if( (nb_projections_by_head) > 10)
204 while ( pr< (h+1)*nb_projections_by_head-1
207 for (
int p=0 ; p<10 ; p++)
209 if(pr == (h+1)*nb_projections_by_head
220 for (
int p = h*nb_projections_by_head ; p<(h+1)*nb_projections_by_head ; p++)
231 Cout(
" --> Default radius for each head: " << endl);
237 Cout(
" --> Total number of transaxial pixels as defined in the system file: " <<
m_nbPixelsTrans << endl);
239 Cout(
" --> Gap size between each transaxial pixe as defined in the system file: " <<
m_gapSizeTrans << endl);
240 Cout(
" --> Total number of axial pixels as defined in the system file: " <<
m_nbPixelsAxial << endl);
242 Cout(
" --> Gap size between each axial pixel as defined in the system file: " <<
m_gapSizeAxial << endl);
243 Cout(
" --> Number of transaxial virtual pixels (pixels actually used in reconstruction): " <<
m_vNbPixelsTrans << endl);
244 Cout(
" --> Number of axial virtual pixels (pixels actually used in reconstruction): " <<
m_vNbPixelsAxial << endl);
245 Cout(
" --> Transaxial size of virtual pixels (pixels actually used in reconstruction): " <<
m_vPixelsSizeTrans << endl);
246 Cout(
" --> Axial size of virtual pixels (pixels actually used in reconstruction): " <<
m_vPixelsSizeAxial << endl);
248 Cout(
" --> Focal models parameters: "<< endl);
252 Cout(
" For head #"<<h<<
":" << endl);
257 Cout(
" Coefficients: ");
266 Cout(
" Coefficients: ");
287 if (
m_verbose>=
VERBOSE_NORMAL)
Cout(
"iScannerSPECTConv::Instantiate() -> Create scanner structure and read parameters from configuration file"<< endl);
296 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the number of SPECT heads !" << endl);
312 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the number of SPECT heads !" << endl);
317 Cerr(
"***** iScannerSPECTConv::Instantiate() -> Scanner radius <= 0. ? really ? :) ... " << endl);
323 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the transaxial number of pixels !" << endl);
328 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the transaxial pixel size !" << endl);
333 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the axial number of pixels !" << endl);
338 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the axial pixel size !" << endl);
343 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read detector depth !" << endl);
348 string *head_name =
new string[ m_nbHeads + 1 ];
351 ostringstream oss( ostringstream::out );
352 oss <<
"head" << i+1;
353 head_name[ i ] = oss.str();
362 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read transaxial focal model of head " << i <<
" !" << endl);
367 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read transaxial number of coef model of head " << i <<
" !" << endl);
372 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read axial focal model of head " << i <<
" !" << endl);
377 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read axial number of coef model of head " << i <<
" !" << endl);
384 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read transaxial model parameters of head " << i <<
" !" << endl);
389 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read axial model parameters of head " << i <<
" !" << endl);
398 Cerr(
"***** iScannerSPECTConv::Instantiate() -> An error occurred while trying to read the multiple bed displacement in the scanner header file !" << endl);
425 if (
m_verbose>=
VERBOSE_NORMAL)
Cout(
"iScannerSPECTConv::BuildLUT -> Build LUT for scanner elements coordinates and orientations"<< endl);
432 Cerr(
"***** iScannerSPECTConv::BuildLUT() -> Transaxial or axial number of pixels in the geometric file should be >0 !" << endl);
453 if (!a_scannerFileIsLUT)
457 Cerr(
"***** iScannerSPECTConv::BuildLUT() -> A problem occured while generating scanner LUT !" << endl);
465 Cerr(
"***** iScannerSPECTConv::BuildLUT() -> A problem occured while loading scanner LUT !" << endl);
491 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of crystals has not been initialized !" <<endl);
496 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of heads in the SPECT system has not been initialized !" <<endl);
501 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of projection angles has not been initialized !" <<endl);
506 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of transaxial/axial pixels have not correctly been initialized ! (should be >0)" <<endl);
511 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial pixel sizes have not correctly been initialized ! (should be >0)" <<endl);
516 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial number of virtual pixels have not correctly been initialized ! (should be >0)" <<endl);
521 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial virtual pixel sizes have not correctly been initialized ! (should be >0)" <<endl);
526 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial pixel gap sizes have not correctly been initialized ! (should be >0)" <<endl);
532 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Crystal depth has not correctly been initialized ! (should be >0)" <<endl);
537 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Transaxial/axial focal models have not correctly been initialized !" <<endl);
542 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Number of coefficients for the transaxial/axial focal models have not correctly been initialized !" <<endl);
547 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Parameters for the transaxial/axial focal models have not correctly been initialized !" <<endl);
552 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Projection angles have not correctly been initialized !" <<endl);
557 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Default scanner radius for each detector heads (scanner file) not correctly initialized !" <<endl);
562 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> Distances between center of rotation and each detector heads have not correctly been initialized !" <<endl);
569 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> LUT elements (crystal central positions) have not correctly been initialized !" <<endl);
576 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> LUT elements (crystal orientations) have not correctly been initialized !" <<endl);
583 Cerr(
"***** iScannerSPECTConv::CheckParameters()-> LUT elements (crystal focal positions) have not correctly been initialized !" <<endl);
607 if (
m_verbose>=
VERBOSE_NORMAL)
Cout(
"iScannerSPECTConv::Initialize() -> Initialize remaining stuff for scanner to be ready"<< endl);
612 Cerr(
"***** iScannerSPECTConv::Initialize() -> Parameters have not been checked !" << endl);
636 Cerr(
"iScannerSPECTConv::LoadLUT() -> Not yet implemented !" << endl);
665 FLTNB *CORx, *CORy, *CORz;
666 FLTNB *head_angleX, *head_angleY, *head_angleZ;
693 crystal_center_ref[c] =
new oMatrix(3,1);
696 for(
int i=0 ; i<3 ; i++)
700 for(
int j=0 ; j<3 ; j++)
712 rotation_mtx[i] =
new oMatrix(3,3);
729 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An error occurred while trying to read the transaxial gap size !" << endl);
734 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An error occurred while trying to read the axial gap size !" << endl);
740 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> Crystal gap sizes cannot be negative !" << endl);
750 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> Number of bins provided in the datafile header while the scanner is not a monolithic crystal !" << endl);
756 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> Positive crystal gap sizes has no sense with monolithic crystals !" << endl);
762 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An acquisition zoom less than 1 has no sense !" << endl);
778 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An acquisition zoom has no sense with pixelated detectors !" << endl);
798 crystal_center_ref[ii + m_vNbPixelsTrans * jj]->
SetMatriceElt(0,0,Xcrist);
799 crystal_center_ref[ii + m_vNbPixelsTrans * jj]->
SetMatriceElt(1,0, 0);
800 crystal_center_ref[ii + m_vNbPixelsTrans * jj]->
SetMatriceElt(2,0,Zcrist);
821 int cryID = a*m_nbCrystals + c;
823 rotation_mtx[a]->
Multiplication(crystal_center_ref[c], crystal_center_out);
830 crystal_center_ref[c]->GetMatriceElt(1,0),
831 crystal_center_ref[c]->GetMatriceElt(2,0),
835 Cerr(
"***** iScannerSPECTConv::ComputeLUT() -> An error occurred while computing the focal positions ! " << endl);
849 rotation_mtx[a]->
Multiplication(focal_projection_position_mtx, focal_projection_position_mtx_output);
862 delete[] rotation_mtx;
863 for (
int c=0; c<
m_nbCrystals; c++)
delete crystal_center_ref[c];
864 delete[] crystal_center_ref;
865 delete crystal_center_out;
866 delete focal_projection_position_mtx;
867 delete focal_projection_position_mtx_output;
868 delete[] head_angleX;
869 delete[] head_angleY;
870 delete[] head_angleZ;
920 FLTNB focal_posZ = 0;
931 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the axial model should be <4 (max : polynom order 2 = 3 coeffs) ! " << endl);
936 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the axial model should be >0 ('axial number of coef model' in geom file) ! " << endl);
951 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);
961 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
966 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
971 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
977 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, current model " <<
mp_focalModelAxial[a_headID] <<
" is unknown !" << endl);
978 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Should be either 'constant' (parallel), 'polynomial', 'hyperbolic, or 'custom'" << endl);
996 FLTNB focal_posX = 0;
1007 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the trans model should be <4 (max : polynom order 2 = 3 coeffs) ! " << endl);
1012 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, the number of coeffs for the axial model should be >0 ('trans number of coef model' in geom file) ! " << endl);
1027 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);
1037 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
1042 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
1047 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Custom model should be implemented by the user (in iScannerSPECTConv::ComputeFocalPositions()) ! " << endl);
1053 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Error, current model " <<
mp_focalModelTrans[a_headID] <<
" is unknown !" << endl);
1054 Cerr(
"***** iScannerSPECTConv::ComputeFocalPositions() -> Should be either 'constant' (parallel), 'polynomial', 'hyperbolic, or 'custom'" << endl);
1067 FLTNB ap_Position1[3],
FLTNB ap_Position2[3],
1068 FLTNB ap_Orientation1[3],
FLTNB ap_Orientation2[3],
1078 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Projection index (" << a_index1 <<
") out of range [0:" <<
m_nbOfProjections-1 <<
"] !" << endl);
1085 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Crystal index (" << a_index2 <<
") out of range [0:" <<
m_nbCrystals-1 <<
"] !" << endl);
1113 else if (ap_POI2[2]<0.)
1115 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> POI management not implemented yet for SPECT !" << endl);
1119 else if (ap_POI2[0]==0. && ap_POI2[1]==0.)
1121 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> POI management not implemented yet for SPECT !" << endl);
1127 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> POI management not implemented yet for SPECT !" << endl);
1148 FLTNB ap_Position1[3],
FLTNB ap_Position2[3],
1149 FLTNB ap_Orientation1[3],
FLTNB ap_Orientation2[3] )
1158 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Projection index (" << a_index1 <<
") out of range [0:" <<
m_nbOfProjections-1 <<
"] !" << endl);
1165 Cerr(
"***** iScannerSPECTConv::GetPositionsAndOrientations() -> Crystal index (" << a_index2 <<
") out of range [0:" <<
m_nbCrystals-1 <<
"] !" << endl);
1188 ap_Position2[2] =
mp_crystalCentralPositionZ[index] + axial*sqrt(1-mp_crystalOrientationZ[index]*mp_crystalOrientationZ[index]);
1191 ap_Orientation1[0] = -1.;
1192 ap_Orientation1[1] = -1.;
1193 ap_Orientation1[2] = -1.;
1196 ap_Orientation2[2] = mp_crystalOrientationZ[a_index2];
1210 Cerr(
"***** iScannerSPECTConv::GetPositionWithRandomDepth() -> This function was implemented for PET testing purpose. Not implemented for SPECT !" << endl);
1220 FLTNB ap_CornerInf1[3],
FLTNB ap_CornerSup1[3],
1221 FLTNB ap_CornerInf2[3],
FLTNB ap_CornerSup2[3])
1224 Cerr(
"***** iScannerSPECTConv::GetTwoCorners() -> Not implemented yet !" << endl);
1234 FLTNB ap_pos_line_point1[3],
FLTNB ap_pos_line_point2[3],
1235 FLTNB ap_pos_point1_x[4],
FLTNB ap_pos_point1_y[4],
FLTNB ap_pos_point1_z[4],
1236 FLTNB ap_pos_point2_x[4],
FLTNB ap_pos_point2_y[4],
FLTNB ap_pos_point2_z[4]
1240 Cerr(
"***** iScannerSPECTConv::GetEdgesCenterPositions() -> Not implemented yet !" << endl);
1271 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading number of bins in the header data file " << endl);
1277 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading acquisition zoom in the header data file " << endl);
1283 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading number of projections in the header data file " << endl);
1287 string rotation_direction =
"";
1290 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading head rotation orientation in the header data file " << endl);
1296 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error occured while trying to initialize head rotation orientation " << endl);
1302 FLTNB first_and_last_angles[2] = {-1.,-1.};
1311 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading Angle mandatory field in the header data file '" << endl);
1321 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading Angles field in the header data file !'" << endl);
1327 (first_and_last_angles[0] <0 || first_and_last_angles[1] <0) )
1329 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> No information on projection angles provided in the datafile !'" << endl);
1330 Cerr(
" This information should be provided using either the 'Angles' tag, or both 'First angles', 'Last angles' tags !'" << endl);
1336 while (first_and_last_angles[0]>=360.) first_and_last_angles[0] -= 360.;
1337 while (first_and_last_angles[0]<0.) first_and_last_angles[0] += 360.;
1338 while (first_and_last_angles[1]>=360.) first_and_last_angles[1] -= 360.;
1339 while (first_and_last_angles[1]<0.) first_and_last_angles[1] += 360.;
1343 FLTNB angle_increment = dir*(first_and_last_angles[1] - first_and_last_angles[0]);
1344 while (angle_increment>=360.) angle_increment -= 360.;
1345 while (angle_increment<0.) angle_increment += 360.;
1350 angles[a] = first_and_last_angles[0] + dir * angle_increment * ((
FLTNB)a);
1351 while (angles[a]>=360.) angles[a] -= 360.;
1352 while (angles[a]<0.) angles[a] += 360.;
1355 angles[m_nbOfProjections-1] = first_and_last_angles[1];
1371 for(
int a=0 ; a<m_nbOfProjections/
m_nbHeads ; a++)
1381 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading the distance between the camera detectors to the center of rotation in the header data file " << endl);
1385 else if (read_flag==2)
1395 else if(read_flag==1)
1398 Cerr(
"***** iScannerSPECTConv::GetGeometricInfoFromDataFile() -> Error while reading the global distance between the camera detectors to the center of rotation in the header data file " << endl);
1401 else if (read_flag==2)
1405 for(
int a=0 ; a<m_nbOfProjections/
m_nbHeads ; a++)
1421 uint16_t* ap_nbHeads,
1422 FLTNB* ap_acquisitionZoom,
1423 uint16_t* ap_nbOfBins,
1424 FLTNB* ap_pixSizeXY,
1426 FLTNB*& ap_CORtoDetectorDistance,
1427 int* ap_headRotDirection)
1435 Cerr(
"***** iScannerSPECTConv::GetSPECTSpecificParameters() -> Parameters have not been checked !" << endl);
1472 Cerr(
"***** iScannerSPECTConv::PROJ_SetSPECTAngles -> Error number of projection should be >0 ! '" << endl);
1506 Cerr(
"***** iScannerSPECTConv::PROJ_SetSPECTCORtoDetectorDistance -> Error number of projection should be >0 ! '" << endl);
1559 for(
int i=0 ; i<2 ; i++)
1594 cout <<
"This scanner class is dedicated to the description of parallel, convergent and multi-convergent SPECT systems." << endl;
This class is used to represent any SPECT camera with parallel/convergent collimator.
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...
FLTNB GetMatriceElt(uint16_t l, uint16_t c)
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.
int SetMatriceElt(uint16_t l, uint16_t c, FLTNB a_val)
Set the matrix element corresponding to the argument indices with the provided value.
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.
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
FLTNB * mp_crystalFocalPositionX
Generic class for scanner objects.
int LoadLUT()
Load a precomputed scanner LUT.
#define VERBOSE_DEBUG_NORMAL