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

Class initializing a gaussian mixture with hierarchical information It uses 'a priori' knowledge of the sequences. More...

#include <animaHierarchicalInitializer.h>

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

Public Types

typedef anima::ClassificationStrategy< InputImageType, MaskImageTypeClassificationStrategyType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef anima::GaussianREMEstimator< InputImageType, MaskImageTypeGaussianREMEstimatorType
 
typedef anima::ImageClassifierFilter< InputImageType, InputImageTypeImageClassifierType
 
typedef itk::ImageRegionIterator< ImageTypeDImageIteratorTypeD
 
typedef itk::Image< PixelTypeD, 3 > ImageTypeD
 
typedef itk::ImageRegionConstIterator< InputImageTypeInputConstIteratorType
 
typedef InputImageType::ConstPointer InputImageConstPointer
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef TInputImage InputImageType
 
typedef itk::ImageRegionIterator< InputImageTypeInputIteratorType
 
typedef itk::ImageRegionIterator< ImageTypeDInputIteratorTypeD
 
typedef itk::ImageRegionConstIterator< MaskImageTypeMaskConstIteratorType
 
typedef itk::MaskImageFilter< InputImageType, InputImageTypeMaskFilterType
 
typedef MaskImageType::ConstPointer MaskImageConstPointer
 
typedef TMaskImage MaskImageType
 
typedef itk::MinimumMaximumImageCalculator< InputImageTypeMinMaxCalculatorType
 
typedef std::map< double, std::vector< GaussianFunctionType::Pointer > > ModelMap
 
typedef std::map< double, std::vector< double > > ModelMap2
 
typedef double PixelTypeD
 
typedef itk::SmartPointer< SelfPointer
 
typedef HierarchicalInitializer Self
 
typedef itk::ProcessObject Superclass
 
- Public Types inherited from anima::ModelInitializer
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::Statistics::GaussianMembershipFunction< MeasurementVectorTypeGaussianFunctionType
 
typedef itk::VariableLengthVector< double > MeasurementVectorType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ModelInitializer Self
 
typedef itk::ProcessObject Superclass
 

Public Member Functions

void ComputeHistogram ()
 
void ComputeInitialT1Classification ()
 
void ComputeSolution1D ()
 
void ComputeVariances ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
void FillInitialGaussianModel ()
 
TInputImage::ConstPointer GetInputImage1 ()
 
TInputImage::ConstPointer GetInputImage2 ()
 
TInputImage::ConstPointer GetInputImage3 ()
 
TInputImage::ConstPointer GetInputImage4 ()
 
TInputImage::ConstPointer GetInputImage5 ()
 
TMaskImage::ConstPointer GetMask ()
 
virtual const char * GetNameOfClass () const
 
virtual double GetRobust ()
 
virtual bool GetThirdIsFLAIR ()
 
virtual double GetTol ()
 
double regionMedianValue (itk::Image< double, 3 >::Pointer image, typename TInputImage::Pointer mask)
 
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)
 
void SetMask (const TMaskImage *mask)
 
virtual void SetRobust (double _arg)
 
virtual void SetThirdIsFLAIR (bool _arg)
 
virtual void SetTol (double _arg)
 
void Update () ITK_OVERRIDE
 
- Public Member Functions inherited from anima::ModelInitializer
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
std::vector< double > GetAlphas ()
 
std::vector< GaussianFunctionType::Pointer > GetInitialization ()
 returns a new initialization for the model More...
 
virtual bool GetVerbose ()
 
virtual void SetVerbose (bool _arg)
 

Static Public Member Functions

static void eventCallback (itk::Object *caller, const itk::EventObject &event, void *clientData)
 
static Pointer New ()
 
- Static Public Member Functions inherited from anima::ModelInitializer
static Pointer New ()
 

Protected Member Functions

 HierarchicalInitializer ()
 
virtual ~HierarchicalInitializer ()
 
- Protected Member Functions inherited from anima::ModelInitializer
 ModelInitializer (const Self &)
 
 ModelInitializer ()
 
void operator= (const Self &)
 
virtual ~ModelInitializer ()
 

Additional Inherited Members

