ANIMA  4.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
anima::GaussianREMEstimator< TInputImage, TMaskImage > Class Template Reference

Class performing a robust expectation-maximation (REM) algorithm. Allow finding the 3-classes NABT model estimation. More...

#include <animaGaussianREMEstimator.h>

+ Inheritance diagram for anima::GaussianREMEstimator< TInputImage, TMaskImage >:
+ Collaboration diagram for anima::GaussianREMEstimator< TInputImage, TMaskImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::VariableSizeMatrix< NumericType >::InternalMatrixType DoubleVariableSizeMatrixVnlType
 
typedef itk::Statistics::GaussianMembershipFunction< MeasurementVectorTypeGaussianFunctionType
 
typedef std::map< Intensities, std::vector< Ocurrences > > GenericContainer
 
typedef std::map< Intensities, OcurrencesHistogram
 
typedef std::vector< MeasureTypeIntensities
 
typedef itk::VariableLengthVector< double > MeasurementVectorType
 
typedef unsigned short MeasureType
 
typedef double NumericType
 
typedef double Ocurrences
 
typedef itk::SmartPointer< SelfPointer
 
typedef std::map< double, std::vector< unsigned short > > ResidualMap
 
typedef GaussianREMEstimator Self
 
typedef itk::ProcessObject Superclass
 
- Public Types inherited from anima::GaussianEMEstimator< TInputImage, TMaskImage >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::Statistics::GaussianMembershipFunction< MeasurementVectorTypeGaussianFunctionType
 
typedef std::map< Intensities, std::vector< Ocurrences > > GenericContainer
 
typedef std::map< Intensities, OcurrencesHistogram
 
typedef itk::ImageRegionConstIterator< InputImageTypeInputConstIteratorType
 
typedef InputImageType::ConstPointer InputImageConstPointer
 
typedef TInputImage InputImageType
 
typedef std::vector< MeasureTypeIntensities
 
typedef itk::ImageRegionConstIterator< MaskImageTypeMaskConstIteratorType
 
typedef TMaskImage MaskImageType
 
typedef itk::ImageRegionIterator< MaskImageTypeMaskIteratorType
 
typedef itk::VariableLengthVector< NumericTypeMeasurementVectorType
 
typedef unsigned short MeasureType
 
typedef double NumericType
 
typedef double Ocurrences
 
typedef itk::SmartPointer< SelfPointer
 
typedef GaussianEMEstimator Self
 
typedef itk::ProcessObject Superclass
 

Public Member Functions

virtual bool concentration ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
Histogram GetConcentrationJointHistogram ()
 Get the "concentrated" joint histogram This joint histogram is the original without the samples considered outliersm. More...
 
virtual int GetMaxIterationsConc ()
 
virtual const char * GetNameOfClass () const
 
virtual double GetRejectionRatio ()
 
virtual bool GetStremMode ()
 
int PrintSolution (std::vector< double > alphas, std::vector< GaussianFunctionType::Pointer > model)
 
virtual void SetMaxIterationsConc (int _arg)
 
virtual void SetRejectionRatio (double _arg)
 
virtual void SetStremMode (bool _arg)
 
virtual void Update () ITK_OVERRIDE
 
- Public Member Functions inherited from anima::GaussianEMEstimator< TInputImage, TMaskImage >
double computeDistance (std::vector< GaussianFunctionType::Pointer > &newModel)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
void createJointHistogram ()
 
virtual double expectation ()
 
std::vector< double > GetAlphas ()
 
GenericContainer GetAPosterioriProbability ()
 
std::vector< GaussianFunctionType::Pointer > GetGaussianModel ()
 
TInputImage::ConstPointer GetInputImage1 ()
 
TInputImage::ConstPointer GetInputImage2 ()
 
TInputImage::ConstPointer GetInputImage3 ()
 
TInputImage::ConstPointer GetInputImage4 ()
 
TInputImage::ConstPointer GetInputImage5 ()
 
Histogram GetJointHistogram ()
 return joint histogram More...
 
virtual double GetLikelihood ()
 
TMaskImage::ConstPointer GetMask ()
 
virtual unsigned int GetMaxIterations ()
 
virtual double GetModelMinDistance ()
 
virtual bool GetVerbose ()
 
double likelihood (GaussianFunctionType::CovarianceMatrixType *invCovariance=NULL, double *detCovariance=NULL)
 
