Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::SUVFunctorPolicy Class Reference

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 &currentIndex) 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
 

Detailed Description

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).

Configuration contract

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.

See also
computeSUVScaleFactor, SUVNormalizationStrategy, itk::IndexedUnaryFunctorImageFilter

Definition at line 68 of file mitkSUVFunctorPolicy.h.

Member Typedef Documentation

◆ DecayTimeFunctionType

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.

◆ IndexType

typedef itk::Index<3> mitk::SUVFunctorPolicy::IndexType

3D image index type.

Definition at line 75 of file mitkSUVFunctorPolicy.h.

◆ SUVPixelType

Pixel type for SUV output values.

Definition at line 72 of file mitkSUVFunctorPolicy.h.

Constructor & Destructor Documentation

◆ SUVFunctorPolicy() [1/2]

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().

◆ SUVFunctorPolicy() [2/2]

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.

Parameters
[in]injectedActivityInjected activity in [Bq].
[in]scaleNumeratorVariant-specific normalization quantity (e.g. body weight in [g] for SUVbw / SUVlbm, BSA in [cm^2] for SUVbsa).
[in]halfLifeRadionuclide half-life in [s].

◆ ~SUVFunctorPolicy()

virtual mitk::SUVFunctorPolicy::~SUVFunctorPolicy ( )
virtual

Destructor.

Member Function Documentation

◆ IsConfigured()

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().

Returns
true if every required parameter has been supplied.

◆ operator!=()

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).

Parameters
[in]otherThe other policy to compare against.
Returns
true if the policies differ in injected activity, scale numerator, or half-life.

◆ operator()()

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.

Parameters
[in]valueThe raw PET pixel value.
[in]currentIndexThe 3D image index of the current pixel (used to query decay time).
Returns
The computed SUV value. NaN if the policy was not configured.
Precondition
IsConfigured() returns true. If not, the result will be NaN.

◆ operator==()

bool mitk::SUVFunctorPolicy::operator== ( const SUVFunctorPolicy &  other) const

Equality comparison operator.

Compares only the three scalar parameters; see operator!=.

Parameters
[in]otherThe other policy to compare against.
Returns
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.

◆ SetDecayTimeFunctor()

void mitk::SUVFunctorPolicy::SetDecayTimeFunctor ( const DecayTimeFunctionType &  functor)

Set the functor used to query the decay time for a given voxel index.

Parameters
[in]functorA callable that accepts an IndexType and returns the decay time in seconds.

◆ SetHalfLife()

void mitk::SUVFunctorPolicy::SetHalfLife ( double  tau)

Set the radionuclide half-life.

Parameters
[in]tauHalf-life in [s].

◆ SetInjectedActivity()

void mitk::SUVFunctorPolicy::SetInjectedActivity ( double  a)

Set the injected radioactivity.

Parameters
[in]aInjected activity in [Bq].

◆ SetScaleNumerator()

void mitk::SUVFunctorPolicy::SetScaleNumerator ( double  n)

Set the variant-specific scale numerator.

Parameters
[in]nScale numerator. Units depend on the SUV variant (see SUVNormalizationStrategy).

Member Data Documentation

◆ m_Functor

DecayTimeFunctionType mitk::SUVFunctorPolicy::m_Functor
protected

Definition at line 213 of file mitkSUVFunctorPolicy.h.

◆ m_HalfLife

double mitk::SUVFunctorPolicy::m_HalfLife
protected

Halflife of the used nuclide in [s]. NaN until SetHalfLife is called.

Definition at line 211 of file mitkSUVFunctorPolicy.h.

◆ m_InjectedActivity

double mitk::SUVFunctorPolicy::m_InjectedActivity
protected

Activity injected in [Bq]. NaN until SetInjectedActivity is called.

Definition at line 207 of file mitkSUVFunctorPolicy.h.

◆ m_ScaleNumerator

double mitk::SUVFunctorPolicy::m_ScaleNumerator
protected

Variant-specific scale numerator. NaN until SetScaleNumerator is called.

Definition at line 209 of file mitkSUVFunctorPolicy.h.


The documentation for this class was generated from the following file: