From ea946e4a5cd898c64cfcf4e9771e31b1003781e1 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Thu, 14 Dec 2023 20:30:14 +0000 Subject: [PATCH] make _already_set_up protected as opposed to private Derived classes should share the same set_up status as the base-class. --- src/include/stir/recon_buildblock/SqrtHessianRowSum.h | 2 +- src/include/stir/scatter/ScatterEstimation.h | 3 ++- src/include/stir/scatter/ScatterSimulation.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/include/stir/recon_buildblock/SqrtHessianRowSum.h b/src/include/stir/recon_buildblock/SqrtHessianRowSum.h index 767191ebd2..420a3039fe 100644 --- a/src/include/stir/recon_buildblock/SqrtHessianRowSum.h +++ b/src/include/stir/recon_buildblock/SqrtHessianRowSum.h @@ -112,9 +112,9 @@ class SqrtHessianRowSum: void compute_approximate_Hessian_row_sum(); protected: + bool _already_setup = false; private: - bool _already_setup = false; //! Objective function object shared_ptr > objective_function_sptr; diff --git a/src/include/stir/scatter/ScatterEstimation.h b/src/include/stir/scatter/ScatterEstimation.h index 75980d1220..ac4f80d42f 100644 --- a/src/include/stir/scatter/ScatterEstimation.h +++ b/src/include/stir/scatter/ScatterEstimation.h @@ -291,10 +291,11 @@ class ScatterEstimation: public ParsingObject std::string output_additive_estimate_prefix; -private: //! variable to check if we have called set_up() bool _already_setup; +private: + //! attenuation in 3D shared_ptr atten_norm_3d_sptr; diff --git a/src/include/stir/scatter/ScatterSimulation.h b/src/include/stir/scatter/ScatterSimulation.h index 6753753def..a4de82ffaa 100644 --- a/src/include/stir/scatter/ScatterSimulation.h +++ b/src/include/stir/scatter/ScatterSimulation.h @@ -435,6 +435,7 @@ class ScatterSimulation : public RegisteredObject int downsample_scanner_dets; bool downsample_scanner_bool; + bool _already_set_up; private: int total_detectors; @@ -446,7 +447,6 @@ class ScatterSimulation : public RegisteredObject // numbers that we don't want to recompute all the time mutable float detector_efficiency_no_scatter; - bool _already_set_up; //! a function that checks if image sizes are ok /*! It will call \c error() if not.