virtual bool maximization (std::vector< GaussianFunctionType::Pointer > &newModel, std::vector< double > &newAlphas)
 
void SetInitialAlphas (std::vector< double > &theValue)
 
void SetInitialGaussianModel (std::vector< GaussianFunctionType::Pointer > &theValue)
 Set model to be estimated. More...
 
void SetInputImage1 (const TInputImage *image)
 
void SetInputImage2 (const TInputImage *image)
 
void SetInputImage3 (const TInputImage *image)
 
void SetInputImage4 (const TInputImage *image)
 
void SetInputImage5 (const TInputImage *image)
 
virtual void SetLikelihood (double _arg)
 
void SetMask (const TMaskImage *mask)
 
virtual void SetMaxIterations (unsigned int _arg)
 
virtual void SetModelMinDistance (double _arg)
 
virtual void SetVerbose (bool _arg)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from anima::GaussianEMEstimator< TInputImage, TMaskImage >
static Pointer New ()
 

Protected Member Functions

 GaussianREMEstimator (const Self &)
 
 GaussianREMEstimator ()
 
void operator= (const Self &)
 
virtual ~GaussianREMEstimator ()
 
- Protected Member Functions inherited from anima::GaussianEMEstimator< TInputImage, TMaskImage >
 GaussianEMEstimator (const Self &)
 
 GaussianEMEstimator ()
 
void operator= (const Self &)
 
virtual ~GaussianEMEstimator ()
 

Protected Attributes

int m_MaxIterationsConc
 max number of iterations between to concentration steps More...
 
Histogram m_OriginalJointHistogram
 input joint histogram, it will never be modified More...
 
double m_RejectionRatio
 ratio of rejection This is the ratio of samples that will be trimmed to calculate the estimation Value between 0.0 and 1.0 (normally < 0.5) More...
 
bool m_StremMode
 doing as STREM => first a complete EM before concentration. It may be useful if initializations are not good More...
 
- Protected Attributes inherited from anima::GaussianEMEstimator< TInputImage, TMaskImage >
std::vector< double > m_Alphas
 model to be estimated (and solution if already run) More...
 
GenericContainer m_APosterioriProbability
 
std::vector< GaussianFunctionType::Pointer > m_GaussianModel
 
std::vector< InputImageConstPointerm_ImagesVector
 
unsigned int m_IndexImage1
 
unsigned int m_IndexImage2
 
unsigned int m_IndexImage3
 
unsigned int m_IndexImage4
 
unsigned int m_IndexImage5
 
unsigned int m_IndexImage6
 
Histogram m_JointHistogram
 joint histogram The points stored here will be used for estimate de model More...
 
Histogram m_JointHistogramInitial
 
double m_Likelihood
 
unsigned int m_MaxIterations
 
double m_ModelMinDistance
 
unsigned int m_NbInputs
 
unsigned int m_nbMaxImages
 
bool m_Verbose
 

Detailed Description

template<typename TInputImage, typename TMaskImage>
class anima::GaussianREMEstimator< TInputImage, TMaskImage >

Class performing a robust expectation-maximation (REM) algorithm. Allow finding the 3-classes NABT model estimation.

The algotrithm consists in maximizing the trimmed likelihood instead of the likelihood in order to make it more robust to outliers. The trimming parameter m_RejectionRatio determines how many voxels are rejected from the estimation. In other words, the likelihood is only computed with the voxels that are the most likely to belong to the model. For m_RejectionRatio = 0, the REM algorithm is equivalent to the original EM.

See also
GaussianEMEstimator

Definition at line 19 of file animaGaussianREMEstimator.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TInputImage , typename TMaskImage >
typedef itk::SmartPointer<const Self> anima::GaussianREMEstimator< TInputImage, TMaskImage >::ConstPointer

Definition at line 27 of file animaGaussianREMEstimator.h.

◆ DoubleVariableSizeMatrixVnlType

template<typename TInputImage , typename TMaskImage >
typedef itk::VariableSizeMatrix< NumericType >::InternalMatrixType anima::GaussianREMEstimator< TInputImage, TMaskImage >::DoubleVariableSizeMatrixVnlType

Definition at line 36 of file animaGaussianREMEstimator.h.

◆ GaussianFunctionType

template<typename TInputImage , typename TMaskImage >
typedef itk::Statistics::GaussianMembershipFunction< MeasurementVectorType > anima::GaussianREMEstimator< TInputImage, TMaskImage >::GaussianFunctionType

