101 cout <<
"This projector is a simple line projector that computes the exact path length of a line through the voxels." << endl;
102 cout <<
"It is implemented from the following published paper:" << endl;
103 cout <<
"R. L. Siddon, \"Fast calculation of the exact radiological path for a three-dimensional CT array\", Med. Phys., vol. 12, pp. 252-5, 1985." << endl;
104 cout <<
"All voxels are correctly ordered in the line, so this projector can be used with SPECT attenuation correction." << endl;
128 if (
m_verbose>=2)
Cout(
"iProjectorClassicSiddon::InitializeSpecific() -> Use classic Siddon projector" << endl);
146 max_nb_voxels_in_dimension *= 4;
148 return max_nb_voxels_in_dimension;
161 Cerr(
"***** iProjectorClassicSiddon::ProjectWithoutTOF() -> Called while not initialized !" << endl);
166 #ifdef CASTOR_VERBOSE 169 string direction =
"";
170 if (a_direction==
FORWARD) direction =
"forward";
171 else direction =
"backward";
172 Cout(
"iProjectorClassicSiddon::Project without TOF -> Project line '" << ap_ProjectionLine <<
"' in " << direction <<
" direction" << endl);
180 FLTNB event1[3] = { event1_position[0], event1_position[1], event1_position[2] };
181 FLTNB event2[3] = { event2_position[0], event2_position[1], event2_position[2] };
191 FLTNB alphaFirst[] = { 0.0, 0.0, 0.0 };
192 FLTNB alphaLast[] = { 0.0, 0.0, 0.0 };
194 FLTNB alphaMin = 0.0, alphaMax = 1.0;
195 FLTNB delta_pos[] = {
196 event2[ 0 ] - event1[ 0 ],
197 event2[ 1 ] - event1[ 1 ],
198 event2[ 2 ] - event1[ 2 ]
202 for(
int i = 0; i < 3; ++i )
204 if( delta_pos[ i ] != 0.0 )
206 alphaFirst[i] = (-
mp_halfFOV[i] - event1[i]) / (delta_pos[ i ]);
207 alphaLast[i] = (
mp_halfFOV[i] - event1[i]) / (delta_pos[ i ]);
208 alphaMin = (std::max)(alphaMin,(std::min)(alphaFirst[i],alphaLast[i]));
209 alphaMax = (std::min)(alphaMax,(std::max)(alphaFirst[i],alphaLast[i]));
215 if( alphaMax <= alphaMin )
return 0;
219 int iMin = 0, iMax = 0;
220 int jMin = 0, jMax = 0;
221 int kMin = 0, kMax = 0;
224 if( delta_pos[ 0 ] > 0.0 )
227 iMax = ::floor( 1 + ( event1[ 0 ] + alphaMax * delta_pos[ 0 ] - (-
mp_halfFOV[ 0 ]) ) /
mp_sizeVox[0] );
229 else if( delta_pos[ 0 ] < 0.0 )
232 iMax = ::floor( 1 + ( event1[ 0 ] + alphaMin * delta_pos[ 0 ] - (-
mp_halfFOV[ 0 ]) ) /
mp_sizeVox[0] );
234 if( delta_pos[ 0 ] == 0. )
240 if( delta_pos[ 1 ] > 0. )
243 jMax = ::floor( 1 + ( event1[ 1 ] + alphaMax * delta_pos[ 1 ] - (-
mp_halfFOV[ 1 ]) ) /
mp_sizeVox[1] );
245 else if( delta_pos[ 1 ] < 0. )
248 jMax = ::floor( 1 + ( event1[ 1 ] + alphaMin * delta_pos[ 1 ] - (-
mp_halfFOV[ 1 ]) ) /
mp_sizeVox[1] );
250 else if( delta_pos[ 1 ] == 0. )
256 if( delta_pos[ 2 ] > 0. )
259 kMax = ::floor( 1 + ( event1[ 2 ] + alphaMax * delta_pos[ 2 ] - (-
mp_halfFOV[ 2 ]) ) /
mp_sizeVox[2] );
261 else if( delta_pos[ 2 ] < 0. )
264 kMax = ::floor( 1 + ( event1[ 2 ] + alphaMin * delta_pos[ 2 ] - (-
mp_halfFOV[ 2 ]) ) /
mp_sizeVox[2] );
266 else if( delta_pos[ 2 ] == 0. )
272 int n = ( iMax - iMin + 1 ) + ( jMax - jMin + 1 )
273 + ( kMax - kMin + 1 );
278 FLTNB *tmpAlpha =
new FLTNB[ mp_nbVox[ 0 ] + mp_nbVox[ 1 ] + mp_nbVox[ 2 ] + 3 ];
279 FLTNB *alphaX =
new FLTNB[ ( mp_nbVox[ 0 ] + 1 ) ];
280 FLTNB *alphaY =
new FLTNB[ ( mp_nbVox[ 1 ] + 1 ) ];
281 FLTNB *alphaZ =
new FLTNB[ ( mp_nbVox[ 2 ] + 1 ) ];
283 INTNB iElement = iMax - iMin + 1;
287 if( delta_pos[ 0 ] > 0. )
289 for(
int i = iMin; i <= iMax; ++i )
292 else if( delta_pos[ 0 ] < 0. )
294 for(
int i = iMax; i >= iMin; --i )
300 INTNB jElement = jMax - jMin + 1;
304 if( delta_pos[ 1 ] > 0. )
306 for(
int j = jMin; j <= jMax; ++j )
309 else if( delta_pos[ 1 ] < 0. )
311 for(
int j = jMax; j >= jMin; --j )
317 INTNB kElement = kMax - kMin + 1;
321 if( delta_pos[ 2 ] > 0. )
323 for(
int k = kMin; k <= kMax; ++k )
326 else if( delta_pos[ 2 ] < 0. )
328 for(
int k = kMax; k >= kMin; --k )
334 alphaX, alphaX + iElement,
338 ::memcpy( tmpAlpha, alpha, ( iElement ) *
sizeof(
FLTNB ) );
341 alphaY, alphaY + jElement,
342 tmpAlpha, tmpAlpha + iElement,
345 ::memcpy( tmpAlpha, alpha, ( iElement + jElement ) *
sizeof(
FLTNB ) );
348 alphaZ, alphaZ + kElement,
349 tmpAlpha, tmpAlpha + iElement + jElement,
361 FLTNB alphaMid = 0.0;
362 INTNB i = 0, j = 0, k = 0;
363 FLTNB *pAlpha = &alpha[ 1 ];
364 FLTNB *pAlphaPrevious = &alpha[ 0 ];
368 for(
int nP = 0; nP < n - 1; ++nP, ++pAlpha, ++pAlphaPrevious )
370 alphaMid = ( *pAlpha + *pAlphaPrevious ) * 0.5;
372 i = alphaMid * i2 + i1;
373 if( i < 1 || i > mp_nbVox[ 0 ] )
continue;
375 j = alphaMid * j2 + j1;
376 if( j < 1 || j > mp_nbVox[ 1 ] )
continue;
378 k = alphaMid * k2 + k1;
379 if( k < 1 || k > mp_nbVox[ 2 ] )
continue;
381 numVox = ( i - 1 ) + ( j - 1 ) * mp_nbVox[0] + ( k - 1 ) * mp_nbVox[0] * mp_nbVox[1];
386 coeff = length_LOR * ( *pAlpha - *pAlphaPrevious );
388 ap_ProjectionLine->
AddVoxel(a_direction, numVox, coeff);
397 #ifdef CASTOR_VERBOSE 400 Cout(
"iProjectorClassicSiddon::Project without TOF -> Exit function" << endl);
417 Cerr(
"***** iProjectorClassicSiddon::ProjectTOFListmode() -> Called while not initialized !" << endl);
422 #ifdef CASTOR_VERBOSE 425 string direction =
"";
426 if (a_direction==
FORWARD) direction =
"forward";
427 else direction =
"backward";
428 Cout(
"iProjectorClassicSiddon::Project with TOF measurement -> Project line '" << ap_ProjectionLine <<
"' in " << direction <<
" direction" << endl);
436 FLTNB event1[3] = { event1_position[0], event1_position[1], event1_position[2] };
437 FLTNB event2[3] = { event2_position[0], event2_position[1], event2_position[2] };
447 FLTNB alphaFirst[] = { 0.0, 0.0, 0.0 };
448 FLTNB alphaLast[] = { 0.0, 0.0, 0.0 };
450 FLTNB alphaMin = 0.0, alphaMax = 1.0;
451 FLTNB delta_pos[] = {
452 event2[ 0 ] - event1[ 0 ],
453 event2[ 1 ] - event1[ 1 ],
454 event2[ 2 ] - event1[ 2 ]
465 HPFLTNB tof_sigma_sqrt2 = sqrt(2.)*tof_sigma;
473 HPFLTNB lor_tof_center = length_LOR * 0.5 + tof_delta;
476 HPFLTNB tof_edge_low[] = {0,0,0};
478 HPFLTNB tof_edge_high[] = {0,0,0};
483 for (
int ax=0;ax<3;ax++)
486 tof_center = event1[ax] + lor_tof_center * delta_pos[ax] / length_LOR;
489 tof_edge_low[ax] = tof_center - tof_half_span * fabs(delta_pos[ax]) / length_LOR;
492 if (tof_index>
mp_nbVox[ax]-1)
return 0;
496 tof_edge_high[ax] = tof_center + tof_half_span * fabs(delta_pos[ax]) / length_LOR;
499 if (tof_index<0)
return 0;
506 for(
int i = 0; i < 3; ++i )
508 if( delta_pos[ i ] != 0.0 )
510 alphaFirst[i] = (tof_edge_low[i] - event1[i]) / (delta_pos[ i ]);
511 alphaLast[i] = (tof_edge_high[i] - event1[i]) / (delta_pos[ i ]);
512 alphaMin = (std::max)(alphaMin,(std::min)(alphaFirst[i],alphaLast[i]));
513 alphaMax = (std::min)(alphaMax,(std::max)(alphaFirst[i],alphaLast[i]));
519 if( alphaMax <= alphaMin )
return 0;
523 int iMin = 0, iMax = 0;
524 int jMin = 0, jMax = 0;
525 int kMin = 0, kMax = 0;
528 if( delta_pos[ 0 ] > 0.0 )
531 iMax = ::floor( 1 + ( event1[ 0 ] + alphaMax * delta_pos[ 0 ] - (-
mp_halfFOV[ 0 ]) ) /
mp_sizeVox[0] );
533 else if( delta_pos[ 0 ] < 0.0 )
536 iMax = ::floor( 1 + ( event1[ 0 ] + alphaMin * delta_pos[ 0 ] - (-
mp_halfFOV[ 0 ]) ) /
mp_sizeVox[0] );
538 if( delta_pos[ 0 ] == 0. )
544 if( delta_pos[ 1 ] > 0. )
547 jMax = ::floor( 1 + ( event1[ 1 ] + alphaMax * delta_pos[ 1 ] - (-
mp_halfFOV[ 1 ]) ) /
mp_sizeVox[1] );
549 else if( delta_pos[ 1 ] < 0. )
552 jMax = ::floor( 1 + ( event1[ 1 ] + alphaMin * delta_pos[ 1 ] - (-
mp_halfFOV[ 1 ]) ) /
mp_sizeVox[1] );
554 else if( delta_pos[ 1 ] == 0. )
560 if( delta_pos[ 2 ] > 0. )
563 kMax = ::floor( 1 + ( event1[ 2 ] + alphaMax * delta_pos[ 2 ] - (-
mp_halfFOV[ 2 ]) ) /
mp_sizeVox[2] );
565 else if( delta_pos[ 2 ] < 0. )
568 kMax = ::floor( 1 + ( event1[ 2 ] + alphaMin * delta_pos[ 2 ] - (-
mp_halfFOV[ 2 ]) ) /
mp_sizeVox[2] );
570 else if( delta_pos[ 2 ] == 0. )
576 int n = ( iMax - iMin + 1 ) + ( jMax - jMin + 1 )
577 + ( kMax - kMin + 1 );
582 FLTNB *tmpAlpha =
new FLTNB[ mp_nbVox[ 0 ] + mp_nbVox[ 1 ] + mp_nbVox[ 2 ] + 3 ];
583 FLTNB *alphaX =
new FLTNB[ ( mp_nbVox[ 0 ] + 1 ) ];
584 FLTNB *alphaY =
new FLTNB[ ( mp_nbVox[ 1 ] + 1 ) ];
585 FLTNB *alphaZ =
new FLTNB[ ( mp_nbVox[ 2 ] + 1 ) ];
587 INTNB iElement = iMax - iMin + 1;
591 if( delta_pos[ 0 ] > 0. )
593 for(
int i = iMin; i <= iMax; ++i )
596 else if( delta_pos[ 0 ] < 0. )
598 for(
int i = iMax; i >= iMin; --i )
604 INTNB jElement = jMax - jMin + 1;
608 if( delta_pos[ 1 ] > 0. )
610 for(
int j = jMin; j <= jMax; ++j )
613 else if( delta_pos[ 1 ] < 0. )
615 for(
int j = jMax; j >= jMin; --j )
621 INTNB kElement = kMax - kMin + 1;
625 if( delta_pos[ 2 ] > 0. )
627 for(
int k = kMin; k <= kMax; ++k )
630 else if( delta_pos[ 2 ] < 0. )
632 for(
int k = kMax; k >= kMin; --k )
638 alphaX, alphaX + iElement,
642 ::memcpy( tmpAlpha, alpha, ( iElement ) *
sizeof(
FLTNB ) );
645 alphaY, alphaY + jElement,
646 tmpAlpha, tmpAlpha + iElement,
649 ::memcpy( tmpAlpha, alpha, ( iElement + jElement ) *
sizeof(
FLTNB ) );
652 alphaZ, alphaZ + kElement,
653 tmpAlpha, tmpAlpha + iElement + jElement,
665 FLTNB alphaMid = 0.0;
666 INTNB i = 0, j = 0, k = 0;
667 FLTNB *pAlpha = &alpha[ 1 ];
668 FLTNB *pAlphaPrevious = &alpha[ 0 ];
677 for(
int nP = 0; nP < n - 1; ++nP, ++pAlpha, ++pAlphaPrevious )
679 alphaMid = ( *pAlpha + *pAlphaPrevious ) * 0.5;
681 i = alphaMid * i2 + i1;
682 if( i < 1 || i > mp_nbVox[ 0 ] )
continue;
684 j = alphaMid * j2 + j1;
685 if( j < 1 || j > mp_nbVox[ 1 ] )
continue;
687 k = alphaMid * k2 + k1;
688 if( k < 1 || k > mp_nbVox[ 2 ] )
continue;
690 numVox = ( i - 1 ) + ( j - 1 ) * mp_nbVox[0] + ( k - 1 ) * mp_nbVox[0] * mp_nbVox[1];
693 coeff = length_LOR * ( *pAlpha - *pAlphaPrevious );
711 HPFLTNB temp_erf = std::min(tof_half_span, std::max(-tof_half_span, lor_tof_center -
m_TOFBinSizeInMm/2. - alphaMid * length_LOR));
712 HPFLTNB prev_erf = erf(temp_erf/tof_sigma_sqrt2);
713 temp_erf = std::min(tof_half_span, std::max(-tof_half_span, lor_tof_center +
m_TOFBinSizeInMm/2. - alphaMid * length_LOR));
714 HPFLTNB new_erf = erf(temp_erf/tof_sigma_sqrt2);
729 HPFLTNB temp = (alphaMid * length_LOR - lor_tof_center) / tof_sigma;
745 #ifdef CASTOR_VERBOSE 748 Cout(
"iProjectorClassicSiddon::Project with TOF measurement-> Exit function" << endl);
765 Cerr(
"***** iProjectorClassicSiddon::ProjectTOFHistogram() -> Called while not initialized !" << endl);
770 #ifdef CASTOR_VERBOSE 773 string direction =
"";
774 if (a_direction==
FORWARD) direction =
"forward";
775 else direction =
"backward";
776 Cout(
"iProjectorClassicSiddon::Project with TOF bins -> Project line '" << ap_ProjectionLine <<
"' in " << direction <<
" direction" << endl);
784 FLTNB event1[3] = { event1_position[0], event1_position[1], event1_position[2] };
785 FLTNB event2[3] = { event2_position[0], event2_position[1], event2_position[2] };
791 FLTNB length_LOR_half = length_LOR * 0.5;
796 FLTNB alphaFirst[] = { 0.0, 0.0, 0.0 };
797 FLTNB alphaLast[] = { 0.0, 0.0, 0.0 };
799 FLTNB alphaMin = 0.0, alphaMax = 1.0;
800 FLTNB delta_pos[] = {
801 event2[ 0 ] - event1[ 0 ],
802 event2[ 1 ] - event1[ 1 ],
803 event2[ 2 ] - event1[ 2 ]
808 INTNB tof_half_nb_bins = tof_nb_bins/2;
812 HPFLTNB tof_sigma_sqrt2 = sqrt(2.)*tof_sigma;
818 HPFLTNB prev_erf = 0., new_erf = 0.;
821 INTNB tof_bin_last = tof_half_nb_bins;
822 INTNB tof_bin_first = -tof_half_nb_bins;
830 INTNB tof_bin_first_for_voxel = 0, tof_bin_last_for_voxel = 0;
835 for(
int i = 0; i < 3; ++i )
837 if( delta_pos[ i ] != 0.0 )
839 alphaFirst[i] = (-
mp_halfFOV[i] - event1[i]) / (delta_pos[ i ]);
840 alphaLast[i] = (
mp_halfFOV[i] - event1[i]) / (delta_pos[ i ]);
841 alphaMin = (std::max)(alphaMin,(std::min)(alphaFirst[i],alphaLast[i]));
842 alphaMax = (std::min)(alphaMax,(std::max)(alphaFirst[i],alphaLast[i]));
848 if( alphaMax <= alphaMin )
return 0;
852 int iMin = 0, iMax = 0;
853 int jMin = 0, jMax = 0;
854 int kMin = 0, kMax = 0;
857 if( delta_pos[ 0 ] > 0.0 )
860 iMax = ::floor( 1 + ( event1[ 0 ] + alphaMax * delta_pos[ 0 ] - (-
mp_halfFOV[ 0 ]) ) /
mp_sizeVox[0] );
862 else if( delta_pos[ 0 ] < 0.0 )
865 iMax = ::floor( 1 + ( event1[ 0 ] + alphaMin * delta_pos[ 0 ] - (-
mp_halfFOV[ 0 ]) ) /
mp_sizeVox[0] );
867 if( delta_pos[ 0 ] == 0. )
873 if( delta_pos[ 1 ] > 0. )
876 jMax = ::floor( 1 + ( event1[ 1 ] + alphaMax * delta_pos[ 1 ] - (-
mp_halfFOV[ 1 ]) ) /
mp_sizeVox[1] );
878 else if( delta_pos[ 1 ] < 0. )
881 jMax = ::floor( 1 + ( event1[ 1 ] + alphaMin * delta_pos[ 1 ] - (-
mp_halfFOV[ 1 ]) ) /
mp_sizeVox[1] );
883 else if( delta_pos[ 1 ] == 0. )
889 if( delta_pos[ 2 ] > 0. )
892 kMax = ::floor( 1 + ( event1[ 2 ] + alphaMax * delta_pos[ 2 ] - (-
mp_halfFOV[ 2 ]) ) /
mp_sizeVox[2] );
894 else if( delta_pos[ 2 ] < 0. )
897 kMax = ::floor( 1 + ( event1[ 2 ] + alphaMin * delta_pos[ 2 ] - (-
mp_halfFOV[ 2 ]) ) /
mp_sizeVox[2] );
899 else if( delta_pos[ 2 ] == 0. )
905 int n = ( iMax - iMin + 1 ) + ( jMax - jMin + 1 )
906 + ( kMax - kMin + 1 );
911 FLTNB *tmpAlpha =
new FLTNB[ mp_nbVox[ 0 ] + mp_nbVox[ 1 ] + mp_nbVox[ 2 ] + 3 ];
912 FLTNB *alphaX =
new FLTNB[ ( mp_nbVox[ 0 ] + 1 ) ];
913 FLTNB *alphaY =
new FLTNB[ ( mp_nbVox[ 1 ] + 1 ) ];
914 FLTNB *alphaZ =
new FLTNB[ ( mp_nbVox[ 2 ] + 1 ) ];
919 for (
INTNB tof_bin=0; tof_bin<tof_nb_bins; tof_bin++) tof_weights_temp[tof_bin] = 0.;
921 INTNB iElement = iMax - iMin + 1;
925 if( delta_pos[ 0 ] > 0. )
927 for(
int i = iMin; i <= iMax; ++i )
930 else if( delta_pos[ 0 ] < 0. )
932 for(
int i = iMax; i >= iMin; --i )
938 INTNB jElement = jMax - jMin + 1;
942 if( delta_pos[ 1 ] > 0. )
944 for(
int j = jMin; j <= jMax; ++j )
947 else if( delta_pos[ 1 ] < 0. )
949 for(
int j = jMax; j >= jMin; --j )
955 INTNB kElement = kMax - kMin + 1;
959 if( delta_pos[ 2 ] > 0. )
961 for(
int k = kMin; k <= kMax; ++k )
964 else if( delta_pos[ 2 ] < 0. )
966 for(
int k = kMax; k >= kMin; --k )
972 alphaX, alphaX + iElement,
976 ::memcpy( tmpAlpha, alpha, ( iElement ) *
sizeof(
FLTNB ) );
979 alphaY, alphaY + jElement,
980 tmpAlpha, tmpAlpha + iElement,
983 ::memcpy( tmpAlpha, alpha, ( iElement + jElement ) *
sizeof(
FLTNB ) );
986 alphaZ, alphaZ + kElement,
987 tmpAlpha, tmpAlpha + iElement + jElement,
999 FLTNB alphaMid = 0.0;
1000 INTNB i = 0, j = 0, k = 0;
1001 FLTNB *pAlpha = &alpha[ 1 ];
1002 FLTNB *pAlphaPrevious = &alpha[ 0 ];
1007 for(
int nP = 0; nP < n - 1; ++nP, ++pAlpha, ++pAlphaPrevious )
1009 alphaMid = ( *pAlpha + *pAlphaPrevious ) * 0.5;
1011 i = alphaMid * i2 + i1;
1012 if( i < 1 || i > mp_nbVox[ 0 ] )
continue;
1014 j = alphaMid * j2 + j1;
1015 if( j < 1 || j > mp_nbVox[ 1 ] )
continue;
1017 k = alphaMid * k2 + k1;
1018 if( k < 1 || k > mp_nbVox[ 2 ] )
continue;
1020 numVox = ( i - 1 ) + ( j - 1 ) * mp_nbVox[0] + ( k - 1 ) * mp_nbVox[0] * mp_nbVox[1];
1025 coeff = length_LOR * ( *pAlpha - *pAlphaPrevious );
1037 tof_bin_first_for_voxel = max(tof_bin_first , (
INTNB)(ceil( (alphaMid * length_LOR - tof_half_span - length_LOR_half ) /
m_TOFBinSizeInMm )));
1038 tof_bin_last_for_voxel = min(tof_bin_last , (
INTNB)(floor( (alphaMid * length_LOR + tof_half_span - length_LOR_half) /
m_TOFBinSizeInMm )));
1041 lor_tof_center = length_LOR_half + tof_bin_first_for_voxel *
m_TOFBinSizeInMm;
1044 tof_bin_first_for_voxel += tof_half_nb_bins;
1045 tof_bin_last_for_voxel += tof_half_nb_bins;
1051 HPFLTNB temp = std::min(tof_half_span,std::max(-tof_half_span, lor_tof_center - m_TOFBinSizeInMm/2. - alphaMid * length_LOR));
1052 prev_erf = erf(temp/tof_sigma_sqrt2);
1057 for (
INTNB tof_bin=tof_bin_first_for_voxel; tof_bin<=tof_bin_last_for_voxel; tof_bin++)
1077 HPFLTNB temp = std::min(tof_half_span, std::max(-tof_half_span, lor_tof_center + m_TOFBinSizeInMm/2. - alphaMid * length_LOR));
1078 new_erf = erf(temp/tof_sigma_sqrt2);
1079 tof_weights_temp[tof_bin] = 0.5 * fabs(new_erf - prev_erf);
1089 HPFLTNB temp = (alphaMid * length_LOR - lor_tof_center) / tof_sigma;
1107 ap_ProjectionLine->
AddVoxelAllTOFBins(a_direction, numVox, coeff, tof_weights_temp, tof_bin_first_for_voxel, tof_bin_last_for_voxel);
1116 delete[] tof_weights_temp;
1118 #ifdef CASTOR_VERBOSE 1121 Cout(
"iProjectorClassicSiddon::Project with TOF bins -> Exit function" << endl);
void ShowHelpSpecific()
A function used to show help about the child projector.
bool m_compatibleWithSPECTAttenuationCorrection
int ProjectTOFHistogram(int a_direction, oProjectionLine *ap_ProjectionLine)
A function to project with TOF binned information.
#define SPEED_OF_LIGHT_IN_MM_PER_PS
FLTNB m_TOFGaussianNormCoef
void AddVoxelAllTOFBins(int a_direction, INTNB a_voxelIndex, FLTNB a_voxelWeight, HPFLTNB *a_tofWeights, INTNB a_tofBinFirst, INTNB a_tofBinLast)
Add a voxel contribution to the line for all relevant TOF bins.
#define TWO_SQRT_TWO_LN_2
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
FLTNB GetTOFMeasurementInPs()
This function is used to get the TOF measurement in ps.
This class is designed to generically described any on-the-fly projector.
bool m_TOFWeightingFcnPrecomputedFlag
bool m_TOFBinProperProcessingFlag
HPFLTNB * mp_TOFWeightingFcn
FLTNB GetLength()
This function is used to get the length of the line.
int ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
iProjectorClassicSiddon()
The constructor of iProjectorClassicSiddon.
FLTNB * GetPosition1()
This function is used to get the pointer to the mp_position1 (3-values tab).
void AddVoxel(int a_direction, INTNB a_voxelIndice, FLTNB a_voxelWeight)
This function is used to add a voxel contribution to the line, assuming TOF bin 0 (i...
FLTNB m_TOFResolutionInMm
~iProjectorClassicSiddon()
The destructor of iProjectorClassicSiddon.
Declaration of class iProjectorClassicSiddon.
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child projector.
int ProjectTOFListmode(int a_direction, oProjectionLine *ap_ProjectionLine)
A function to project with TOF continuous information.
This class is designed to manage and store system matrix elements associated to a vEvent...
INTNB EstimateMaxNumberOfVoxelsPerLine()
This function is used to compute and provide an estimate of the maximum number of voxels that could c...
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
FLTNB m_TOFPrecomputedSamplingFactor
Declaration of class sOutputManager.
int GetNbTOFBins()
This function is used to get the number of TOF bins in use.
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.
int ProjectWithoutTOF(int a_direction, oProjectionLine *ap_ProjectionLine)
A function to project without TOF.
bool m_compatibleWithCompression
int InitializeSpecific()
This function is used to initialize specific stuff to the child projector.
INTNB GetNbVoxY()
Get the number of voxels along the Y axis.
INTNB m_TOFWeightingFcnNbSamples