4 #include <itkImageToImageFilter.h> 5 #include <itkGaussianMembershipFunction.h> 14 template <
typename TInput,
typename TMask,
typename TOutput = TInput>
16 public itk::ImageToImageFilter< TInput ,TOutput >
21 typedef itk::ImageToImageFilter< TInput , TOutput >
Superclass;
50 this->SetCoordinateTolerance(tol);
51 this->SetDirectionTolerance(tol);
63 void SetMask(
const TMask* mask);
68 itkSetMacro(Verbose,
bool)
69 itkGetMacro(Verbose,
bool)
72 void SetGaussianModel(std::vector<GaussianFunctionType::Pointer> &model) {m_GaussianModel=model;}
73 void SetAlphas(std::vector<double> &model) {m_Alphas=model;}
75 std::vector<GaussianFunctionType::Pointer>
GetGaussiabModel() {
return m_GaussianModel;}
81 this->SetNumberOfRequiredOutputs(1);
82 this->SetNumberOfRequiredInputs(2);
86 m_IndexImage1=m_NbMaxImages, m_IndexImage2=m_NbMaxImages, m_IndexImage3=m_NbMaxImages, m_IndexImage4=m_NbMaxImages,m_IndexImage5=m_NbMaxImages, m_IndexImage6=m_NbMaxImages;
88 this->SetNumberOfWorkUnits(itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads());
101 typename TMask::ConstPointer
GetMask();
109 std::vector<double> m_Alphas;
110 std::vector<GaussianFunctionType::Pointer> m_GaussianModel;
112 std::vector<typename TInput::ConstPointer> m_ImagesVector;
113 std::string m_OutputFilename;
115 unsigned int m_NbInputs, m_NbMaxImages;
116 unsigned int m_IndexImage1, m_IndexImage2, m_IndexImage3, m_IndexImage4,m_IndexImage5, m_IndexImage6;
itk::Statistics::GaussianMembershipFunction< MeasurementVectorType > GaussianFunctionType
itk::VariableSizeMatrix< NumericType > DoubleVariableSizeMatrixType
double probability(DoubleVariableSizeMatrixType &point, GaussianFunctionType::Pointer model)
void SetInputImage5(const TInput *image)
TInput::ConstPointer GetInputImage3()
void SetTol(const double tol)
TInput::ConstPointer GetInputImage2()
Superclass::OutputImageRegionType OutputImageRegionType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE
TInput::ConstPointer InputImageConstPointer
std::vector< double > GetAlphas()
itk::VariableLengthVector< double > MeasurementVectorType
void SetInputImage4(const TInput *image)
void SetAlphas(std::vector< double > &model)
TOutput::ConstPointer OutputImageConstPointer
void SetMask(const TMask *mask)
ImageClassifierFilter Self
void SetInputImage2(const TInput *image)
itk::ImageToImageFilter< TInput, TOutput > Superclass
void SetOutputFilename(std::string filename)
itk::ImageRegionConstIterator< TMask > MaskConstIteratorType
TInput::ConstPointer GetInputImage4()
itk::ImageRegionIterator< TOutput > OutputIteratorType
TInput::ConstPointer GetInputImage5()
TMask::ConstPointer GetMask()
virtual ~ImageClassifierFilter()
void SetInputImage1(const TInput *image)
itk::SmartPointer< const Self > ConstPointer
TOutput::Pointer OutputImagePointer
void SetInputImage3(const TInput *image)
Classify each voxels into one of the given GMM classes.
itk::SmartPointer< Self > Pointer
TInput::ConstPointer GetInputImage1()
itk::ImageRegionConstIterator< TInput > InputConstIteratorType
void SetGaussianModel(std::vector< GaussianFunctionType::Pointer > &model)
std::vector< GaussianFunctionType::Pointer > GetGaussiabModel()