ITK  6.0.0
Insight Toolkit
itkBayesianClassifierInitializationImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkBayesianClassifierInitializationImageFilter_h
19#define itkBayesianClassifierInitializationImageFilter_h
20
21#include "itkVectorImage.h"
22#include "itkVectorContainer.h"
26
27namespace itk
28{
76template <typename TInputImage, typename TProbabilityPrecisionType = float>
78 : public ImageToImageFilter<TInputImage, VectorImage<TProbabilityPrecisionType, TInputImage::ImageDimension>>
79{
80public:
81 ITK_DISALLOW_COPY_AND_MOVE(BayesianClassifierInitializationImageFilter);
82
85 using InputImageType = TInputImage;
86 using ProbabilityPrecisionType = TProbabilityPrecisionType;
87
89 static constexpr unsigned int Dimension = InputImageType::ImageDimension;
90
95
97 itkNewMacro(Self);
98
100 itkOverrideGetNameOfClassMacro(BayesianClassifierInitializationImageFilter);
101
104
106 using InputPixelType = typename InputImageType::PixelType;
108
116
119
123
127
133 virtual void
135 itkGetModifiableObjectMacro(MembershipFunctionContainer, MembershipFunctionContainerType);
139 itkSetMacro(NumberOfClasses, unsigned int);
140 itkGetConstMacro(NumberOfClasses, unsigned int);
143 void
145
146#ifdef ITK_USE_CONCEPT_CHECKING
147 // Begin concept checking
148 itkConceptMacro(InputMultiplyOperatorCheck, (Concept::MultiplyOperator<InputPixelType>));
149 itkConceptMacro(DoubleConvertibleToProbabilityCheck, (Concept::Convertible<double, TProbabilityPrecisionType>));
150 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputPixelType>));
153 // End concept checking
154#endif
155
156protected:
159 void
160 PrintSelf(std::ostream & os, Indent indent) const override;
161
167 virtual void
169
172 void
173 GenerateData() override;
174
175private:
176 bool m_UserSuppliesMembershipFunctions{ false };
177 unsigned int m_NumberOfClasses{ 0 };
178
179 typename MembershipFunctionContainerType::Pointer m_MembershipFunctionContainer{};
180};
181} // end namespace itk
182
183#ifndef ITK_MANUAL_INSTANTIATION
184# include "itkBayesianClassifierInitializationImageFilter.hxx"
185#endif
186
187#endif
This filter is intended to be used as a helper class to initialize the BayesianClassifierImageFilter.
typename MembershipFunctionContainerType::Pointer MembershipFunctionContainerPointer
~BayesianClassifierInitializationImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetMembershipFunctions(MembershipFunctionContainerType *membershipFunction)
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks a region of pixels.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
MembershipFunctionBase defines common interfaces for membership functions.
Templated n-dimensional vector image class.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....