- Protected Attributes inherited from anima::ModelInitializer
std::vector< double > m_Alphas
 
std::vector< GaussianFunctionType::Pointer > m_GaussianModel
 
bool m_Verbose
 

Detailed Description

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

Class initializing a gaussian mixture with hierarchical information It uses 'a priori' knowledge of the sequences.

First: EM to estimate a 3-class Gaussian model for T1-w Second: Classify the voxels Third: Histograms for each sequence based on the T1-w classification Histogram(T2-w, csf).... Fourth: For each histogram we find a maximum to assign as mean T2-w CSF -> brighter maximum FLAIR CSF -> darker maximum (the rest) -> absolute maximum

See also
animaClassificationStrategy, animaImageClassifierFilter, animaRandomInitializer

Definition at line 35 of file animaHierarchicalInitializer.h.

Member Typedef Documentation

◆ ClassificationStrategyType

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

Definition at line 71 of file animaHierarchicalInitializer.h.

◆ ConstPointer

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

Definition at line 43 of file animaHierarchicalInitializer.h.

◆ GaussianREMEstimatorType

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

Definition at line 70 of file animaHierarchicalInitializer.h.

◆ ImageClassifierType

template<typename TInputImage , typename TMaskImage >
typedef anima::ImageClassifierFilter<InputImageType,InputImageType> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ImageClassifierType

Definition at line 69 of file animaHierarchicalInitializer.h.

◆ ImageIteratorTypeD

template<typename TInputImage , typename TMaskImage >
typedef itk::ImageRegionIterator<ImageTypeD> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ImageIteratorTypeD

Definition at line 53 of file animaHierarchicalInitializer.h.

◆ ImageTypeD

template<typename TInputImage , typename TMaskImage >
typedef itk::Image<PixelTypeD,3> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ImageTypeD

Definition at line 52 of file animaHierarchicalInitializer.h.

◆ InputConstIteratorType

template<typename TInputImage , typename TMaskImage >
typedef itk::ImageRegionConstIterator< InputImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputConstIteratorType

Definition at line 62 of file animaHierarchicalInitializer.h.

◆ InputImageConstPointer

template<typename TInputImage , typename TMaskImage >
typedef InputImageType::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputImageConstPointer

Definition at line 58 of file animaHierarchicalInitializer.h.

◆ InputImagePixelType

template<typename TInputImage , typename TMaskImage >
typedef InputImageType::PixelType anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputImagePixelType

Definition at line 60 of file animaHierarchicalInitializer.h.

◆ InputImagePointer

template<typename TInputImage , typename TMaskImage >
typedef InputImageType::Pointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputImagePointer

Definition at line 59 of file animaHierarchicalInitializer.h.

◆ InputImageType

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

Type of the input image.

Definition at line 57 of file animaHierarchicalInitializer.h.

◆ InputIteratorType

template<typename TInputImage , typename TMaskImage >
typedef itk::ImageRegionIterator< InputImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputIteratorType

Definition at line 61 of file animaHierarchicalInitializer.h.

◆ InputIteratorTypeD

template<typename TInputImage , typename TMaskImage >
typedef itk::ImageRegionIterator< ImageTypeD > anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputIteratorTypeD

Definition at line 54 of file animaHierarchicalInitializer.h.

◆ MaskConstIteratorType

template<typename TInputImage , typename TMaskImage >
typedef itk::ImageRegionConstIterator< MaskImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::MaskConstIteratorType

Definition at line 67 of file animaHierarchicalInitializer.h.

◆ MaskFilterType

template<typename TInputImage , typename TMaskImage >
typedef itk::MaskImageFilter< InputImageType, InputImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::MaskFilterType

Definition at line 72 of file animaHierarchicalInitializer.h.

◆ MaskImageConstPointer

template<typename TInputImage , typename TMaskImage >
typedef MaskImageType::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::MaskImageConstPointer

Definition at line 66 of file animaHierarchicalInitializer.h.

◆ MaskImageType

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

Type of the mask image.

Definition at line 65 of file animaHierarchicalInitializer.h.

◆ MinMaxCalculatorType

