ANIMA
4.0
|
Class initializing a gaussian mixture with hierarchical information It uses 'a priori' knowledge of the sequences. More...
#include <animaHierarchicalInitializer.h>
Public Types | |
typedef anima::ClassificationStrategy< InputImageType, MaskImageType > | ClassificationStrategyType |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef anima::GaussianREMEstimator< InputImageType, MaskImageType > | GaussianREMEstimatorType |
typedef anima::ImageClassifierFilter< InputImageType, InputImageType > | ImageClassifierType |
typedef itk::ImageRegionIterator< ImageTypeD > | ImageIteratorTypeD |
typedef itk::Image< PixelTypeD, 3 > | ImageTypeD |
typedef itk::ImageRegionConstIterator< InputImageType > | InputConstIteratorType |
typedef InputImageType::ConstPointer | InputImageConstPointer |
typedef InputImageType::PixelType | InputImagePixelType |
typedef InputImageType::Pointer | InputImagePointer |
typedef TInputImage | InputImageType |
typedef itk::ImageRegionIterator< InputImageType > | InputIteratorType |
typedef itk::ImageRegionIterator< ImageTypeD > | InputIteratorTypeD |
typedef itk::ImageRegionConstIterator< MaskImageType > | MaskConstIteratorType |
typedef itk::MaskImageFilter< InputImageType, InputImageType > | MaskFilterType |
typedef MaskImageType::ConstPointer | MaskImageConstPointer |
typedef TMaskImage | MaskImageType |
typedef itk::MinimumMaximumImageCalculator< InputImageType > | MinMaxCalculatorType |
typedef std::map< double, std::vector< GaussianFunctionType::Pointer > > | ModelMap |
typedef std::map< double, std::vector< double > > | ModelMap2 |
typedef double | PixelTypeD |
typedef itk::SmartPointer< Self > | Pointer |
typedef HierarchicalInitializer | Self |
typedef itk::ProcessObject | Superclass |
Public Types inherited from anima::ModelInitializer | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::Statistics::GaussianMembershipFunction< MeasurementVectorType > | GaussianFunctionType |
typedef itk::VariableLengthVector< double > | MeasurementVectorType |
typedef itk::SmartPointer< Self > | Pointer |
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 |
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
Definition at line 35 of file animaHierarchicalInitializer.h.
typedef anima::ClassificationStrategy<InputImageType,MaskImageType> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ClassificationStrategyType |
Definition at line 71 of file animaHierarchicalInitializer.h.
typedef itk::SmartPointer<const Self> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ConstPointer |
Definition at line 43 of file animaHierarchicalInitializer.h.
typedef anima::GaussianREMEstimator<InputImageType,MaskImageType> anima::HierarchicalInitializer< TInputImage, TMaskImage >::GaussianREMEstimatorType |
Definition at line 70 of file animaHierarchicalInitializer.h.
typedef anima::ImageClassifierFilter<InputImageType,InputImageType> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ImageClassifierType |
Definition at line 69 of file animaHierarchicalInitializer.h.
typedef itk::ImageRegionIterator<ImageTypeD> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ImageIteratorTypeD |
Definition at line 53 of file animaHierarchicalInitializer.h.
typedef itk::Image<PixelTypeD,3> anima::HierarchicalInitializer< TInputImage, TMaskImage >::ImageTypeD |
Definition at line 52 of file animaHierarchicalInitializer.h.
typedef itk::ImageRegionConstIterator< InputImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputConstIteratorType |
Definition at line 62 of file animaHierarchicalInitializer.h.
typedef InputImageType::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputImageConstPointer |
Definition at line 58 of file animaHierarchicalInitializer.h.
typedef InputImageType::PixelType anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputImagePixelType |
Definition at line 60 of file animaHierarchicalInitializer.h.
typedef InputImageType::Pointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputImagePointer |
Definition at line 59 of file animaHierarchicalInitializer.h.
typedef TInputImage anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputImageType |
Type of the input image.
Definition at line 57 of file animaHierarchicalInitializer.h.
typedef itk::ImageRegionIterator< InputImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputIteratorType |
Definition at line 61 of file animaHierarchicalInitializer.h.
typedef itk::ImageRegionIterator< ImageTypeD > anima::HierarchicalInitializer< TInputImage, TMaskImage >::InputIteratorTypeD |
Definition at line 54 of file animaHierarchicalInitializer.h.
typedef itk::ImageRegionConstIterator< MaskImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::MaskConstIteratorType |
Definition at line 67 of file animaHierarchicalInitializer.h.
typedef itk::MaskImageFilter< InputImageType, InputImageType > anima::HierarchicalInitializer< TInputImage, TMaskImage >::MaskFilterType |
Definition at line 72 of file animaHierarchicalInitializer.h.
typedef MaskImageType::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::MaskImageConstPointer |
Definition at line 66 of file animaHierarchicalInitializer.h.
typedef TMaskImage anima::HierarchicalInitializer< TInputImage, TMaskImage >::MaskImageType |
Type of the mask image.
Definition at line 65 of file animaHierarchicalInitializer.h.
typedef itk::MinimumMaximumImageCalculator<InputImageType> anima::HierarchicalInitializer< TInputImage, TMaskImage >::MinMaxCalculatorType |
Definition at line 73 of file animaHierarchicalInitializer.h.
typedef std::map<double, std::vector<GaussianFunctionType::Pointer> > anima::HierarchicalInitializer< TInputImage, TMaskImage >::ModelMap |
Definition at line 75 of file animaHierarchicalInitializer.h.
typedef std::map<double, std::vector<double> > anima::HierarchicalInitializer< TInputImage, TMaskImage >::ModelMap2 |
Definition at line 76 of file animaHierarchicalInitializer.h.
typedef double anima::HierarchicalInitializer< TInputImage, TMaskImage >::PixelTypeD |
Definition at line 51 of file animaHierarchicalInitializer.h.
typedef itk::SmartPointer<Self> anima::HierarchicalInitializer< TInputImage, TMaskImage >::Pointer |
Definition at line 42 of file animaHierarchicalInitializer.h.
typedef HierarchicalInitializer anima::HierarchicalInitializer< TInputImage, TMaskImage >::Self |
Standard class typedefs.
Definition at line 40 of file animaHierarchicalInitializer.h.
typedef itk::ProcessObject anima::HierarchicalInitializer< TInputImage, TMaskImage >::Superclass |
Definition at line 41 of file animaHierarchicalInitializer.h.
|
inlineprotected |
Definition at line 163 of file animaHierarchicalInitializer.h.
|
inlineprotectedvirtual |
Definition at line 173 of file animaHierarchicalInitializer.h.
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().
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().
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().
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().
virtual::itk::LightObject::Pointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::CreateAnother | ( | void | ) | const |
|
inlinestatic |
Definition at line 147 of file animaHierarchicalInitializer.h.
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().
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage1 | ( | ) |
Definition at line 60 of file animaHierarchicalInitializer.hxx.
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage2 | ( | ) |
Definition at line 67 of file animaHierarchicalInitializer.hxx.
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage3 | ( | ) |
Definition at line 74 of file animaHierarchicalInitializer.hxx.
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage4 | ( | ) |
Definition at line 81 of file animaHierarchicalInitializer.hxx.
TInputImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetInputImage5 | ( | ) |
Definition at line 88 of file animaHierarchicalInitializer.hxx.
References anima::HierarchicalInitializer< TInputImage, TMaskImage >::ComputeSolution1D().
TMaskImage::ConstPointer anima::HierarchicalInitializer< TInputImage, TMaskImage >::GetMask | ( | ) |
Definition at line 53 of file animaHierarchicalInitializer.hxx.
|
virtual |
Run-time type information (and related methods).
Reimplemented from anima::ModelInitializer.
|
virtual |
|
virtual |
|
virtual |
|
static |
Method for creation through the object factory.
double anima::HierarchicalInitializer< TInputImage, TMaskImage >::regionMedianValue | ( | itk::Image< double, 3 >::Pointer | image, |
typename TInputImage::Pointer | mask | ||
) |
Definition at line 501 of file animaHierarchicalInitializer.hxx.
Referenced by anima::HierarchicalInitializer< TInputImage, TMaskImage >::FillInitialGaussianModel().
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage1 | ( | const TInputImage * | image | ) |
The mri images.
Definition at line 13 of file animaHierarchicalInitializer.hxx.
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage2 | ( | const TInputImage * | image | ) |
Definition at line 21 of file animaHierarchicalInitializer.hxx.
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage3 | ( | const TInputImage * | image | ) |
Definition at line 29 of file animaHierarchicalInitializer.hxx.
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage4 | ( | const TInputImage * | image | ) |
Definition at line 36 of file animaHierarchicalInitializer.hxx.
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::SetInputImage5 | ( | const TInputImage * | image | ) |
Definition at line 44 of file animaHierarchicalInitializer.hxx.
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.
|
virtual |
|
virtual |
|
virtual |
void anima::HierarchicalInitializer< TInputImage, TMaskImage >::Update | ( | ) |
Definition at line 522 of file animaHierarchicalInitializer.hxx.