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

#include <animaClassificationStrategy.h>

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

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::Statistics::GaussianMembershipFunction< MeasurementVectorTypeGaussianFunctionType
 
typedef GaussianREMEstimatorType::Pointer GaussianREMEstimatorPointerType
 
typedef GaussianREMEstimator< InputImageType, MaskImageTypeGaussianREMEstimatorType
 
typedef TInputImage InputImageType
 
typedef TMaskImage MaskImageType
 
typedef itk::VariableLengthVector< double > MeasurementVectorType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ClassificationStrategy Self
 
typedef itk::ProcessObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual bool GetEM_Mode ()
 
RandomInitializergetInitializer ()
 return m_RandomInitializer object More...
 
virtual const char * GetNameOfClass () const
 
std::vector< unsigned int > GetNumberOfEstimators () const
 
std::vector< unsigned int > GetNumberOfIterations () const
 
bool GetSolutionMap (std::map< double, std::vector< GaussianFunctionType::Pointer > > &solution, std::map< double, std::vector< double > > &solutionAlpha, int step=-1)
 return the solutions map for each step More...
 
virtual void SetEM_Mode (bool _arg)
 
void SetEstimator (GaussianREMEstimatorPointerType theValue)
 set the estimation algorithm to use The algorithm must be already configured with the joint histogram More...
 
void SetInitializer (RandomInitializer::Pointer theValue)
 set the m_RandomInitializer method More...
 
void SetNumberOfEstimators (std::vector< unsigned int > NumberOfEstimators)
 
void SetNumberOfIterations (std::vector< unsigned int > NumberOfIterations)
 
void SetStrategy (std::vector< unsigned int > &ems, std::vector< unsigned int > &iters)
 
void Update () ITK_OVERRIDE
 executes the strategy More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ClassificationStrategy (const Self &)
 
 ClassificationStrategy ()
 
void operator= (const Self &)
 
bool sameModel (std::vector< GaussianFunctionType::Pointer > &mod1, std::vector< GaussianFunctionType::Pointer > &mod2)
 compare two models More...
 
virtual ~ClassificationStrategy ()
 

Protected Attributes

bool m_EM_Mode
 modification of processing if an em is being used More...
 
GaussianREMEstimatorPointerType m_Estimator
 estimation algorithm object More...
 
std::vector< std::map< double, std::vector< double > > > m_ListAlphas
 
std::vector< std::map< double, std::vector< GaussianFunctionType::Pointer > > > m_ListGaussianModels
 vector with all the solutions found in each step For EM's the double value stores the -likelihood, otherwise the cost function More...
 
std::vector< unsigned int > m_NumberOfEstimators
 vector with the number of random estimations for each step More...
 
std::vector< unsigned int > m_NumberOfIterations
 vector with the iterations for each step More...
 
RandomInitializer::Pointer m_RandomInitializer
 Initialization object. More...
 

Detailed Description

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

Class classifying using a strategy for selecting best random intializations

See also
animaHierarchicalInitializer

Definition at line 15 of file animaClassificationStrategy.h.

Member Typedef Documentation

◆ ConstPointer

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

Definition at line 23 of file animaClassificationStrategy.h.

◆ GaussianFunctionType

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

Definition at line 41 of file animaClassificationStrategy.h.

◆ GaussianREMEstimatorPointerType

template<typename TInputImage , typename TMaskImage >
typedef GaussianREMEstimatorType::Pointer anima::ClassificationStrategy< TInputImage, TMaskImage >::GaussianREMEstimatorPointerType

Definition at line 38 of file animaClassificationStrategy.h.

◆ GaussianREMEstimatorType

template<typename TInputImage , typename TMaskImage >
typedef GaussianREMEstimator<InputImageType,MaskImageType> anima::ClassificationStrategy< TInputImage, TMaskImage >::GaussianREMEstimatorType

Definition at line 37 of file animaClassificationStrategy.h.

◆ InputImageType

template<typename TInputImage , typename TMaskImage >
typedef TInputImage anima::ClassificationStrategy< TInputImage, TMaskImage >::InputImageType

Type of the input image.

Definition at line 29 of file animaClassificationStrategy.h.

◆ MaskImageType

template<typename TInputImage , typename TMaskImage >
typedef TMaskImage anima::ClassificationStrategy< TInputImage, TMaskImage >::MaskImageType

Type of the mask image.

Definition at line 35 of file animaClassificationStrategy.h.

◆ MeasurementVectorType

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

Definition at line 40 of file animaClassificationStrategy.h.

◆ Pointer

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

Definition at line 22 of file animaClassificationStrategy.h.

◆ Self

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

Standard class typedefs.

Definition at line 20 of file animaClassificationStrategy.h.

◆ Superclass

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

Definition at line 21 of file animaClassificationStrategy.h.

Constructor & Destructor Documentation

◆ ClassificationStrategy() [1/2]

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

◆ ClassificationStrategy() [2/2]

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

◆ ~ClassificationStrategy()

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

Member Function Documentation

◆ CreateAnother()

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

◆ GetEM_Mode()

template<typename TInputImage , typename TMaskImage >
virtual bool anima::ClassificationStrategy< TInputImage, TMaskImage >::GetEM_Mode ( )
virtual

◆ getInitializer()

template<typename TInputImage , typename TMaskImage >
RandomInitializer* anima::ClassificationStrategy< TInputImage, TMaskImage >::getInitializer ( )
inline

◆ GetNameOfClass()

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

Run-time type information (and related methods).

