From 5518abf6a7d675eced981935d1786dfe3ef4ce0f Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Wed, 10 Jul 2024 20:22:51 +0100 Subject: [PATCH] added ScatterEstimation::set_recompute_mask_*() useful for use in Python --- src/include/stir/scatter/ScatterEstimation.h | 3 +++ src/include/stir/scatter/ScatterEstimation.inl | 2 ++ src/scatter_buildblock/ScatterEstimation.cxx | 12 ++++++++++++ 3 files changed, 17 insertions(+) diff --git a/src/include/stir/scatter/ScatterEstimation.h b/src/include/stir/scatter/ScatterEstimation.h index 11e8def835..38df94df48 100644 --- a/src/include/stir/scatter/ScatterEstimation.h +++ b/src/include/stir/scatter/ScatterEstimation.h @@ -167,6 +167,9 @@ class ScatterEstimation : public ParsingObject /*! \c arg will not be modified */ inline void set_mask_proj_data_sptr(const shared_ptr arg); + void set_recompute_mask_image(bool arg); + void set_recompute_mask_projdata(bool arg); + inline void set_scatter_simulation_method_sptr(const shared_ptr); inline void set_num_iterations(int); diff --git a/src/include/stir/scatter/ScatterEstimation.inl b/src/include/stir/scatter/ScatterEstimation.inl index 1abba41c57..73336a24d8 100644 --- a/src/include/stir/scatter/ScatterEstimation.inl +++ b/src/include/stir/scatter/ScatterEstimation.inl @@ -42,6 +42,7 @@ ScatterEstimation::set_mask_image_sptr(const shared_ptr_already_setup = false; this->mask_image_sptr = arg; + this->set_recompute_mask_image(false); } void @@ -49,6 +50,7 @@ ScatterEstimation::set_mask_proj_data_sptr(const shared_ptr arg) { this->_already_setup = false; this->mask_projdata_sptr = arg; + this->set_recompute_mask_projdata(false); } void diff --git a/src/scatter_buildblock/ScatterEstimation.cxx b/src/scatter_buildblock/ScatterEstimation.cxx index 6984a054cb..c157f4af81 100644 --- a/src/scatter_buildblock/ScatterEstimation.cxx +++ b/src/scatter_buildblock/ScatterEstimation.cxx @@ -432,6 +432,18 @@ ScatterEstimation::set_normalisation_sptr(const shared_ptr arg this->multiplicative_binnorm_sptr.reset(); } +void +ScatterEstimation::set_recompute_mask_image(bool arg) +{ + this->recompute_mask_image = arg; +} + +void +ScatterEstimation::set_recompute_mask_projdata(bool arg) +{ + this->recompute_mask_projdata = arg; +} + bool ScatterEstimation::already_setup() const {