ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField > Class Template Reference

#include <itkMRIBiasFieldCorrectionFilter.h>

Detailed Description

template<typename TImage, typename TImageMask, typename TBiasField>
class itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >

Represents a cost function for MRI bias field correction optimization.

This is a wrapping class which provides interfaces between images, the bias field, the internal energy function (CompositeValleyFunction), and the Optimizer.

This class is templated over the type of the input image (TImage), the image mask (which tells which pixels in the input image should be included for energy value calculation), and the bias field (TBiasField).

Definition at line 51 of file itkMRIBiasFieldCorrectionFilter.h.

+ Inheritance diagram for itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >:
+ Collaboration diagram for itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >:

Public Types

using BiasFieldType = TBiasField
 
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Superclass::DerivativeType
 
using ImageElementType = typename ImageType::PixelType
 
using ImageIndexType = typename ImageType::IndexType
 
using ImagePointer = typename ImageType::Pointer
 
using ImageRegionType = typename ImageType::RegionType
 
using ImageType = TImage
 
using InternalEnergyFunction = CompositeValleyFunction
 
using MaskElementType = typename MaskType::PixelType
 
using MaskPointer = typename MaskType::Pointer
 
using MaskType = TImageMask
 
using MeasureType = Superclass::MeasureType
 
using Pointer = SmartPointer< Self >
 
using SamplingFactorType = unsigned int[SpaceDimension]
 
using Self = MRIBiasEnergyFunction
 
using Superclass = SingleValuedCostFunction
 
- Public Types inherited from itk::SingleValuedCostFunction
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Array< ParametersValueType >
 
using MeasureType = double
 
using ParametersType = Superclass::ParametersType
 
using ParametersValueType = Superclass::ParametersValueType
 
using Pointer = SmartPointer< Self >
 
using Self = SingleValuedCostFunction
 
using Superclass = CostFunction
 
- Public Types inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = OptimizerParameters< TInternalComputationValueType >
 
using ParametersValueType = TInternalComputationValueType
 
using Pointer = SmartPointer< Self >
 
using Self = CostFunctionTemplate
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

void GetDerivative (const ParametersType &, DerivativeType &) const override
 
double GetEnergy0 (double diff)
 
const char * GetNameOfClass () const override
 
unsigned int GetNumberOfParameters () const override
 
MeasureType GetValue (const ParametersType &parameters) const override
 
void InitializeDistributions (Array< double > classMeans, Array< double > classSigmas)
 
void SetBiasField (BiasFieldType *bias)
 
virtual void SetImage (ImageType *_arg)
 
virtual void SetMask (MaskType *_arg)
 
virtual void SetRegion (ImageRegionType _arg)
 
void SetSamplingFactors (const SamplingFactorType factor)
 
- Public Member Functions inherited from itk::SingleValuedCostFunction
virtual void GetValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int SpaceDimension = 3
 

Protected Member Functions

 MRIBiasEnergyFunction ()
 
 ~MRIBiasEnergyFunction () override=default
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()=default
 
 ~SingleValuedCostFunction () override
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~CostFunctionTemplate () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

BiasFieldTypem_BiasField {}
 
ImagePointer m_Image {}
 
std::unique_ptr< InternalEnergyFunctionm_InternalEnergyFunction
 
MaskPointer m_Mask {}
 
ImageRegionType m_Region {}
 
SamplingFactorType m_SamplingFactor {}
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ BiasFieldType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::BiasFieldType = TBiasField

Bias field type definition.

Definition at line 79 of file itkMRIBiasFieldCorrectionFilter.h.

◆ ConstPointer

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::ConstPointer = SmartPointer<const Self>

Definition at line 60 of file itkMRIBiasFieldCorrectionFilter.h.

◆ DerivativeType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::DerivativeType = Superclass::DerivativeType

Not used, but expected by SingleValuedNonLinearOptimizer class.

