CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
src/projector/vProjector.cc
Go to the documentation of this file.
1 
8 #include "vProjector.hh"
9 #include "vScanner.hh"
10 #include "vDataFile.hh"
11 
12 // =====================================================================
13 // ---------------------------------------------------------------------
14 // ---------------------------------------------------------------------
15 // =====================================================================
16 
18 {
19  // Affect default values
20  mp_Scanner = NULL;
22  mp_sizeVox[0] = -1.;
23  mp_sizeVox[1] = -1.;
24  mp_sizeVox[2] = -1.;
25  mp_nbVox[0] = -1;
26  mp_nbVox[1] = -1;
27  mp_nbVox[2] = -1;
28  m_nbVoxXY = -1;
29  mp_halfFOV[0] = -1.;
30  mp_halfFOV[1] = -1.;
31  mp_halfFOV[2] = -1.;
32  m_sensitivityMode = false;
33  m_TOFMethod = -1;
34  m_TOFNbSigmas = -1.;
36  m_applyPOI = false;
39  m_verbose = 0;
40  m_checked = false;
41  m_initialized = false;
42  mp_mask = NULL;
43  m_hasMask = false;
44  mp_TOFWeightingFcn = NULL;
47  m_TOFResolutionInMm = -1.;
48  m_TOFBinSizeInMm = -1.;
52 }
53 
54 // =====================================================================
55 // ---------------------------------------------------------------------
56 // ---------------------------------------------------------------------
57 // =====================================================================
58 
60 {
61 }
62 
63 // =====================================================================
64 // ---------------------------------------------------------------------
65 // ---------------------------------------------------------------------
66 // =====================================================================
67 
69 {
70  // Check that the parameter is not NULL
71  if (ap_ImageDimensionsAndQuantification==NULL)
72  {
73  Cerr("***** vProjector::SetImageDimensionsAndQuantification() -> Input image dimensions object is null !" << endl);
74  return 1;
75  }
76  // Affect image dimensions
77  mp_sizeVox[0] = ap_ImageDimensionsAndQuantification->GetVoxSizeX();
78  mp_sizeVox[1] = ap_ImageDimensionsAndQuantification->GetVoxSizeY();
79  mp_sizeVox[2] = ap_ImageDimensionsAndQuantification->GetVoxSizeZ();
80  mp_nbVox[0] = ap_ImageDimensionsAndQuantification->GetNbVoxX();
81  mp_nbVox[1] = ap_ImageDimensionsAndQuantification->GetNbVoxY();
82  mp_nbVox[2] = ap_ImageDimensionsAndQuantification->GetNbVoxZ();
83  m_nbVoxXY = mp_nbVox[0] * mp_nbVox[1];
84  mp_halfFOV[0] = mp_sizeVox[0] * ((FLTNB)mp_nbVox[0]) / 2.;
85  mp_halfFOV[1] = mp_sizeVox[1] * ((FLTNB)mp_nbVox[1]) / 2.;
86  mp_halfFOV[2] = mp_sizeVox[2] * ((FLTNB)mp_nbVox[2]) / 2.;
87  mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;
88  // Normal end
89  return 0;
90 }
91 
92 // =====================================================================
93 // ---------------------------------------------------------------------
94 // ---------------------------------------------------------------------
95 // =====================================================================
96 
98 {
99  // Return when using MPI and mpi_rank is not 0
100  #ifdef CASTOR_MPI
101  int mpi_rank = 0;
102  MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
103  if (mpi_rank!=0) return;
104  #endif
105  // Show help
106  cout << "------------------------------------------------------------------" << endl;
107  cout << "----- Common options for all projectors" << endl;
108  cout << "------------------------------------------------------------------" << endl;
109  cout << "Only options related to TOF implementation are available." << endl;
110  cout << "If used, values for all of the following options must be provided as a list of numbers separated by commas." << endl;
111  cout << "" << endl;
112  cout << " the number of standard deviations for truncating the nominal TOF Gaussian distribution (-1 for no truncation)." << endl;
113  cout << " whether the TOF weighting function is precomputed (1 for yes, 0 for no)" << endl;
114  cout << " whether the TOF weighting function takes properly into account the TOF bin using convolution or integration (1 for yes, 0 for no)." << endl;
115  cout << "" << endl;
116  cout << "The default values are -1,1,1" << endl;
117 
118 }
119 
120 // =====================================================================
121 // ---------------------------------------------------------------------
122 // ---------------------------------------------------------------------
123 // =====================================================================
124 
126 {
127  // Call the specific help function from the children
129  // Then, say if the child projector in use is compatible with SPECT attenuation correction or not
130  if (m_compatibleWithSPECTAttenuationCorrection) cout << "This projector is compatible with SPECT attenuation correction." << endl;
131  else cout << "This projector is NOT compatible with SPECT attenuation correction." << endl;
132 }
133 
134 // =====================================================================
135 // ---------------------------------------------------------------------
136 // ---------------------------------------------------------------------
137 // =====================================================================
138 
139 int vProjector::ReadCommonOptionsList(const string& a_optionsList)
140 {
141  // TODO : make this more explicit, here it is assumed that 3 specific TOF options are provided
142  if (a_optionsList!="")
143  {
144  FLTNB option[3];
145  // Read the options
146  if (ReadStringOption(a_optionsList, option, 3, ",", "Common options"))
147  {
148  Cerr("***** vProjector::ReadCommonOptionsList() -> Failed to correctly read the list of options !" << endl);
149  return 1;
150  }
151  m_TOFNbSigmas = option[0];
152  m_TOFWeightingFcnPrecomputedFlag = option[1]>0.;
153  m_TOFBinProperProcessingFlag = option[2]>0.;
154  }
155  return 0;
156 }
157 
158 // =====================================================================
159 // ---------------------------------------------------------------------
160 // ---------------------------------------------------------------------
161 // =====================================================================
162 
164 {
165  // Check scanner
166  if (mp_Scanner==NULL)
167  {
168  Cerr("***** vProjector::CheckParameters() -> Please provide a valid scanner object !" << endl);
169  return 1;
170  }
171  // Check image dimensions
173  {
174  Cerr("***** vProjector::CheckParameters() -> Please provide a valid image dimensions and quantification object !" << endl);
175  return 1;
176  }
177  if (mp_sizeVox[0]<=0. || mp_sizeVox[1]<=0. || mp_sizeVox[2]<=0.)
178  {
179  Cerr("***** vProjector::CheckParameters() -> One or more voxel sizes is negative or null !" << endl);
180  return 1;
181  }
182  if (mp_nbVox[0]<=0 || mp_nbVox[1]<=0 || mp_nbVox[2]<=0)
183  {
184  Cerr("***** vProjector::CheckParameters() -> One or more number of voxels is negative or null !" << endl);
185  return 1;
186  }
187  // Check TOF
189  {
190  Cerr("***** vProjector::CheckParameters() -> TOF flag is incorrect or not set !" << endl);
191  return 1;
192  }
193  // Check TOF parameters
194  if (m_TOFMethod!=USE_NOTOF)
195  {
197  {
198  Cerr("***** vProjector::CheckParameters() -> Inconsistent TOF related parameters !" << endl);
199  return 1;
200  }
202  {
203  Cout("***** vProjector::CheckParameters() -> Warning: quantization TOF bin size wrong or not provided, so switching to TOF list-mode reconstruction which neglects the quantization TOF bin size!" << endl);
205  }
207  {
208  Cout("***** vProjector::CheckParameters() -> Warning: ToF weighting function cannot be precomputed when using per event ToF resolution. Disabling precomputation.");
210  }
211  }
212 
213  // Check verbose level
214  if (m_verbose<0)
215  {
216  Cerr("***** vProjector::CheckParameters() -> Verbose level is negative !" << endl);
217  return 1;
218  }
219  // Check parameters of the child class
221  {
222  Cerr("***** vProjector::CheckParameters() -> An error occurred while checking parameters of the child projector class !" << endl);
223  return 1;
224  }
225 
226  // Normal end
227  m_checked = true;
228  return 0;
229 }
230 
231 // =====================================================================
232 // ---------------------------------------------------------------------
233 // ---------------------------------------------------------------------
234 // =====================================================================
235 
237 {
238  // First check that the parameters have been checked !
239  if (!m_checked)
240  {
241  Cerr("***** vProjector::Initialize() -> Must call the CheckParameters() function before initialization !" << endl);
242  return 1;
243  }
244 
245  // TOF parameters
247  {
248  // Gaussian standard deviation
249  HPFLTNB tof_resolution_sigma = m_TOFResolutionInMm / TWO_SQRT_TWO_LN_2;
250 
251  // If the provided number of sigmas is negative, set it to a value large enough
252  // to approximate no truncation of the Gaussian distribution
253  // (the TOF weighting function is in any case limited by the available TOF measurement range)
254  if (m_TOFNbSigmas<0.) m_TOFNbSigmas = m_TOFMeasurementRangeInMm / tof_resolution_sigma;
255 
256  // Ideal Gaussian normalization coefficient (integral=1)
257  m_TOFGaussianNormCoef = INV_SQRT_2_PI / tof_resolution_sigma;
258 
259  // Precompute the TOF weighting function if required
261  {
262  // Initialize some variables to default values, TODO make this an optional parameter
263  // Sample the TOF weighting function at 1/m_TOFPrecomputedSamplingFactor of the spatial unit (mm)
265 
266  HPFLTNB tof_half_span = tof_resolution_sigma * m_TOFNbSigmas;
267 
268  // number of samples for the Gaussian function truncated at m_TOFNbSigmas standard deviations
269  INTNB nb_samples_tof_gauss = (INTNB)ceil(tof_half_span*2.*m_TOFPrecomputedSamplingFactor);
270  // make the number of samples odd
271  if (nb_samples_tof_gauss % 2 == 0) nb_samples_tof_gauss += 1;
272 
273  // normalized Gaussian function for list-mode data (assumption of continuous TOF measurements)
274  // normalized Gaussian function for TOF histogram data multiplied by the size of the TOF bin (assumption of constant Gaussian function over a TOF bin)
276  {
277  mp_TOFWeightingFcn = new HPFLTNB[nb_samples_tof_gauss];
278  // Gaussian mean at the center
279  INTNB mu = nb_samples_tof_gauss/2;
280  for (INTNB g=0;g<nb_samples_tof_gauss;g++)
281  {
282  HPFLTNB temp = ((HPFLTNB)(g-mu))/(tof_resolution_sigma*m_TOFPrecomputedSamplingFactor);
283  mp_TOFWeightingFcn[g] = m_TOFGaussianNormCoef * exp(-0.5*(temp*temp));
285  }
286  m_TOFWeightingFcnNbSamples = nb_samples_tof_gauss;
287  }
288  // convolution of the normalized Gaussian with the TOF bin (cumulative or quantization bin)
289  else
290  {
291  // number of samples for the TOF bin door function
292  INTNB nb_samples_tof_bin = (INTNB)round(m_TOFBinSizeInMm*m_TOFPrecomputedSamplingFactor);
293  // make the number of samples odd
294  if (nb_samples_tof_bin % 2 == 0) nb_samples_tof_bin += 1;
295 
296  // number of samples for the convolution
297  INTNB nb_samples_conv = nb_samples_tof_gauss+nb_samples_tof_bin-1;
298 
299  // normalized Gaussian function truncated at m_TOFNbSigmas standard deviations
300  // padded with zeros to the size of the convolved function
301  HPFLTNB* tof_gauss = new HPFLTNB[nb_samples_conv];
302  INTNB mu = nb_samples_conv/2;
303  for (INTNB sgauss=0;sgauss<nb_samples_conv;sgauss++)
304  {
305  if (sgauss<mu-nb_samples_tof_gauss/2 || sgauss>mu+nb_samples_tof_gauss/2) tof_gauss[sgauss]=0.;
306  else
307  {
308  HPFLTNB temp = (HPFLTNB)((sgauss-mu))/(tof_resolution_sigma*m_TOFPrecomputedSamplingFactor);
309  tof_gauss[sgauss] = m_TOFGaussianNormCoef * exp(-0.5*(temp*temp));
310  }
311  }
312 
313  // TOF bin door function (quantization bin for list-mode, cumulative bin for histogram data)
314  HPFLTNB* tof_bin = new HPFLTNB[nb_samples_tof_bin];
315  // intensity = 1 for the cumulative bin, 1/binSize for the quantization bin
316  HPFLTNB tof_bin_value = (m_TOFMethod==USE_TOFLIST)?(1./(m_TOFBinSizeInMm*m_TOFPrecomputedSamplingFactor)):(1./m_TOFPrecomputedSamplingFactor);
317  for (INTNB sbin=0;sbin<nb_samples_tof_bin;sbin++) tof_bin[sbin] = tof_bin_value;
318 
319  // the final TOF weighting function
320  mp_TOFWeightingFcn = new HPFLTNB[nb_samples_conv];
321  for (INTNB s=0;s<nb_samples_conv;s++) mp_TOFWeightingFcn[s] = 0.;
322 
323  // convolve the TOF bin with the Gaussian function
324  INTNB c;
325  #pragma omp parallel for private(c) schedule(static, 1)
326  for (c=0;c<nb_samples_conv;c++)
327  {
328  for (INTNB ib=0;ib<nb_samples_tof_bin;ib++)
329  {
330  INTNB temp = c-nb_samples_tof_bin/2+ib;
331  if (temp>=0 && temp<nb_samples_conv) mp_TOFWeightingFcn[c] += tof_gauss[temp]*tof_bin[ib];
332  }
333  }
334 
335  m_TOFWeightingFcnNbSamples = nb_samples_conv;
336 
337  // clean
338  delete []tof_bin;
339  delete []tof_gauss;
340  tof_bin = NULL;
341  tof_gauss = NULL;
342  }
343  }
344 
345  // Verbose
347  {
348  Cout(" --> TOF weighting function implementation: " << endl);
349  Cout(" --> Gaussian truncation (number of standard deviations) " << m_TOFNbSigmas << endl);
351  {
352  Cout(" --> Precomputed " << endl);
354  {
355  Cout(" --> Convolved with the "<<((m_TOFMethod==USE_TOFHISTO)?"cumulative":"quantization")<<" TOF bin (size " <<m_TOFBinSizeInMm<<"mm)" <<endl);
356  }
357  else
358  {
359  if (m_TOFMethod==USE_TOFHISTO) Cout(" --> Simple multiplication with the cumulative TOF bin (size " <<m_TOFBinSizeInMm<<"mm)" <<endl);
360  else if (m_TOFMethod==USE_TOFLIST) Cout(" --> Simple normalized Gaussian"<<endl);
361  }
362  }
363  else
364  {
365  Cout(" --> Computation on the fly " << endl);
367  {
368  Cout(" --> Integration of the Gaussian over the "<<((m_TOFMethod==USE_TOFHISTO)?"cumulative":"quantization")<<" TOF bin (size " <<m_TOFBinSizeInMm<<"mm)" <<endl);
369  }
370  else
371  {
372  if (m_TOFMethod==USE_TOFHISTO) Cout(" --> Simple multiplication with the cumulative TOF bin (size " <<m_TOFBinSizeInMm<<"mm)" <<endl);
373  else if (m_TOFMethod==USE_TOFLIST) Cout(" --> Simple normalized Gaussian"<<endl);
374  }
375  }
376  }
377  }
378 
379  // Call the intialize function specific to the children
380  if (InitializeSpecific())
381  {
382  Cerr("***** vProjector::Initialize() -> A problem occurred while calling the specific initialization of the child projector !" << endl);
383  return 1;
384  }
385 
386  if (m_verbose>=3)
387  {
388  Cout("vProjector::Initialize() -> Exit function" << endl);
389  }
390 
391  // Normal end
392  m_initialized = true;
393  return 0;
394 }
395 
396 // =====================================================================
397 // ---------------------------------------------------------------------
398 // ---------------------------------------------------------------------
399 // =====================================================================
400 
402 {
404 }
405 
406 // =====================================================================
407 // ---------------------------------------------------------------------
408 // ---------------------------------------------------------------------
409 // =====================================================================
410 
411 int vProjector::Project(int a_direction, oProjectionLine* ap_ProjectionLine, uint32_t* ap_index1, uint32_t* ap_index2, int a_nbIndices)
412 {
413  #ifdef CASTOR_DEBUG
414  if (!m_initialized)
415  {
416  Cerr("***** vProjector::Project() -> Called while not initialized !" << endl);
417  Exit(EXIT_DEBUG);
418  }
419  #endif
420 
422 
423  // ---------------------------------------------------------------------------------------
424  // First: Get cartesian coordinates from the scanner and average positions if compression.
425  // Here, we differentiate the case with no compression (i.e. a_nbIndices==1) from the
426  // compression case, because it will avoid to perform useless computation without
427  // compression. However, it produces some duplication of code parts as a compromise.
428  // ---------------------------------------------------------------------------------------
429 
430  // ______________________________________________________________________________________
431  // Case1: no compression (i.e. a_nbIndices==1)
432  if (a_nbIndices==1)
433  {
434  // Set indices of the line
435  ap_ProjectionLine->SetIndex1(((int)(ap_index1[0])));
436  ap_ProjectionLine->SetIndex2(((int)(ap_index2[0])));
437  // Get positions and orientations from the scanner (mean depth of interaction intrinsicaly taken into account), taking POI into account if any
438  if (mp_Scanner->GetPositionsAndOrientations( ((int)(ap_index1[0])), ((int)(ap_index2[0])),
439  ap_ProjectionLine->GetPosition1(), ap_ProjectionLine->GetPosition2(),
440  ap_ProjectionLine->GetOrientation1(), ap_ProjectionLine->GetOrientation2(),
441  ap_ProjectionLine->GetPOI1(), ap_ProjectionLine->GetPOI2() ))
442  {
443  Cerr("***** vProjector::Project() -> A problem occurred while getting positions and orientations from scanner !" << endl);
444  return 1;
445  }
446  }
447  // ______________________________________________________________________________________
448  // Case2: compression (i.e. a_nbIndices>1)
449  else
450  {
451  // Set default indices of the line to -1 when compression
452  ap_ProjectionLine->SetIndex1(-1);
453  ap_ProjectionLine->SetIndex2(-1);
454  // Buffer pointers for positions and orientations handled by the projection line
455  FLTNB* position1 = ap_ProjectionLine->GetPosition1();
456  FLTNB* position2 = ap_ProjectionLine->GetPosition2();
457  FLTNB* orientation1 = ap_ProjectionLine->GetOrientation1();
458  FLTNB* orientation2 = ap_ProjectionLine->GetOrientation2();
459  FLTNB* buffer_position1 = ap_ProjectionLine->GetBufferPosition1();
460  FLTNB* buffer_position2 = ap_ProjectionLine->GetBufferPosition2();
461  FLTNB* buffer_orientation1 = ap_ProjectionLine->GetBufferOrientation1();
462  FLTNB* buffer_orientation2 = ap_ProjectionLine->GetBufferOrientation2();
463  // Zero the position and orientation
464  for (int i=0; i<3; i++)
465  {
466  position1[i] = 0.;
467  position2[i] = 0.;
468  orientation1[i] = 0.;
469  orientation2[i] = 0.;
470  }
471  // Loop on provided indices
472  for (int l=0; l<a_nbIndices; l++)
473  {
474  // Get positions and orientations from scanner (mean depth of interaction intrinsicaly taken into account), taking POI into account if any
475  if (mp_Scanner->GetPositionsAndOrientations( ((int)(ap_index1[l])), ((int)(ap_index2[l])),
476  buffer_position1, buffer_position2,
477  buffer_orientation1, buffer_orientation2,
478  ap_ProjectionLine->GetPOI1(), ap_ProjectionLine->GetPOI2() ))
479  {
480  Cerr("***** vProjector::Project() -> A problem occurred while getting positions and orientations from scanner !" << endl);
481  return 1;
482  }
483  // Add those contributions to the mean position and orientation
484  for (int i=0; i<3; i++)
485  {
486  position1[i] += buffer_position1[i];
487  position2[i] += buffer_position2[i];
488  orientation1[i] += buffer_orientation1[i];
489  orientation2[i] += buffer_orientation2[i];
490  }
491  }
492  // Average positions and orientations
493  for (int i=0; i<3; i++)
494  {
495  position1[i] /= ((FLTNB)a_nbIndices);
496  position2[i] /= ((FLTNB)a_nbIndices);
497  orientation1[i] /= ((FLTNB)a_nbIndices);
498  orientation2[i] /= ((FLTNB)a_nbIndices);
499  }
500  }
501 
502  // --------------------------------------------------------------
503  // Second: Modify the end points coordinates from common options,
504  // random, offset, and LOR displacements.
505  // -----------------------------------------------------------
506 
507  // Apply common options TODO
508 
509  // Apply LORs displacement TODO
510 
511  // Apply global image offset
512  ap_ProjectionLine->ApplyOffset();
513 
514  // Apply bed position offset
515  ap_ProjectionLine->ApplyBedOffset();
516 
517  // -----------------------------------------------------------
518  // Third: project the line
519  // -----------------------------------------------------------
520 
521  // Compute LOR length
522  ap_ProjectionLine->ComputeLineLength();
523 
524  // Switch on different TOF options
525  switch (m_TOFMethod)
526  {
527  case USE_NOTOF:
528  if (ProjectWithoutTOF( a_direction, ap_ProjectionLine ))
529  {
530  Cerr("***** vProjector::Project() -> A problem occurred while projecting a line without time-of-flight !" << endl);
531  return 1;
532  }
533  break;
534  case USE_TOFLIST:
535 
536  // When using per event TOF resolution, initialization has to be done per event as well
538  {
539  // Check if the resolution has correctly been initialized
540  if (ap_ProjectionLine->GetTOFResolutionInPs()<0.)
541  {
542  Cerr("***** oProjectorManager::ComputeProjectionLine() -> TOF per-event resolution has not been initialized!" << endl);
543  return 1;
544  }
546  HPFLTNB tof_resolution_sigma = m_TOFResolutionInMm / TWO_SQRT_TWO_LN_2;
547  if (m_TOFNbSigmas<0.) m_TOFNbSigmas = m_TOFMeasurementRangeInMm / tof_resolution_sigma;
548  m_TOFGaussianNormCoef = INV_SQRT_2_PI / tof_resolution_sigma;
549  }
550 
551  if (ProjectTOFListmode( a_direction, ap_ProjectionLine ))
552  {
553  Cerr("***** vProjector::Project() -> A problem occurred while projecting a line with time-of-flight position !" << endl);
554  return 1;
555  }
556  break;
557  case USE_TOFHISTO:
558  if (ProjectTOFHistogram( a_direction, ap_ProjectionLine ))
559  {
560  Cerr("***** vProjector::Project() -> A problem occurred while projecting a line with binned time-of-flight !" << endl);
561  return 1;
562  }
563  break;
564  // No default
565  }
566 
567  #ifdef CASTOR_VERBOSE
568  if (m_verbose>=10)
569  {
570  Cout("vProjector::Project() -> Exit function" << endl);
571  }
572  #endif
573 
574  // End
575  return 0;
576 }
577 
578 // =====================================================================
579 // ---------------------------------------------------------------------
580 // ---------------------------------------------------------------------
581 // =====================================================================
FLTNB * GetOrientation1()
This function is used to get the pointer to the mp_orientation1 (3-values tab).
FLTNB * GetPOI1()
This function is used to get the pointer to POI of point 1 (3-values tab).
static void ShowCommonHelp()
This function is used to print out some help about the use of options common to all projectors...
int ReadStringOption(const string &a_input, T *ap_return, int a_nbElts, const string &sep, const string &a_option)
Parse the &#39;a_input&#39; string corresponding to the &#39;a_option&#39; into &#39;a_nbElts&#39; elements, using the &#39;sep&#39; separator. The results are returned in the templated &#39;ap_return&#39; dynamic templated array. Call "ConvertFromString()" to perform the correct conversion depending on the type of the data to convert.
FLTNB GetVoxSizeX()
Get the voxel&#39;s size along the X axis, in mm.
#define Cerr(MESSAGE)
FLTNB GetVoxSizeZ()
Get the voxel&#39;s size along the Z axis, in mm.
FLTNB * GetBufferPosition2()
This function is used to get the pointer to the mp_bufferPosition2 (3-values tab).
FLTNB GetTOFResolutionInPs() const
This function is used to get the TOF standard deviation in ps.
#define SPEED_OF_LIGHT_IN_MM_PER_PS
vProjector()
The constructor of vProjector.
int Initialize()
A public function used to initialize the projector.
virtual int ProjectTOFHistogram(int a_direction, oProjectionLine *ap_ProjectionLine)=0
int Project(int a_direction, oProjectionLine *ap_ProjectionLine, uint32_t *ap_index1, uint32_t *ap_index2, int a_nbIndices)
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
FLTNB * GetBufferPosition1()
This function is used to get the pointer to the mp_bufferPosition1 (3-values tab).
virtual int ProjectWithoutTOF(int a_direction, oProjectionLine *ap_ProjectionLine)=0
void Exit(int code)
FLTNB * GetOrientation2()
This function is used to get the pointer to the mp_orientation2 (3-values tab).
virtual int CheckSpecificParameters()=0
A private function used to check the parameters settings specific to the child projector.
void ComputeLineLength()
Simply compute and update the m_length using the associated mp_position1 and mp_position2.
int ReadCommonOptionsList(const string &a_optionsList)
FLTNB GetVoxSizeY()
Get the voxel&#39;s size along the Y axis, in mm.
void ApplyOffset()
Apply the offset of oImageDimensionsAndQuantification to the mp_position1 and mp_position2.
FLTNB * GetPosition1()
This function is used to get the pointer to the mp_position1 (3-values tab).
virtual void ShowHelpSpecific()=0
A function used to show help about the child module.
#define DEBUG_VERBOSE(IGNORED1, IGNORED2)
FLTNB * GetBufferOrientation1()
This function is used to get the pointer to the mp_bufferOrientation1 (3-values tab).
virtual ~vProjector()
The destructor of vProjector.
int CheckParameters()
A public function used to check the parameters settings.
FLTNB * GetBufferOrientation2()
This function is used to get the pointer to the mp_bufferOrientation2 (3-values tab).
This class is designed to manage and store system matrix elements associated to a vEvent...
virtual int ProjectTOFListmode(int a_direction, oProjectionLine *ap_ProjectionLine)=0
virtual int InitializeSpecific()=0
A private function used to initialize everything specific to the child projector. ...
This class is designed to manage all dimensions and quantification related stuff. ...
FLTNB * GetPosition2()
This function is used to get the pointer to the mp_position2 (3-values tab).
INTNB GetNbVoxX()
Get the number of voxels along the X axis.
INTNB GetNbVoxZ()
Get the number of voxels along the Z axis.
virtual INTNB EstimateMaxNumberOfVoxelsPerLine()
This function is used to compute and provide an estimate of the maximum number of voxels that could c...
void ShowHelp()
A function used to show help about the projector.
FLTNB * GetPOI2()
This function is used to get the pointer to POI of point 2 (3-values tab).
int SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
void ApplyBedOffset()
Apply the bed offset of m_bedOffset to the mp_position1 and mp_position2.
#define Cout(MESSAGE)
virtual 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)=0
INTNB GetNbVoxY()
Get the number of voxels along the Y axis.