8 #include <itkHistogram.h> 9 #include <itkListSample.h> 10 #include <itkDenseFrequencyContainer2.h> 11 #include <itkSampleToHistogramFilter.h> 12 #include <itkMinimumMaximumImageCalculator.h> 13 #include <itkImageRegionIterator.h> 14 #include <itkMaskImageFilter.h> 34 template <
typename TInputImage,
typename TMaskImage>
72 typedef itk::MaskImageFilter< InputImageType, InputImageType >
MaskFilterType;
93 void SetMask(const TMaskImage* mask);
94 typename TMaskImage::ConstPointer
GetMask();
96 double regionMedianValue(itk::Image<
double, 3 >::Pointer image, typename TInputImage::Pointer mask );
98 void Update() ITK_OVERRIDE;
147 static
void eventCallback (itk::Object* caller, const itk::EventObject& event,
void* clientData)
149 itk::ProcessObject * processObject = (itk::ProcessObject*) caller;
150 std::cout<<
"\033[K\rProgression: "<<(int)(processObject->GetProgress() * 100)<<
"%"<<std::flush;
153 itkSetMacro(Tol,
double)
154 itkGetMacro(Tol,
double)
156 itkSetMacro(ThirdIsFLAIR,
bool)
157 itkGetMacro(ThirdIsFLAIR,
bool)
159 itkSetMacro(Robust,
double)
160 itkGetMacro(Robust,
double)
165 m_ThirdIsFLAIR =
true;
170 m_NumberOfModalities = 3;
171 m_IndexImage1 = m_NbMaxImages, m_IndexImage2 = m_NbMaxImages, m_IndexImage3 = m_NbMaxImages, m_IndexImage4 = m_NbMaxImages, m_IndexImage5 = m_NbMaxImages, m_IndexImagem_NbMaxImages = m_NbMaxImages;
178 std::vector<InputImageConstPointer> m_ImagesVector;
182 unsigned int m_NbInputs, m_NbMaxImages;
183 unsigned int m_IndexImage1, m_IndexImage2, m_IndexImage3, m_IndexImage4,m_IndexImage5, m_IndexImagem_NbMaxImages;
184 unsigned int m_NbClasses, m_NumberOfModalities;
186 std::vector<GaussianFunctionType::Pointer> m_Solution1D;
187 std::vector<double> m_Solution1DAlphas;
189 std::vector<InputImagePointer> m_ImagesClasses;
190 std::vector< std::vector<double> > m_Stds;
191 std::vector< std::vector<double> > m_SelectedMax;
itk::Image< PixelTypeD, 3 > ImageTypeD
virtual ~HierarchicalInitializer()
TInputImage::ConstPointer GetInputImage4()
TMaskImage::ConstPointer GetMask()
std::map< double, std::vector< double > > ModelMap2
void Update() ITK_OVERRIDE
void SetInputImage5(const TInputImage *image)
InputImageType::Pointer InputImagePointer
Class performing a robust expectation-maximation (REM) algorithm. Allow finding the 3-classes NABT mo...
TInputImage::ConstPointer GetInputImage2()
itk::ImageRegionIterator< ImageTypeD > ImageIteratorTypeD
TInputImage::ConstPointer GetInputImage5()
void ComputeInitialT1Classification()
itk::ImageRegionIterator< ImageTypeD > InputIteratorTypeD
void SetMask(const TMaskImage *mask)
TInputImage InputImageType
void SetInputImage2(const TInputImage *image)
TInputImage::ConstPointer GetInputImage3()
Gaussian model initializers Model Initializer represents the processes computing a gaussian model tha...
itk::MaskImageFilter< InputImageType, InputImageType > MaskFilterType
void SetInputImage1(const TInputImage *image)
HierarchicalInitializer Self
itk::ImageRegionIterator< InputImageType > InputIteratorType
double regionMedianValue(itk::Image< double, 3 >::Pointer image, typename TInputImage::Pointer mask)
void FillInitialGaussianModel()
Class initializing a gaussian mixture with hierarchical information It uses 'a priori' knowledge of t...
InputImageType::PixelType InputImagePixelType
HierarchicalInitializer()
TInputImage::ConstPointer GetInputImage1()
void SetInputImage4(const TInputImage *image)
void SetInputImage3(const TInputImage *image)
itk::SmartPointer< Self > Pointer
Classify each voxels into one of the given GMM classes.
itk::ImageRegionConstIterator< InputImageType > InputConstIteratorType
InputImageType::ConstPointer InputImageConstPointer
itk::ImageRegionConstIterator< MaskImageType > MaskConstIteratorType
itk::Statistics::GaussianMembershipFunction< MeasurementVectorType > GaussianFunctionType
itk::ProcessObject Superclass
itk::SmartPointer< const Self > ConstPointer
static void eventCallback(itk::Object *caller, const itk::EventObject &event, void *clientData)
itk::MinimumMaximumImageCalculator< InputImageType > MinMaxCalculatorType
std::map< double, std::vector< GaussianFunctionType::Pointer > > ModelMap
MaskImageType::ConstPointer MaskImageConstPointer