Definition at line 86 of file itkMRIBiasFieldCorrectionFilter.h.

◆ ImageElementType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::ImageElementType = typename ImageType::PixelType

Definition at line 71 of file itkMRIBiasFieldCorrectionFilter.h.

◆ ImageIndexType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::ImageIndexType = typename ImageType::IndexType

Definition at line 72 of file itkMRIBiasFieldCorrectionFilter.h.

◆ ImagePointer

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::ImagePointer = typename ImageType::Pointer

Definition at line 70 of file itkMRIBiasFieldCorrectionFilter.h.

◆ ImageRegionType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::ImageRegionType = typename ImageType::RegionType

Definition at line 73 of file itkMRIBiasFieldCorrectionFilter.h.

◆ ImageType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::ImageType = TImage

Image related type definitions.

Definition at line 69 of file itkMRIBiasFieldCorrectionFilter.h.

◆ InternalEnergyFunction

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::InternalEnergyFunction = CompositeValleyFunction

The type of the internal energy function.

Definition at line 94 of file itkMRIBiasFieldCorrectionFilter.h.

◆ MaskElementType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::MaskElementType = typename MaskType::PixelType

Definition at line 76 of file itkMRIBiasFieldCorrectionFilter.h.

◆ MaskPointer

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::MaskPointer = typename MaskType::Pointer

Definition at line 75 of file itkMRIBiasFieldCorrectionFilter.h.

◆ MaskType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::MaskType = TImageMask

Definition at line 74 of file itkMRIBiasFieldCorrectionFilter.h.

◆ MeasureType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::MeasureType = Superclass::MeasureType

The cost value type.

Definition at line 89 of file itkMRIBiasFieldCorrectionFilter.h.

◆ Pointer

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::Pointer = SmartPointer<Self>

Definition at line 59 of file itkMRIBiasFieldCorrectionFilter.h.

◆ SamplingFactorType

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SamplingFactorType = unsigned int[SpaceDimension]

The type of the sampling factors.

Definition at line 97 of file itkMRIBiasFieldCorrectionFilter.h.

◆ Self

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::Self = MRIBiasEnergyFunction

Standard class type aliases.

Definition at line 57 of file itkMRIBiasFieldCorrectionFilter.h.

◆ Superclass

template<typename TImage , typename TImageMask , typename TBiasField >
using itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::Superclass = SingleValuedCostFunction

Definition at line 58 of file itkMRIBiasFieldCorrectionFilter.h.

Constructor & Destructor Documentation

◆ MRIBiasEnergyFunction()

template<typename TImage , typename TImageMask , typename TBiasField >
itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::MRIBiasEnergyFunction ( )
protected

Constructor.

◆ ~MRIBiasEnergyFunction()

template<typename TImage , typename TImageMask , typename TBiasField >
itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::~MRIBiasEnergyFunction ( )
overrideprotecteddefault

Destructor.

Member Function Documentation

◆ GetDerivative()

template<typename TImage , typename TImageMask , typename TBiasField >
void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::GetDerivative ( const ParametersType ,
DerivativeType  
) const
inlineoverridevirtual

Dummy implementation to confirm to the SingleValuedCostFunction interfaces. It is pure virtual in the superclass.

Implements itk::SingleValuedCostFunction.

Definition at line 143 of file itkMRIBiasFieldCorrectionFilter.h.

◆ GetEnergy0()

template<typename TImage , typename TImageMask , typename TBiasField >
double itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::GetEnergy0 ( double  diff)
inline

Get an energy value for the intensity difference between a pixel and its corresponding bias.

Definition at line 130 of file itkMRIBiasFieldCorrectionFilter.h.

◆ GetNameOfClass()

template<typename TImage , typename TImageMask , typename TBiasField >
const char* itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::GetNameOfClass ( ) const
overridevirtual

◆ GetNumberOfParameters()

template<typename TImage , typename TImageMask , typename TBiasField >
unsigned int itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::GetNumberOfParameters ( ) const
overridevirtual

