|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Generic functor policy for computing SUV on a per-voxel basis. More...
#include <mitkSUVFunctorPolicy.h>
Public Types | |
| typedef ScalarType | SUVPixelType |
| Pixel type for SUV output values. More... | |
| typedef itk::Index< 3 > | IndexType |
| 3D image index type. More... | |
| using | DecayTimeFunctionType = std::function< double(const IndexType &) > |
| Function type for querying the decay time at a given image index. More... | |
Public Member Functions | |
| SUVFunctorPolicy () | |
| Default constructor. More... | |
| SUVFunctorPolicy (double injectedActivity, double scaleNumerator, double halfLife) | |
| Construct a fully configured policy in one step. More... | |
| virtual | ~SUVFunctorPolicy () |
| Destructor. More... | |
| void | SetDecayTimeFunctor (const DecayTimeFunctionType &functor) |
| Set the functor used to query the decay time for a given voxel index. More... | |
| void | SetInjectedActivity (double a) |
| Set the injected radioactivity. More... | |
| void | SetScaleNumerator (double n) |
| Set the variant-specific scale numerator. More... | |
| void | SetHalfLife (double tau) |
| Set the radionuclide half-life. More... | |
| bool | IsConfigured () const |
| Check whether the policy is fully configured and safe to invoke. More... | |
| bool | operator!= (const SUVFunctorPolicy &other) const |
| Inequality comparison operator. More... | |
| bool | operator== (const SUVFunctorPolicy &other) const |
| Equality comparison operator. More... | |
| SUVPixelType | operator() (const SUVPixelType &value, const IndexType ¤tIndex) const |
| Compute the SUV for a single pixel value at a given image index. More... | |
Protected Attributes | |
| double | m_InjectedActivity |
| double | m_ScaleNumerator |
| double | m_HalfLife |
| DecayTimeFunctionType | m_Functor |
Generic functor policy for computing SUV on a per-voxel basis.
Designed to be used as the functor template argument for itk::IndexedUnaryFunctorImageFilter. It converts raw PET pixel values to SUV values using the variant-agnostic scale factor (computeSUVScaleFactor) where the per-variant normalization is encoded in m_ScaleNumerator.
The decay time can vary per voxel (looked up via a configurable decay-time functor based on the voxel's image index).
Default-constructed instances hold NaN for the injected activity, scale numerator, and half-life, and an empty decay-time functor. Such an instance is intentionally invalid: use the parameterised constructor or the corresponding setters to bring it into a usable state, and call IsConfigured() to verify the contract before invoking operator(). Zero and negative values are also invalid even though they are finite: they cause a zero or negative denominator in the SUV formula and produce NaN/Inf output.
If operator() is called on an unconfigured instance, the NaN values propagate through the math and produce a fully NaN output image. That makes misuse visible at the output but does not raise an exception. Callers that want a loud failure should validate at the boundary via IsConfigured().
The SUV variant (SUVbw, SUVlbm, SUVbsa, ...) is encoded externally: pick a SUVNormalizationStrategy, compute its scale numerator from the patient measurements, and feed it to SetScaleNumerator(). For the body-weight case, pair this with a BodyWeightStrategy.
Definition at line 68 of file mitkSUVFunctorPolicy.h.
| using mitk::SUVFunctorPolicy::DecayTimeFunctionType = std::function < double(const IndexType&) > |
Function type for querying the decay time at a given image index.
The function takes a 3D image index and returns the corresponding decay time in seconds.
Definition at line 83 of file mitkSUVFunctorPolicy.h.
| typedef itk::Index<3> mitk::SUVFunctorPolicy::IndexType |
3D image index type.
Definition at line 75 of file mitkSUVFunctorPolicy.h.
Pixel type for SUV output values.
Definition at line 72 of file mitkSUVFunctorPolicy.h.
| mitk::SUVFunctorPolicy::SUVFunctorPolicy | ( | ) |
Default constructor.
Leaves the policy in an unconfigured state (NaN scalars, empty decay-time functor). Setters must be called before invoking operator(); see IsConfigured(). The default constructor exists to satisfy itk::IndexedUnaryFunctorImageFilter, which holds a default-constructed functor value member that is overwritten by SetFunctor().
| mitk::SUVFunctorPolicy::SUVFunctorPolicy | ( | double | injectedActivity, |
| double | scaleNumerator, | ||
| double | halfLife | ||
| ) |
Construct a fully configured policy in one step.
The decay-time functor must still be supplied via SetDecayTimeFunctor() before the policy is invoked.
| [in] | injectedActivity | Injected activity in [Bq]. |
| [in] | scaleNumerator | Variant-specific normalization quantity (e.g. body weight in [g] for SUVbw / SUVlbm, BSA in [cm^2] for SUVbsa). |
| [in] | halfLife | Radionuclide half-life in [s]. |
|
virtual |
Destructor.
| bool mitk::SUVFunctorPolicy::IsConfigured | ( | ) | const |
Check whether the policy is fully configured and safe to invoke.
Returns true iff all three numeric parameters (injected activity, scale numerator, half-life) are finite and strictly positive, and a decay-time functor has been set. Callers should validate at the boundary before invoking operator().
true if every required parameter has been supplied. | bool mitk::SUVFunctorPolicy::operator!= | ( | const SUVFunctorPolicy & | other | ) | const |
Inequality comparison operator.
Compares only the three scalar parameters. The decay-time functor is deliberately not compared (std::function does not provide a meaningful equality).
| [in] | other | The other policy to compare against. |
true if the policies differ in injected activity, scale numerator, or half-life. | SUVPixelType mitk::SUVFunctorPolicy::operator() | ( | const SUVPixelType & | value, |
| const IndexType & | currentIndex | ||
| ) | const |
Compute the SUV for a single pixel value at a given image index.
Looks up the decay time via the configured decay-time functor and multiplies the input value by the SUV scale factor. No per-voxel validation is performed; see IsConfigured() for the boundary check.
| [in] | value | The raw PET pixel value. |
| [in] | currentIndex | The 3D image index of the current pixel (used to query decay time). |
| bool mitk::SUVFunctorPolicy::operator== | ( | const SUVFunctorPolicy & | other | ) | const |
Equality comparison operator.
Compares only the three scalar parameters; see operator!=.
| [in] | other | The other policy to compare against. |
true if injected activity, scale numerator, and half-life are identical. A default-constructed (NaN-seeded) policy compares unequal to itself because NaN != NaN; this only over-invalidates (forces a re-run) and never falsely reports equality. | void mitk::SUVFunctorPolicy::SetDecayTimeFunctor | ( | const DecayTimeFunctionType & | functor | ) |
Set the functor used to query the decay time for a given voxel index.
| [in] | functor | A callable that accepts an IndexType and returns the decay time in seconds. |
| void mitk::SUVFunctorPolicy::SetHalfLife | ( | double | tau | ) |
Set the radionuclide half-life.
| [in] | tau | Half-life in [s]. |
| void mitk::SUVFunctorPolicy::SetInjectedActivity | ( | double | a | ) |
Set the injected radioactivity.
| [in] | a | Injected activity in [Bq]. |
| void mitk::SUVFunctorPolicy::SetScaleNumerator | ( | double | n | ) |
Set the variant-specific scale numerator.
| [in] | n | Scale numerator. Units depend on the SUV variant (see SUVNormalizationStrategy). |
|
protected |
Definition at line 213 of file mitkSUVFunctorPolicy.h.
|
protected |
Halflife of the used nuclide in [s]. NaN until SetHalfLife is called.
Definition at line 211 of file mitkSUVFunctorPolicy.h.
|
protected |
Activity injected in [Bq]. NaN until SetInjectedActivity is called.
Definition at line 207 of file mitkSUVFunctorPolicy.h.
|
protected |
Variant-specific scale numerator. NaN until SetScaleNumerator is called.
Definition at line 209 of file mitkSUVFunctorPolicy.h.