Per-voxel functor for the pre-normalized SUV path: a single scalar multiply, no decay / dose math. The factor folds the input model's prenorm scale and the source-to-target normalization ratio.
| 42 | // multiply, no decay / dose math. The factor folds the input model's |
| 43 | // prenorm scale and the source-to-target normalization ratio. |
| 44 | class SUVRenormalizationFunctor |
| 45 | { |
| 46 | public: |
| 47 | SUVRenormalizationFunctor() = default; |
| 48 | explicit SUVRenormalizationFunctor(double factor) : m_Factor(factor) {} |
| 49 | |
| 50 | bool operator==(const SUVRenormalizationFunctor& other) const |
| 51 | { return m_Factor == other.m_Factor; } |
| 52 | bool operator!=(const SUVRenormalizationFunctor& other) const |
| 53 | { return !(*this == other); } |
| 54 | |
| 55 | double operator()(const double& value) const { return value * m_Factor; } |
| 56 | |
| 57 | private: |
| 58 | double m_Factor { 1.0 }; |
| 59 | }; |
| 60 | |
| 61 | template <typename T, typename Fn> |
| 62 | T ResolveValue(const std::optional<T>& override_, |
no outgoing calls
no test coverage detected