template<typename TInputImage , typename TMaskImage >
typedef itk::MinimumMaximumImageCalculator<InputImageType> anima::HierarchicalInitializer< TInputImage, TMaskImage >::MinMaxCalculatorType

Definition at line 73 of file animaHierarchicalInitializer.h.

◆ ModelMap

template<typename TInputImage , typename TMaskImage >
typedef std::map<double, std::vector<GaussianFunctionType::Pointer> > anima::HierarchicalInitializer< TInputImage, TMaskImage >::ModelMap

Definition at line 75 of file animaHierarchicalInitializer.h.

◆ ModelMap2

template<typename TInputImage , typename TMaskImage >
typedef std::map<double, std::vector<double> > anima::HierarchicalInitializer< TInputImage, TMaskImage >::ModelMap2

Definition at line 76 of file animaHierarchicalInitializer.h.

◆ PixelTypeD

template<typename TInputImage , typename TMaskImage >
typedef double anima::HierarchicalInitializer< TInputImage, TMaskImage >::PixelTypeD

Definition at line 51 of file animaHierarchicalInitializer.h.

◆ Pointer

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

Definition at line 42 of file animaHierarchicalInitializer.h.

◆ Self

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

Standard class typedefs.

Definition at line 40 of file animaHierarchicalInitializer.h.

◆ Superclass

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

Definition at line 41 of file animaHierarchicalInitializer.h.

Constructor & Destructor Documentation

◆ HierarchicalInitializer()

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

Definition at line 163 of file animaHierarchicalInitializer.h.

◆ ~HierarchicalInitializer()

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

Definition at line 173 of file animaHierarchicalInitializer.h.

Member Function Documentation

◆ ComputeHistogram()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeHistogram ( )

In practice on T1-w, lesions are either classified as GM or WM depending on their intensity and errors in the extraction of the brain are typically classified as CSF. For this reason, a 256-bin histogram is computed for each tissue t ∈ CSF, GM, WM and sequence s ∈ T2, PD, FLAIR using the T1-w classification. The histogram is then smoothed using a Gaussian kernel with standard deviation of 5 bins and all modes of the histogram are found. For WM and GM where outliers are less important than in CSF, we set the initial μt,s as the absolute mode of the histogram, but for CSF, we set μCSF,s as the brightest mode. If this method is employed on FLAIR images, the μt,FLAIR of all tissues are set to the absolute mode because the outliers have less effect on the estimation of the CSF than on T2-w (skull-stripping errors and CSF are dark in FLAIR images).

Definition at line 190 of file animaHierarchicalInitializer.hxx.

References anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeVariances().

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

◆ ComputeInitialT1Classification()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeInitialT1Classification ( )

Compute an initial classification image of each tissue by using the NABT parameters computed in the T1-w image

Definition at line 147 of file animaHierarchicalInitializer.hxx.

References anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeHistogram().

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

◆ ComputeSolution1D()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeSolution1D ( )

First, we perform a NABT estimation on the T1-w only, applying the following initialization scheme using 100 initial random parameters obtaining the mean and the variance for each tissue in T1-w:

First, we choose multiple starting parameters at random. For the random initial parameters, the mean of each class is randomly drawn using a uniform distribution between the minimum and maximum of the image and the standard deviation of each class is set to a third of the standard deviation of intensities of the whole image. The advantage of using this random initialization only on one sequence is that the number of initializations can be reduced significantly compared to the multi-sequence approach and the T1-w is chosen because it has the best contrast between NABT.

Second, we run the EM algorithm for each set of starting parameters but, instead of waiting until the convergence of the algorithm, they provided intermediary parameters only after 50 iterations of the EM algorithm.

Third, we select d the intermediate parameters providing the best likelihood.

Fourth, we run the EM algorithm again until the convergence was reached, starting with the best intermediate parameters. In practice, the number of initial set of starting parameters needs to be high to cover the large range of possible solutions, and this number greatly increases in multidimensional spaces.

Definition at line 96 of file animaHierarchicalInitializer.hxx.

References anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeInitialT1Classification(), eventCallback(), and anima::RandomInitializer::New().

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

◆ ComputeVariances()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeVariances ( )

Compute the variance of each tissue and sequence using a robust variance estimator