Definition at line 46 of file animaGaussianREMEstimator.h.

◆ GenericContainer

template<typename TInputImage , typename TMaskImage >
typedef std::map< Intensities, std::vector<Ocurrences> > anima::GaussianREMEstimator< TInputImage, TMaskImage >::GenericContainer

Definition at line 41 of file animaGaussianREMEstimator.h.

◆ Histogram

template<typename TInputImage , typename TMaskImage >
typedef std::map<Intensities,Ocurrences> anima::GaussianREMEstimator< TInputImage, TMaskImage >::Histogram

Definition at line 42 of file animaGaussianREMEstimator.h.

◆ Intensities

template<typename TInputImage , typename TMaskImage >
typedef std::vector<MeasureType> anima::GaussianREMEstimator< TInputImage, TMaskImage >::Intensities

Definition at line 40 of file animaGaussianREMEstimator.h.

◆ MeasurementVectorType

template<typename TInputImage , typename TMaskImage >
typedef itk::VariableLengthVector<double> anima::GaussianREMEstimator< TInputImage, TMaskImage >::MeasurementVectorType

Definition at line 45 of file animaGaussianREMEstimator.h.

◆ MeasureType

template<typename TInputImage , typename TMaskImage >
typedef unsigned short anima::GaussianREMEstimator< TInputImage, TMaskImage >::MeasureType

Definition at line 39 of file animaGaussianREMEstimator.h.

◆ NumericType

template<typename TInputImage , typename TMaskImage >
typedef double anima::GaussianREMEstimator< TInputImage, TMaskImage >::NumericType

Definition at line 33 of file animaGaussianREMEstimator.h.

◆ Ocurrences

template<typename TInputImage , typename TMaskImage >
typedef double anima::GaussianREMEstimator< TInputImage, TMaskImage >::Ocurrences

Definition at line 38 of file animaGaussianREMEstimator.h.

◆ Pointer

template<typename TInputImage , typename TMaskImage >
typedef itk::SmartPointer<Self> anima::GaussianREMEstimator< TInputImage, TMaskImage >::Pointer

Definition at line 26 of file animaGaussianREMEstimator.h.

◆ ResidualMap

template<typename TInputImage , typename TMaskImage >
typedef std::map<double,std::vector<unsigned short> > anima::GaussianREMEstimator< TInputImage, TMaskImage >::ResidualMap

Definition at line 43 of file animaGaussianREMEstimator.h.

◆ Self

template<typename TInputImage , typename TMaskImage >
typedef GaussianREMEstimator anima::GaussianREMEstimator< TInputImage, TMaskImage >::Self

Standard class typedefs.

Definition at line 24 of file animaGaussianREMEstimator.h.

◆ Superclass

template<typename TInputImage , typename TMaskImage >
typedef itk::ProcessObject anima::GaussianREMEstimator< TInputImage, TMaskImage >::Superclass

Definition at line 25 of file animaGaussianREMEstimator.h.

Constructor & Destructor Documentation

◆ GaussianREMEstimator() [1/2]

template<typename TInputImage , typename TMaskImage >
anima::GaussianREMEstimator< TInputImage, TMaskImage >::GaussianREMEstimator ( const Self )
protected

◆ GaussianREMEstimator() [2/2]

template<typename TInputImage , typename TMaskImage >
anima::GaussianREMEstimator< TInputImage, TMaskImage >::GaussianREMEstimator ( )
inlineprotected

◆ ~GaussianREMEstimator()

template<typename TInputImage , typename TMaskImage >
virtual anima::GaussianREMEstimator< TInputImage, TMaskImage >::~GaussianREMEstimator ( )
inlineprotectedvirtual

Definition at line 84 of file animaGaussianREMEstimator.h.

Member Function Documentation

◆ concentration()

template<typename TInputImage , typename TMaskImage >
bool anima::GaussianREMEstimator< TInputImage, TMaskImage >::concentration ( )
virtual

◆ CreateAnother()

template<typename TInputImage , typename TMaskImage >
virtual::itk::LightObject::Pointer anima::GaussianREMEstimator< TInputImage, TMaskImage >::CreateAnother ( void  ) const

◆ GetConcentrationJointHistogram()

template<typename TInputImage , typename TMaskImage >
Histogram anima::GaussianREMEstimator< TInputImage, TMaskImage >::GetConcentrationJointHistogram ( )
inline