◆ GetNumberOfEstimators()

template<typename TInputImage , typename TMaskImage >
std::vector<unsigned int> anima::ClassificationStrategy< TInputImage, TMaskImage >::GetNumberOfEstimators ( ) const
inline

◆ GetNumberOfIterations()

template<typename TInputImage , typename TMaskImage >
std::vector<unsigned int> anima::ClassificationStrategy< TInputImage, TMaskImage >::GetNumberOfIterations ( ) const
inline

◆ GetSolutionMap()

template<typename TInputImage , typename TMaskImage >
bool anima::ClassificationStrategy< TInputImage, TMaskImage >::GetSolutionMap ( std::map< double, std::vector< GaussianFunctionType::Pointer > > &  solution,
std::map< double, std::vector< double > > &  solutionAlpha,
int  step = -1 
)

return the solutions map for each step

Parameters
stepsolutions of the step we want to get if step is set to -1, the last step will be returned

Definition at line 133 of file animaClassificationStrategy.hxx.

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

◆ New()

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

Method for creation through the object factory.

◆ operator=()

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

◆ sameModel()

template<typename TInputImage , typename TMaskImage >
bool anima::ClassificationStrategy< TInputImage, TMaskImage >::sameModel ( std::vector< GaussianFunctionType::Pointer > &  mod1,
std::vector< GaussianFunctionType::Pointer > &  mod2 
)
protected

compare two models

Returns
false if differents

Definition at line 174 of file animaClassificationStrategy.hxx.

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

◆ SetEM_Mode()

template<typename TInputImage , typename TMaskImage >
virtual void anima::ClassificationStrategy< TInputImage, TMaskImage >::SetEM_Mode ( bool  _arg)
virtual

◆ SetEstimator()

template<typename TInputImage , typename TMaskImage >
void anima::ClassificationStrategy< TInputImage, TMaskImage >::SetEstimator ( GaussianREMEstimatorPointerType  theValue)
inline

set the estimation algorithm to use The algorithm must be already configured with the joint histogram

Definition at line 52 of file animaClassificationStrategy.h.

References anima::ClassificationStrategy< TInputImage, TMaskImage >::m_Estimator.

◆ SetInitializer()

template<typename TInputImage , typename TMaskImage >
void anima::ClassificationStrategy< TInputImage, TMaskImage >::SetInitializer ( RandomInitializer::Pointer  theValue)
inline

set the m_RandomInitializer method

Warning
this object won't be recopied so don't delete it

Definition at line 58 of file animaClassificationStrategy.h.

References anima::ClassificationStrategy< TInputImage, TMaskImage >::m_RandomInitializer.

◆ SetNumberOfEstimators()

template<typename TInputImage , typename TMaskImage >
void anima::ClassificationStrategy< TInputImage, TMaskImage >::SetNumberOfEstimators ( std::vector< unsigned int >  NumberOfEstimators)
inline

◆ SetNumberOfIterations()

template<typename TInputImage , typename TMaskImage >
void anima::ClassificationStrategy< TInputImage, TMaskImage >::SetNumberOfIterations ( std::vector< unsigned int >  NumberOfIterations)
inline

◆ SetStrategy()

template<typename TInputImage , typename TMaskImage >
void anima::ClassificationStrategy< TInputImage, TMaskImage >::SetStrategy ( std::vector< unsigned int > &  ems,
std::vector< unsigned int > &  iters 
)

◆ Update()

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

executes the strategy

Returns
false if error

Definition at line 7 of file animaClassificationStrategy.hxx.

Member Data Documentation

◆ m_EM_Mode

template<typename TInputImage , typename TMaskImage >
bool anima::ClassificationStrategy< TInputImage, TMaskImage >::m_EM_Mode
protected

modification of processing if an em is being used

Definition at line 127 of file animaClassificationStrategy.h.

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

◆ m_Estimator

template<typename TInputImage , typename TMaskImage >
GaussianREMEstimatorPointerType anima::ClassificationStrategy< TInputImage, TMaskImage >::m_Estimator
protected

estimation algorithm object

Definition at line 105 of file animaClassificationStrategy.h.

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

◆ m_ListAlphas

template<typename TInputImage , typename TMaskImage >
std::vector< std::map<double, std::vector<double> > > anima::ClassificationStrategy< TInputImage, TMaskImage >::m_ListAlphas
protected

Definition at line 115 of file animaClassificationStrategy.h.

◆ m_ListGaussianModels

template<typename TInputImage , typename TMaskImage >
std::vector< std::map<double, std::vector<GaussianFunctionType::Pointer> > > anima::ClassificationStrategy< TInputImage, TMaskImage >::m_ListGaussianModels
protected

vector with all the solutions found in each step For EM's the double value stores the -likelihood, otherwise the cost function

Definition at line 114 of file animaClassificationStrategy.h.

◆ m_NumberOfEstimators

template<typename TInputImage , typename TMaskImage >
std::vector<unsigned int> anima::ClassificationStrategy< TInputImage, TMaskImage >::m_NumberOfEstimators
protected

◆ m_NumberOfIterations

template<typename TInputImage , typename TMaskImage >
std::vector<unsigned int> anima::ClassificationStrategy< TInputImage, TMaskImage >::m_NumberOfIterations
protected

◆ m_RandomInitializer

template<typename TInputImage , typename TMaskImage >
RandomInitializer::Pointer anima::ClassificationStrategy< TInputImage, TMaskImage >::m_RandomInitializer
protected

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