Return the number of parameters required to compute this cost function. This method MUST be overloaded by derived classes.

Implements itk::CostFunctionTemplate< TInternalComputationValueType >.

◆ GetValue()

template<typename TImage , typename TImageMask , typename TBiasField >
MeasureType itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::GetValue ( const ParametersType parameters) const
overridevirtual

Gets the total energy value of an image or a slice using the given parameters.

Implements itk::SingleValuedCostFunction.

◆ InitializeDistributions()

template<typename TImage , typename TImageMask , typename TBiasField >
void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::InitializeDistributions ( Array< double >  classMeans,
Array< double >  classSigmas 
)

Set Mean and Sigma for the normal distributions

Warning
This method MUST be called before any attempt to evaluate the Function because it instantiate the internal energy function.

◆ New()

template<typename TImage , typename TImageMask , typename TBiasField >
static Pointer itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::New ( )
static

Method for creation through the object factory.

◆ SetBiasField()

template<typename TImage , typename TImageMask , typename TBiasField >
void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SetBiasField ( BiasFieldType bias)
inline

Sets the BiasField object.

Definition at line 110 of file itkMRIBiasFieldCorrectionFilter.h.

◆ SetImage()

template<typename TImage , typename TImageMask , typename TBiasField >
virtual void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SetImage ( ImageType _arg)
virtual

Specify the input image.

◆ SetMask()

template<typename TImage , typename TImageMask , typename TBiasField >
virtual void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SetMask ( MaskType _arg)
virtual

Specify the input mask image.

◆ SetRegion()

template<typename TImage , typename TImageMask , typename TBiasField >
virtual void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SetRegion ( ImageRegionType  _arg)
virtual

Set the image region which will be included for energy calculation.

◆ SetSamplingFactors()

template<typename TImage , typename TImageMask , typename TBiasField >
void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SetSamplingFactors ( const SamplingFactorType  factor)
inline

Sets the sampling factors of the energy function in each direction. Default is 1 in each dimension

Definition at line 118 of file itkMRIBiasFieldCorrectionFilter.h.

Member Data Documentation

◆ m_BiasField

template<typename TImage , typename TImageMask , typename TBiasField >
BiasFieldType* itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_BiasField {}
private

Bias field object pointer.

Definition at line 165 of file itkMRIBiasFieldCorrectionFilter.h.

◆ m_Image

template<typename TImage , typename TImageMask , typename TBiasField >
ImagePointer itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_Image {}
private

Input image smart pointer.

Definition at line 168 of file itkMRIBiasFieldCorrectionFilter.h.

◆ m_InternalEnergyFunction

template<typename TImage , typename TImageMask , typename TBiasField >
std::unique_ptr<InternalEnergyFunction> itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_InternalEnergyFunction
private

Internal energy function object pointer.

Definition at line 177 of file itkMRIBiasFieldCorrectionFilter.h.

◆ m_Mask

template<typename TImage , typename TImageMask , typename TBiasField >
MaskPointer itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_Mask {}
private

Input mask image smart pointer.

Definition at line 171 of file itkMRIBiasFieldCorrectionFilter.h.

◆ m_Region

template<typename TImage , typename TImageMask , typename TBiasField >
ImageRegionType itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_Region {}
private

Region of interest.

Definition at line 174 of file itkMRIBiasFieldCorrectionFilter.h.

◆ m_SamplingFactor

template<typename TImage , typename TImageMask , typename TBiasField >
SamplingFactorType itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_SamplingFactor {}
private

Sampling factors

Definition at line 180 of file itkMRIBiasFieldCorrectionFilter.h.

◆ SpaceDimension

template<typename TImage , typename TImageMask , typename TBiasField >
constexpr unsigned int itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SpaceDimension = 3
staticconstexpr

Definition at line 91 of file itkMRIBiasFieldCorrectionFilter.h.


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