ITK  6.0.0
Insight Toolkit
itkImageClassifierBase.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 itkImageClassifierBase_h
19#define itkImageClassifierBase_h
20
21#include "itkClassifierBase.h"
22#include "itkMacro.h"
24
25namespace itk
26{
70template <typename TInputImage, typename TClassifiedImage>
71class ITK_TEMPLATE_EXPORT ImageClassifierBase : public ClassifierBase<TInputImage>
72{
73public:
74 ITK_DISALLOW_COPY_AND_MOVE(ImageClassifierBase);
75
81
83 itkNewMacro(Self);
84
86 itkOverrideGetNameOfClassMacro(ImageClassifierBase);
87
89 using InputImageType = TInputImage;
92
95
99 using typename Superclass::MeasurementVectorType;
100
102 using typename Superclass::MembershipFunctionType;
103
104 using typename Superclass::MembershipFunctionPointer;
105
106 using typename Superclass::MembershipFunctionPointerVector;
107
109 using typename Superclass::DecisionRuleType;
110
112 itkSetConstObjectMacro(InputImage, InputImageType);
113 itkGetConstObjectMacro(InputImage, InputImageType);
117 itkSetMacro(ClassifiedImage, ClassifiedImagePointer);
118
120 itkGetConstMacro(ClassifiedImage, ClassifiedImagePointer);
121
124 using InputImagePixelType = typename TInputImage::PixelType;
125
128 using ClassifiedImagePixelType = typename TClassifiedImage::PixelType;
129
133
135 std::vector<double>
137
138protected:
140 ~ImageClassifierBase() override = default;
141 void
142 PrintSelf(std::ostream & os, Indent indent) const override;
143
145 void
147
149 void
150 GenerateData() override;
151
152private:
154
156 ClassifiedImagePointer m_ClassifiedImage{};
157
159 virtual void
161}; // class ImageClassifierBase
162} // namespace itk
163
164#ifndef ITK_MANUAL_INSTANTIATION
165# include "itkImageClassifierBase.hxx"
166#endif
167
168#endif
Base class for classifier objects.
Base class for the ImageClassifierBase object.
typename TInputImage::PixelType InputImagePixelType
typename TInputImage::ConstPointer InputImageConstPointer
~ImageClassifierBase() override=default
typename TClassifiedImage::Pointer ClassifiedImagePointer
typename TInputImage::Pointer InputImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
std::vector< double > GetPixelMembershipValue(const InputImagePixelType inputImagePixel)
typename TInputImage::SizeType InputImageSizeType
void GenerateData() override
virtual void Classify()
typename TClassifiedImage::PixelType ClassifiedImagePixelType
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.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....