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

#include <itkMRIBiasFieldCorrectionFilter.h>

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

Detailed Description

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

a cost function for 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 47 of file itkMRIBiasFieldCorrectionFilter.h.

Public Types

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

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
void GetDerivative (const ParametersType &, DerivativeType &) const ITK_OVERRIDE
 
double GetEnergy0 (double diff)
 
virtual const char * GetNameOfClass () const
 
virtual unsigned int GetNumberOfParameters (void) const ITK_OVERRIDE
 
virtual MeasureType GetValue (const ParametersType &parameters) const ITK_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 (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 *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
const MetaDataDictionaryGetMetaDataDictionary (void) 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
 
virtual void Register () const ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
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 flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int SpaceDimension = 3
 

Protected Member Functions

 MRIBiasEnergyFunction ()
 
virtual ~MRIBiasEnergyFunction ()
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()
 
virtual ~SingleValuedCostFunction ()
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE
 
virtual ~CostFunctionTemplate ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- 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 Member Functions

 MRIBiasEnergyFunction (const Self &)
 
void operator= (const Self &)
 

Private Attributes

BiasFieldTypem_BiasField
 
ImagePointer m_Image
 
InternalEnergyFunctionm_InternalEnergyFunction
 
MaskPointer m_Mask
 
ImageRegionType m_Region
 
SamplingFactorType m_SamplingFactor
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Member Typedef Documentation

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

Bias field type definition.

Definition at line 73 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 54 of file itkMRIBiasFieldCorrectionFilter.h.

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

Not used, but expected by SingleValuedNonLinearOptimizer class.

Definition at line 80 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 65 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 66 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 64 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 67 of file itkMRIBiasFieldCorrectionFilter.h.

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

Image related type definitions.

Definition at line 60 of file itkMRIBiasFieldCorrectionFilter.h.

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

The type of the internal energy function.

Definition at line 88 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 70 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 69 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 68 of file itkMRIBiasFieldCorrectionFilter.h.

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

The cost value type.

Definition at line 83 of file itkMRIBiasFieldCorrectionFilter.h.

template<typename TImage , typename TImageMask , typename TBiasField >
typedef Superclass::ParametersType itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::ParametersType

Parameters type for optimizier (coefficients type for bias field estimate).

Definition at line 77 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 53 of file itkMRIBiasFieldCorrectionFilter.h.

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

The type of the sampling factors

Definition at line 91 of file itkMRIBiasFieldCorrectionFilter.h.

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

Standard class typedefs.

Definition at line 51 of file itkMRIBiasFieldCorrectionFilter.h.

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

Definition at line 52 of file itkMRIBiasFieldCorrectionFilter.h.

Constructor & Destructor Documentation

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

Constructor:

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

Destructor:

template<typename TImage , typename TImageMask , typename TBiasField >
itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::MRIBiasEnergyFunction ( const Self )
private

Member Function Documentation

template<typename TImage , typename TImageMask , typename TBiasField >
virtual::itk::LightObject::Pointer itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::CreateAnother ( void  ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

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

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

Implements itk::SingleValuedCostFunction.

Definition at line 130 of file itkMRIBiasFieldCorrectionFilter.h.

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 119 of file itkMRIBiasFieldCorrectionFilter.h.

References itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_InternalEnergyFunction.

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

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedCostFunction.

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

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

Implements itk::CostFunctionTemplate< TInternalComputationValueType >.

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

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

Implements itk::SingleValuedCostFunction.

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
template<typename TImage , typename TImageMask , typename TBiasField >
static Pointer itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::New ( )
static

Method for creation through the object factory.

template<typename TImage , typename TImageMask , typename TBiasField >
void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::operator= ( const Self )
private
template<typename TImage , typename TImageMask , typename TBiasField >
void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SetBiasField ( BiasFieldType bias)
inline
template<typename TImage , typename TImageMask , typename TBiasField >
virtual void itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SetImage ( ImageType _arg)
virtual

Specify the input image.

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

Specify the input mask image.

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.

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

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

Definition at line 108 of file itkMRIBiasFieldCorrectionFilter.h.

References itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_SamplingFactor, and itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SpaceDimension.

Member Data Documentation

template<typename TImage , typename TImageMask , typename TBiasField >
BiasFieldType* itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_BiasField
private
template<typename TImage , typename TImageMask , typename TBiasField >
ImagePointer itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_Image
private

Input image smart pointer.

Definition at line 156 of file itkMRIBiasFieldCorrectionFilter.h.

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

Internal energy function object pointer.

Definition at line 165 of file itkMRIBiasFieldCorrectionFilter.h.

Referenced by itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::GetEnergy0().

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

Input mask image smart pointer.

Definition at line 159 of file itkMRIBiasFieldCorrectionFilter.h.

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

Region of interest.

Definition at line 162 of file itkMRIBiasFieldCorrectionFilter.h.

template<typename TImage , typename TImageMask , typename TBiasField >
SamplingFactorType itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::m_SamplingFactor
private
template<typename TImage , typename TImageMask , typename TBiasField >
const unsigned int itk::MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >::SpaceDimension = 3
static

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