Definition at line 400 of file animaHierarchicalInitializer.hxx.

References anima::HierarchicalInitializer< TInputImage, TMaskImage >::FillInitialGaussianModel().

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

◆ CreateAnother()

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

◆ eventCallback()

template<typename TInputImage , typename TMaskImage >
static void anima::HierarchicalInitializer< TInputImage, TMaskImage >::eventCallback ( itk::Object *  caller,
const itk::EventObject &  event,
void *  clientData 
)
inlinestatic

Definition at line 147 of file animaHierarchicalInitializer.h.

◆ FillInitialGaussianModel()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::FillInitialGaussianModel ( )

Compute the final covariance matrix for each tissue that is used in the initialization

Definition at line 465 of file animaHierarchicalInitializer.hxx.

References anima::HierarchicalInitializer< TInputImage, TMaskImage >::regionMedianValue().

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

◆ GetInputImage1()

template<typename TInputImage , typename TMaskImage >
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage1 ( )

Definition at line 60 of file animaHierarchicalInitializer.hxx.

◆ GetInputImage2()

template<typename TInputImage , typename TMaskImage >
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage2 ( )

Definition at line 67 of file animaHierarchicalInitializer.hxx.

◆ GetInputImage3()

template<typename TInputImage , typename TMaskImage >
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage3 ( )

Definition at line 74 of file animaHierarchicalInitializer.hxx.

◆ GetInputImage4()

template<typename TInputImage , typename TMaskImage >
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage4 ( )

Definition at line 81 of file animaHierarchicalInitializer.hxx.

◆ GetInputImage5()

template<typename TInputImage , typename TMaskImage >
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage5 ( )

◆ GetMask()

template<typename TInputImage , typename TMaskImage >
TMaskImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetMask ( )

Definition at line 53 of file animaHierarchicalInitializer.hxx.

◆ GetNameOfClass()

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

Run-time type information (and related methods).

Reimplemented from anima::ModelInitializer.

◆ GetRobust()

template<typename TInputImage , typename TMaskImage >
virtual double anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetRobust ( )
virtual

◆ GetThirdIsFLAIR()

template<typename TInputImage , typename TMaskImage >
virtual bool anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetThirdIsFLAIR ( )
virtual

◆ GetTol()

template<typename TInputImage , typename TMaskImage >
virtual double anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetTol ( )
virtual

◆ New()

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

Method for creation through the object factory.

◆ regionMedianValue()

template<typename TInputImage , typename TMaskImage >
double anima::HierarchicalInitializer< TInputImage, TMaskImage >::regionMedianValue ( itk::Image< double, 3 >::Pointer  image,
typename TInputImage::Pointer  mask 
)

◆ SetInputImage1()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage1 ( const TInputImage *  image)

The mri images.

Definition at line 13 of file animaHierarchicalInitializer.hxx.

◆ SetInputImage2()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage2 ( const TInputImage *  image)

Definition at line 21 of file animaHierarchicalInitializer.hxx.

◆ SetInputImage3()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage3 ( const TInputImage *  image)

Definition at line 29 of file animaHierarchicalInitializer.hxx.

◆ SetInputImage4()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage4 ( const TInputImage *  image)

Definition at line 36 of file animaHierarchicalInitializer.hxx.

◆ SetInputImage5()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage5 ( const TInputImage *  image)

Definition at line 44 of file animaHierarchicalInitializer.hxx.

◆ SetMask()

template<typename TInputImage , typename TMaskImage >
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetMask ( const TMaskImage *  mask)

mask in which the segmentation will be performed

Definition at line 7 of file animaHierarchicalInitializer.hxx.

◆ SetRobust()

template<typename TInputImage , typename TMaskImage >
virtual void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetRobust ( double  _arg)
virtual

◆ SetThirdIsFLAIR()

template<typename TInputImage , typename TMaskImage >
virtual void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetThirdIsFLAIR ( bool  _arg)
virtual

◆ SetTol()

template<typename TInputImage , typename TMaskImage >
virtual void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetTol ( double  _arg)
virtual

◆ Update()

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

Definition at line 522 of file animaHierarchicalInitializer.hxx.


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