Get the "concentrated" joint histogram This joint histogram is the original without the samples considered outliersm.

Definition at line 58 of file animaGaussianREMEstimator.h.

References anima::GaussianREMEstimator< TInputImage, TMaskImage >::GaussianREMEstimator(), anima::GaussianEMEstimator< TInputImage, TMaskImage >::m_JointHistogram, and anima::GaussianREMEstimator< TInputImage, TMaskImage >::operator=().

◆ GetMaxIterationsConc()

template<typename TInputImage , typename TMaskImage >
virtual int anima::GaussianREMEstimator< TInputImage, TMaskImage >::GetMaxIterationsConc ( )
virtual

◆ GetNameOfClass()

template<typename TInputImage , typename TMaskImage >
virtual const char* anima::GaussianREMEstimator< TInputImage, TMaskImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from anima::GaussianEMEstimator< TInputImage, TMaskImage >.

◆ GetRejectionRatio()

template<typename TInputImage , typename TMaskImage >
virtual double anima::GaussianREMEstimator< TInputImage, TMaskImage >::GetRejectionRatio ( )
virtual

◆ GetStremMode()

template<typename TInputImage , typename TMaskImage >
virtual bool anima::GaussianREMEstimator< TInputImage, TMaskImage >::GetStremMode ( )
virtual

◆ New()

template<typename TInputImage , typename TMaskImage >
static Pointer anima::GaussianREMEstimator< TInputImage, TMaskImage >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<typename TInputImage , typename TMaskImage >
void anima::GaussianREMEstimator< TInputImage, TMaskImage >::operator= ( const Self )
protected

◆ PrintSolution()

template<typename TInputImage , typename TMaskImage >
int anima::GaussianREMEstimator< TInputImage, TMaskImage >::PrintSolution ( std::vector< double >  alphas,
std::vector< GaussianFunctionType::Pointer >  model 
)

◆ SetMaxIterationsConc()

template<typename TInputImage , typename TMaskImage >
virtual void anima::GaussianREMEstimator< TInputImage, TMaskImage >::SetMaxIterationsConc ( int  _arg)
virtual

◆ SetRejectionRatio()

template<typename TInputImage , typename TMaskImage >
virtual void anima::GaussianREMEstimator< TInputImage, TMaskImage >::SetRejectionRatio ( double  _arg)
virtual

◆ SetStremMode()

template<typename TInputImage , typename TMaskImage >
virtual void anima::GaussianREMEstimator< TInputImage, TMaskImage >::SetStremMode ( bool  _arg)
virtual

◆ Update()

template<typename TInputImage , typename TMaskImage >
void anima::GaussianREMEstimator< TInputImage, TMaskImage >::Update ( )
virtual

Member Data Documentation

◆ m_MaxIterationsConc

template<typename TInputImage , typename TMaskImage >
int anima::GaussianREMEstimator< TInputImage, TMaskImage >::m_MaxIterationsConc
protected

max number of iterations between to concentration steps

Definition at line 94 of file animaGaussianREMEstimator.h.

Referenced by anima::GaussianREMEstimator< TInputImage, TMaskImage >::GaussianREMEstimator().

◆ m_OriginalJointHistogram

template<typename TInputImage , typename TMaskImage >
Histogram anima::GaussianREMEstimator< TInputImage, TMaskImage >::m_OriginalJointHistogram
protected

input joint histogram, it will never be modified

Warning
the attribute jointHistogram will be the "concentrated" histogram and will change in each iteration

Definition at line 103 of file animaGaussianREMEstimator.h.

◆ m_RejectionRatio

template<typename TInputImage , typename TMaskImage >
double anima::GaussianREMEstimator< TInputImage, TMaskImage >::m_RejectionRatio
protected

ratio of rejection This is the ratio of samples that will be trimmed to calculate the estimation Value between 0.0 and 1.0 (normally < 0.5)

Definition at line 90 of file animaGaussianREMEstimator.h.

◆ m_StremMode

template<typename TInputImage , typename TMaskImage >
bool anima::GaussianREMEstimator< TInputImage, TMaskImage >::m_StremMode
protected

doing as STREM => first a complete EM before concentration. It may be useful if initializations are not good

Definition at line 98 of file animaGaussianREMEstimator.h.

Referenced by anima::GaussianREMEstimator< TInputImage, TMaskImage >::GaussianREMEstimator().


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