22 #ifndef EXTRA_STIR_TYPES 23 #define EXTRA_STIR_TYPES 25 #define WIN32_LEAN_AND_MEAN 40 #include "sirf/common/JacobiCG.h" 42 #include "stir/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMeanAndProjData.h" 44 #define MIN_BIN_EFFICIENCY 1.0e-20f 46 #define SIRF_DYNAMIC_CAST(T, X, Y) T& X = dynamic_cast<T&>(Y) 101 store_prompts =
true;
102 store_delayeds =
false;
103 delayed_increment = 0;
105 display_interval = 1;
110 void set_input(std::string lm_file)
112 input_filename = lm_file;
113 lm_data_ptr = stir::read_from_file<ListModeData>(input_filename);
114 exam_info_sptr_.reset(
new ExamInfo(lm_data_ptr->get_exam_info()));
115 proj_data_info_sptr_.reset(lm_data_ptr->get_proj_data_info_sptr()->clone());
122 output_filename_prefix = proj_data_file;
124 void set_template(std::string proj_data_file)
127 set_template(acq_data_template);
131 template_proj_data_info_ptr =
132 acq_data_template.get_proj_data_info_sptr()->create_shared_clone();
134 void set_time_interval(
double start,
double stop)
136 std::pair<double, double> interval(start, stop);
137 std::vector < std::pair<double, double> > intervals;
138 intervals.push_back(interval);
139 frame_defs = stir::TimeFrameDefinitions(intervals);
140 do_time_frame =
true;
142 int set_flag(
const char* flag,
bool value)
145 store_prompts = value;
147 store_delayeds = value;
150 do_pre_normalisation = value;
152 do_time_frame = value;
160 bool get_store_prompts()
const 162 return store_prompts;
164 bool get_store_delayeds()
const 166 return store_delayeds;
168 virtual stir::Succeeded set_up()
170 if (LmToProjData::set_up() == Succeeded::no)
171 THROW(
"LmToProjData setup failed");
173 const int max_fan_size =
174 lm_data_ptr->get_scanner_ptr()->get_max_num_non_arccorrected_bins();
176 fan_size = max_fan_size;
179 std::min(fan_size, max_fan_size);
180 half_fan_size = fan_size / 2;
181 fan_size = 2 * half_fan_size + 1;
183 exam_info_sptr_->set_time_frame_definitions(frame_defs);
184 const float h = proj_data_info_sptr_->get_bed_position_horizontal();
185 const float v = proj_data_info_sptr_->get_bed_position_vertical();
186 stir::shared_ptr<ProjDataInfo> temp_proj_data_info_sptr(template_proj_data_info_ptr->clone());
187 temp_proj_data_info_sptr->set_bed_position_horizontal(h);
188 temp_proj_data_info_sptr->set_bed_position_vertical(v);
191 return stir::Succeeded::yes;
193 int estimate_randoms();
196 std::string filename = output_filename_prefix +
"_randoms" +
"_f1g1d0b0.hs";
197 randoms_sptr->write(filename.c_str());
199 std::shared_ptr<PETAcquisitionData> get_output()
201 std::string filename = output_filename_prefix +
"_f1g1d0b0.hs";
202 return std::shared_ptr<PETAcquisitionData>
205 std::shared_ptr<PETAcquisitionData> get_randoms_sptr()
217 int max_ring_diff_for_fansums;
219 int display_interval;
222 stir::shared_ptr<ExamInfo> exam_info_sptr_;
223 stir::shared_ptr<ProjDataInfo> proj_data_info_sptr_;
224 stir::shared_ptr<std::vector<stir::Array<2, float> > > fan_sums_sptr;
225 stir::shared_ptr<stir::DetectorEfficiencies> det_eff_sptr;
226 std::shared_ptr<PETAcquisitionData> randoms_sptr;
227 void compute_fan_sums_(
bool prompt_fansum =
false);
228 int compute_singles_();
230 static unsigned long compute_num_bins_(
const int num_rings,
231 const int num_detectors_per_ring,
232 const int max_ring_diff,
const int half_fan_size);
252 norm_.reset(
new stir::ChainedBinNormalisation(mod1.data(), mod2.data()));
255 void set_up(
const stir::shared_ptr<const stir::ExamInfo>& exam_info_sptr,
256 const stir::shared_ptr<stir::ProjDataInfo>&);
265 std::shared_ptr<PETAcquisitionData> sptr_ad = ad.new_acquisition_data();
267 this->unnormalise(*sptr_ad);
273 std::shared_ptr<PETAcquisitionData> sptr_ad = ad.new_acquisition_data();
275 this->normalise(*sptr_ad);
279 stir::shared_ptr<stir::BinNormalisation> data()
286 stir::shared_ptr<stir::BinNormalisation> norm_;
356 void set_subset(
int sub_num)
360 void set_num_subsets(
int num_sub)
364 virtual std::shared_ptr<STIRImageData> apply(
STIRImageData& image_data)
366 std::shared_ptr<PETAcquisitionData> sptr_fwd =
367 sptr_am_->forward(image_data, sub_num_, num_sub_);
368 std::shared_ptr<STIRImageData> sptr_bwd =
369 sptr_am_->backward(*sptr_fwd, sub_num_, num_sub_);
373 std::shared_ptr<const PETAcquisitionModel> sptr_am_;
386 float norm(
int subset_num = 0,
int num_subsets = 1,
int num_iter = 2,
int verb = 0)
const 389 bf.set_subset(subset_num);
390 bf.set_num_subsets(num_subsets);
392 jcg.set_num_iterations(num_iter);
394 image_data.fill(1.0);
395 float lmd = jcg.largest(bf, image_data, verb);
396 return std::sqrt(lmd);
399 void set_projectors(stir::shared_ptr<stir::ProjectorByBinPair> sptr_projectors)
401 sptr_projectors_ = sptr_projectors;
403 const stir::shared_ptr<stir::ProjectorByBinPair> projectors_sptr()
const 405 return sptr_projectors_;
407 void set_additive_term(std::shared_ptr<PETAcquisitionData> sptr)
411 std::shared_ptr<const PETAcquisitionData> additive_term_sptr()
const 415 void set_background_term(std::shared_ptr<PETAcquisitionData> sptr)
417 sptr_background_ = sptr;
419 std::shared_ptr<const PETAcquisitionData> background_term_sptr()
const 421 return sptr_background_;
423 std::shared_ptr<const PETAcquisitionData> acq_template_sptr()
const 425 return sptr_acq_template_;
427 std::shared_ptr<const STIRImageData> image_template_sptr()
const 429 return sptr_image_template_;
435 const stir::shared_ptr<stir::BinNormalisation> normalisation_sptr()
const 438 return sptr_asm_->data();
439 stir::shared_ptr<stir::BinNormalisation> sptr;
448 void set_asm(std::shared_ptr<PETAcquisitionSensitivityModel> sptr_asm)
451 sptr_asm_ = sptr_asm;
453 stir::shared_ptr<PETAcquisitionSensitivityModel> asm_sptr()
const 461 void set_image_data_processor(stir::shared_ptr<ImageDataProcessor> sptr_processor);
462 void cancel_background_term()
464 sptr_background_.reset();
466 void cancel_additive_term()
470 void cancel_normalisation()
475 std::shared_ptr<const PETAcquisitionModel> linear_acq_mod_sptr()
const 478 sptr_am->set_projectors(sptr_projectors_);
479 sptr_am->set_asm(sptr_asm_);
480 sptr_am->sptr_acq_template_ = sptr_acq_template_;
481 sptr_am->sptr_image_template_ = sptr_image_template_;
486 std::shared_ptr<PETAcquisitionData> sptr_acq,
487 std::shared_ptr<STIRImageData> sptr_image);
492 std::shared_ptr<PETAcquisitionData>
494 int subset_num = 0,
int num_subsets = 1,
bool do_linear_only =
false)
const;
506 int subset_num,
int num_subsets,
bool zero =
false,
bool do_linear_only =
false)
const;
510 int subset_num = 0,
int num_subsets = 1)
const;
513 int subset_num = 0,
int num_subsets = 1)
const;
516 stir::shared_ptr<stir::ProjectorByBinPair> sptr_projectors_;
517 std::shared_ptr<PETAcquisitionData> sptr_acq_template_;
518 std::shared_ptr<STIRImageData> sptr_image_template_;
519 std::shared_ptr<PETAcquisitionData> sptr_add_;
520 std::shared_ptr<PETAcquisitionData> sptr_background_;
521 std::shared_ptr<PETAcquisitionSensitivityModel> sptr_asm_;
545 stir::SingleScatterSimulation(filename)
548 void set_up(std::shared_ptr<const PETAcquisitionData> sptr_acq_template,
549 std::shared_ptr<const STIRImageData> sptr_act_image_template)
551 this->sptr_acq_template_ = sptr_acq_template;
553 stir::SingleScatterSimulation::set_template_proj_data_info(
554 *sptr_acq_template_->get_proj_data_info_sptr());
555 stir::SingleScatterSimulation::set_exam_info(
556 *sptr_acq_template_->get_exam_info_sptr());
560 auto& tmp = stir::SingleScatterSimulation::get_attenuation_image();
564 THROW(
"Fatal error in PETSingleScatterSimulator::set_up: attenuation_image has not been set");
566 this->set_activity_image_sptr(sptr_act_image_template);
568 if (stir::SingleScatterSimulation::set_up() == Succeeded::no)
569 THROW(
"Fatal error in PETSingleScatterSimulator::set_up() failed.");
572 void set_activity_image_sptr(std::shared_ptr<const STIRImageData> arg)
574 #if STIR_VERSION < 050000 576 stir::shared_ptr<Image3DF> sptr_image_copy(arg->data_sptr()->clone());
577 stir::SingleScatterSimulation::set_activity_image_sptr(sptr_image_copy);
579 stir::SingleScatterSimulation::set_activity_image_sptr(arg->data_sptr());
583 void set_attenuation_image_sptr(std::shared_ptr<const STIRImageData> arg)
585 #if STIR_VERSION < 050000 587 stir::shared_ptr<Image3DF> sptr_image_copy(arg->data_sptr()->clone());
588 stir::SingleScatterSimulation::set_density_image_sptr(sptr_image_copy);
590 stir::SingleScatterSimulation::set_density_image_sptr(arg->data_sptr());
594 std::shared_ptr<PETAcquisitionData> forward(
const STIRImageData& activity_img)
596 if (!sptr_acq_template_.get())
597 THROW(
"Fatal error in PETSingleScatterSimulator::forward: acquisition template not set");
598 std::shared_ptr<PETAcquisitionData> sptr_ad =
599 sptr_acq_template_->new_acquisition_data();
600 this->forward( *sptr_ad, activity_img);
606 stir::shared_ptr<ProjData> sptr_fd = ad.data();
607 this->set_output_proj_data_sptr(sptr_fd);
609 this->process_data();
613 std::shared_ptr<const PETAcquisitionData> sptr_acq_template_;
635 stir::shared_ptr<stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData<DiscretisedDensity<3,float> > >
636 obj_sptr(
new PoissonLogLikelihoodWithLinearModelForMeanAndProjData<DiscretisedDensity<3,float> >);
637 stir::shared_ptr<stir::OSMAPOSLReconstruction<DiscretisedDensity<3,float> > >
638 recon_sptr(
new stir::OSMAPOSLReconstruction<DiscretisedDensity<3,float> >);
639 recon_sptr->set_num_subiterations(8);
640 recon_sptr->set_num_subsets(7);
641 recon_sptr->set_disable_output(
true);
642 recon_sptr->set_objective_function_sptr(obj_sptr);
643 stir::shared_ptr<stir::SeparableGaussianImageFilter<float> >
644 filter_sptr(
new stir::SeparableGaussianImageFilter<float>);
645 filter_sptr->set_fwhms(stir::make_coordinate(15.F,15.F,15.F));
646 recon_sptr->set_post_processor_sptr(filter_sptr);
647 stir::ScatterEstimation::set_reconstruction_method_sptr(recon_sptr);
651 stir::ScatterEstimation(filename)
657 stir::ScatterEstimation::set_input_proj_data_sptr(arg->data());
662 stir::ScatterEstimation::set_attenuation_correction_proj_data_sptr(arg->data());
665 void set_asm(std::shared_ptr<PETAcquisitionSensitivityModel> arg)
667 stir::ScatterEstimation::set_normalisation_sptr(arg->data());
672 stir::ScatterEstimation::set_background_proj_data_sptr(arg->data());
675 void set_attenuation_image_sptr(std::shared_ptr<const STIRImageData> arg)
677 #if STIR_VERSION < 050000 679 stir::shared_ptr<Image3DF> sptr_image_copy(arg->data_sptr()->clone());
680 stir::ScatterEstimation::set_attenuation_image_sptr(sptr_image_copy);
682 stir::ScatterEstimation::set_attenuation_image_sptr(arg->data_sptr());
695 stir::ScatterEstimation::set_export_scatter_estimates_of_each_iteration(!prefix.empty());
696 stir::ScatterEstimation::set_output_scatter_estimate_prefix(prefix);
699 void set_num_iterations(
int arg)
701 stir::ScatterEstimation::set_num_iterations(arg);
704 int get_num_iterations()
const 706 return stir::ScatterEstimation::get_num_iterations();
709 std::shared_ptr<PETAcquisitionData> get_scatter_estimate(
int est_num = -1)
const 712 est_num = num_scatter_iterations;
713 if (est_num == num_scatter_iterations)
716 if (output_scatter_estimate_prefix.empty())
717 THROW(
"output_scatter_estimate_prefix not set, so scatter estimates were not saved to file.");
718 const std::string filename = output_scatter_estimate_prefix +
"_" + std::to_string(est_num) +
".hs";
719 return std::make_shared<PETAcquisitionDataInFile>(filename.c_str());
725 auto stir_proj_data_sptr = stir::ScatterEstimation::get_output();
726 if (!stir_proj_data_sptr)
727 THROW(
"output not yet computed");
728 std::shared_ptr<PETAcquisitionData> sptr_acq_data
729 (PETAcquisitionData::storage_template()->same_acquisition_data(stir_proj_data_sptr->get_exam_info_sptr(),
730 stir_proj_data_sptr->get_proj_data_info_sptr()->create_shared_clone()));
731 sptr_acq_data->data()->fill(*stir_proj_data_sptr);
732 return sptr_acq_data;
745 const float zoom = 0.2F;
746 stir::shared_ptr<Voxels3DF>
747 image_sptr(
new Voxels3DF(MAKE_SHARED<stir::ExamInfo>(*this->get_input_data()->get_exam_info_sptr()),
748 *this->get_input_data()->get_proj_data_info_sptr(),
750 image_sptr->fill(1.F);
751 stir::ScatterEstimation::set_initial_activity_image_sptr(image_sptr);
752 if (stir::ScatterEstimation::set_up() == Succeeded::no)
753 THROW(
"scatter estimation set_up failed");
754 return Succeeded::yes;
758 if (!stir::ScatterEstimation::already_setup())
759 THROW(
"scatter estimation needs to be set-up first");
760 if (stir::ScatterEstimation::process_data() == Succeeded::no)
761 THROW(
"scatter estimation failed");
783 this->sptr_projectors_.reset(
new ProjectorPairUsingMatrix);
785 void set_matrix(stir::shared_ptr<stir::ProjMatrixByBin> sptr_matrix)
787 sptr_matrix_ = sptr_matrix;
788 ((ProjectorPairUsingMatrix*)this->sptr_projectors_.get())->
789 set_proj_matrix_sptr(sptr_matrix);
791 stir::shared_ptr<stir::ProjMatrixByBin> matrix_sptr()
798 std::shared_ptr<PETAcquisitionData> sptr_acq,
799 std::shared_ptr<STIRImageData> sptr_image)
801 if (!sptr_matrix_.get())
802 THROW(
"PETAcquisitionModelUsingMatrix setup failed - matrix not set");
803 PETAcquisitionModel::set_up(sptr_acq, sptr_image);
809 sptr_matrix_->enable_cache(v);
813 stir::shared_ptr<stir::ProjMatrixByBin> sptr_matrix_;
822 stir::shared_ptr<RayTracingMatrix> matrix_sptr(
new RayTracingMatrix);
823 matrix_sptr->set_num_tangential_LORs(num_LORs);
824 set_matrix(matrix_sptr);
826 void set_num_tangential_LORs(
int num_LORs)
829 auto matrix =
dynamic_cast<RayTracingMatrix&
>(*matrix_sptr());
831 matrix.set_num_tangential_LORs(num_LORs);
837 auto matrix =
dynamic_cast<const RayTracingMatrix&
>(*matrix_sptr());
838 return matrix.get_num_tangential_LORs();
843 auto matrix =
dynamic_cast<RayTracingMatrix&
>(*matrix_sptr());
844 matrix.set_restrict_to_cylindrical_FOV(v);
849 void set_do_symmetry_90degrees_min_phi(
bool v =
true)
851 auto matrix =
dynamic_cast<RayTracingMatrix&
>(*matrix_sptr());
852 matrix.set_do_symmetry_90degrees_min_phi(v);
855 void set_do_symmetry_180degrees_min_phi(
bool v =
true)
857 auto matrix =
dynamic_cast<RayTracingMatrix&
>(*matrix_sptr());
858 matrix.set_do_symmetry_180degrees_min_phi(v);
861 void set_do_symmetry_swap_segment(
bool v =
true)
863 auto matrix =
dynamic_cast<RayTracingMatrix&
>(*matrix_sptr());
864 matrix.set_do_symmetry_swap_segment(v);
867 void set_do_symmetry_swap_s(
bool v =
true)
869 auto matrix =
dynamic_cast<RayTracingMatrix&
>(*matrix_sptr());
870 matrix.set_do_symmetry_swap_s(v);
873 void set_do_symmetry_shift_z(
bool v =
true)
875 auto matrix =
dynamic_cast<RayTracingMatrix&
>(*matrix_sptr());
876 matrix.set_do_symmetry_shift_z(v);
882 typedef std::shared_ptr<AcqMod3DF> sptrAcqMod3DF;
884 #ifdef STIR_WITH_NiftyPET_PROJECTOR 892 PETAcquisitionModelUsingNiftyPET()
894 _NiftyPET_projector_pair_sptr.reset(
new ProjectorPairUsingNiftyPET);
895 this->sptr_projectors_ = _NiftyPET_projector_pair_sptr;
897 _NiftyPET_projector_pair_sptr->set_verbosity(0);
899 void set_cuda_verbosity(
const bool verbosity)
const 901 _NiftyPET_projector_pair_sptr->set_verbosity(verbosity);
903 void set_use_truncation(
const bool use_truncation)
const 905 _NiftyPET_projector_pair_sptr->set_use_truncation(use_truncation);
908 stir::shared_ptr<stir::ProjectorPairUsingNiftyPET> _NiftyPET_projector_pair_sptr;
910 typedef PETAcquisitionModelUsingNiftyPET AcqModUsingNiftyPET3DF;
913 #ifdef STIR_WITH_Parallelproj_PROJECTOR 921 PETAcquisitionModelUsingParallelproj()
923 this->sptr_projectors_.reset(
new ProjectorByBinPairUsingParallelproj);
926 typedef PETAcquisitionModelUsingParallelproj AcqModUsingParallelproj;
943 stir::shared_ptr<stir::ForwardProjectorByBin> sptr_forw_projector_;
964 void only2D(
int only) {
971 void only2D(
int only) {
977 public stir::GeneralisedObjectiveFunction < Image3DF > {
987 public stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData < Image3DF > {
989 void set_input_file(
const char* filename) {
990 input_filename = filename;
992 void set_acquisition_data(std::shared_ptr<PETAcquisitionData> sptr)
995 set_proj_data_sptr(sptr->data());
997 void set_acquisition_model(std::shared_ptr<AcqMod3DF> sptr_am)
1000 AcqMod3DF& am = *sptr_am;
1001 auto sptr_asm = am.asm_sptr();
1002 set_projector_pair_sptr(am.projectors_sptr());
1003 bool have_a = am.additive_term_sptr().get();
1004 bool have_b = am.background_term_sptr().get();
1005 bool have_asm = sptr_asm.get();
1008 set_additive_proj_data_sptr(am.additive_term_sptr()->data());
1011 auto sptr_b = am.background_term_sptr();
1012 stir::shared_ptr<PETAcquisitionData> sptr;
1014 sptr = sptr_asm->invert(*sptr_b);
1016 sptr = sptr_b->clone();
1018 auto sptr_a = am.additive_term_sptr();
1020 sptr->axpby(&a, *sptr, &a, *sptr_a);
1022 set_additive_proj_data_sptr(sptr->data());
1024 if (am.normalisation_sptr().get())
1025 set_normalisation_sptr(am.normalisation_sptr());
1027 std::shared_ptr<AcqMod3DF> acquisition_model_sptr()
1032 std::shared_ptr<PETAcquisitionData> sptr_ad_;
1033 std::shared_ptr<AcqMod3DF> sptr_am_;
1040 public stir::IterativeReconstruction < Image3DF > {
1048 void update(Image3DF &image) {
1049 update_estimate(image);
1050 end_of_iteration_processing(image);
1057 void update(stir::shared_ptr<STIRImageData> sptr_id)
1061 int& subiteration() {
1062 return subiteration_num;
1064 int subiteration()
const {
1065 return subiteration_num;
1067 void set_initial_estimate_file(
const char* filename) {
1068 initial_data_filename = filename;
1074 int& subiteration() {
1075 return subiteration_num;
1077 int subiteration()
const {
1078 return subiteration_num;
1084 float& relaxation_parameter_value() {
1085 return relaxation_parameter;
1097 set_input_data(acq.data());
1099 void set_zoom(
float v)
1104 void set_alpha_ramp(
double alpha)
1108 if (!(alpha > 0 && alpha <= 1.0))
1110 (
"wrong ramp filter parameter alpha", __FILE__, __LINE__);
1113 void set_frequency_cut_off(
double fc)
1115 if (!(fc > 0 && fc <= 0.5))
1117 (
"wrong frequency cut-off", __FILE__, __LINE__);
1120 void set_up(std::shared_ptr<STIRImageData> sptr_id)
1123 stir::Succeeded s = stir::Reconstruction<Image3DF>::set_up(_sptr_image_data->data_sptr());
1124 if (s != stir::Succeeded::yes)
1125 THROW(
"stir::Reconstruction setup failed");
1134 stir::Succeeded s = stir::Succeeded::no;
1136 stir::shared_ptr<Image3DF> sptr_image(construct_target_image_ptr());
1138 stir::Reconstruction<Image3DF>::set_up(sptr_image);
1139 s = reconstruct(sptr_image);
1142 s = reconstruct(_sptr_image_data->data_sptr());
1143 if (s != stir::Succeeded::yes)
1144 THROW(
"stir::AnalyticReconstruction::reconstruct failed");
1146 std::shared_ptr<STIRImageData> get_output()
1148 return _sptr_image_data;
1152 std::shared_ptr<STIRImageData> _sptr_image_data;
1156 public stir::SeparableGaussianImageFilter<float> {
1166 void set_fwhms_xyz(
char xyz,
float f)
1168 stir::BasicCoordinate<3, float> v = get_fwhms();
1181 void set_max_kernel_sizes_xyz(
char xyz,
int s)
1183 stir::BasicCoordinate<3, int> v = get_max_kernel_sizes();
1194 set_max_kernel_sizes(v);
STIR DiscretisedDensity<3, float> wrapper with added functionality.
Definition: stir_data_containers.h:783
Definition: stir_x.h:1039
Definition: LocalisedException.h:32
Ray tracing matrix implementation of the PET acquisition model.
Definition: stir_x.h:779
PETSingleScatterSimulator()
Default constructor.
Definition: stir_x.h:541
std::shared_ptr< PETAcquisitionData > get_output() const
get last scatter estimate
Definition: stir_x.h:723
bool iequals(const std::string &a, const std::string &b)
Case insensitive string comparison, replaces boost::iequals.
Definition: iequals.cpp:7
Case insensitive string comparison sirf::iequals.
void enable_cache(bool v=true)
Enables or disables the caching mechanism.
Definition: stir_x.h:807
Definition: stir_x.h:1072
int get_num_tangential_LORs()
@
Definition: stir_x.h:835
Succeeded set_up()
set up the object and performs checks
Definition: stir_x.h:742
PETScatterEstimator(std::string filename)
Overloaded constructor which takes the parameter file.
Definition: stir_x.h:650
Definition: stir_x.h:1089
void set_output(std::string proj_data_file)
Specifies the prefix for the output file(s),.
Definition: stir_x.h:120
std::unique_ptr< STIRImageData > clone() const
Clone and return as unique pointer.
Definition: stir_data_containers.h:1094
DataProcessor3DF ImageDataProcessor
A typedef to use SIRF terminology for DataProcessors.
Definition: stir_x.h:297
In-memory implementation of PETAcquisitionData.
Definition: stir_data_containers.h:534
void set_output_prefix(std::string prefix)
Set prefix for filenames with scatter estimates.
Definition: stir_x.h:693
Accessor classes.
Definition: stir_x.h:955
Class for simulating the scatter contribution to PET data.
Definition: stir_x.h:537
In-file implementation of PETAcquisitionData.
Definition: stir_data_containers.h:420
void set_background_sptr(std::shared_ptr< const PETAcquisitionData > arg)
Set the background data (normally equal to the randoms in PET)
Definition: stir_x.h:670
Specification file for data handling types not present in STIR.
Definition: JacobiCG.h:37
Class for a PET acquisition model.
Definition: stir_x.h:344
Abstract data container.
Definition: GeometricalInfo.cpp:141
Class for the product of backward and forward projectors of a PET acquisition model.
Definition: stir_x.h:353
Class for PET scanner detector efficiencies model.
Definition: stir_x.h:241
void set_attenuation_correction_factors_sptr(std::shared_ptr< const PETAcquisitionData > arg)
Set attenuation correction factors as acq_data.
Definition: stir_x.h:660
PETSingleScatterSimulator(std::string filename)
Overloaded constructor which takes the parameter file.
Definition: stir_x.h:544
void set_asm(std::shared_ptr< PETAcquisitionSensitivityModel > arg)
Set acquisition sensitivity model specifying detection efficiencies (without attenuation) ...
Definition: stir_x.h:665
ListmodeToSinograms(const char *par)
Constructor.
Definition: stir_x.h:96
float get_time_at_which_num_prompts_exceeds_threshold(const unsigned long threshold) const
Definition: stir_x.cpp:53
Definition: stir_x.h:1082
Class for estimating the scatter contribution in PET projection data.
Definition: stir_x.h:629
Listmode-to-sinograms converter.
Definition: stir_x.h:83
void set_input_sptr(std::shared_ptr< const PETAcquisitionData > arg)
Set the input data.
Definition: stir_x.h:655
Attenuation model.
Definition: stir_x.h:935
void set_restrict_to_cylindrical_FOV(bool v=true)
Enables or disables using a circular axial FOV (vs rectangular)
Definition: stir_x.h:841
STIR ProjData wrapper with added functionality.
Definition: stir_data_containers.h:148
Definition: stir_x.h:1155
float norm(int subset_num=0, int num_subsets=1, int num_iter=2, int verb=0) const
Method computing the norm of the linear part S G of the PET acquisition model operator F...
Definition: stir_x.h:386