ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkImageClassifierBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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"
23 #include "itkImageRegionIterator.h"
24 
25 namespace itk
26 {
69 template< typename TInputImage,
70  typename TClassifiedImage >
72  public ClassifierBase< TInputImage >
73 {
74 public:
80 
82  itkNewMacro(Self);
83 
86 
88  typedef TInputImage InputImageType;
89  typedef typename TInputImage::Pointer InputImagePointer;
90  typedef typename TInputImage::ConstPointer InputImageConstPointer;
91 
93  typedef typename TClassifiedImage::Pointer ClassifiedImagePointer;
94 
99 
102 
105 
108 
111 
113  itkSetConstObjectMacro(InputImage, InputImageType);
114  itkGetConstObjectMacro(InputImage, InputImageType);
116 
118  itkSetMacro(ClassifiedImage, ClassifiedImagePointer);
119 
121  itkGetConstMacro(ClassifiedImage, ClassifiedImagePointer);
122 
125  typedef typename TInputImage::PixelType InputImagePixelType;
126 
129  typedef typename TClassifiedImage::PixelType ClassifiedImagePixelType;
130 
132  typedef
134  typedef
136 
138  std::vector< double >
139  GetPixelMembershipValue(const InputImagePixelType inputImagePixel);
140 
141 protected:
144  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
145 
147  void Allocate();
148 
150  void GenerateData() ITK_OVERRIDE;
151 
152 private:
153  ImageClassifierBase(const Self &); //purposely not implemented
154  void operator=(const Self &); //purposely not implemented
155 
156  typedef typename TInputImage::SizeType InputImageSizeType;
157 
160 
162  virtual void Classify();
163 }; // class ImageClassifierBase
164 } // namespace itk
165 
166 #ifndef ITK_MANUAL_INSTANTIATION
167 #include "itkImageClassifierBase.hxx"
168 #endif
169 
170 #endif
void GenerateData() override
SmartPointer< Self > Pointer
Light weight base class for most itk classes.
TClassifiedImage::Pointer ClassifiedImagePointer
MembershipFunctionType::Pointer MembershipFunctionPointer
InputImageConstPointer m_InputImage
Superclass::MeasurementVectorType MeasurementVectorType
TInputImage::ValueType MeasurementVectorType
std::vector< double > GetPixelMembershipValue(const InputImagePixelType inputImagePixel)
Superclass::MembershipFunctionPointer MembershipFunctionPointer
Base class for the ImageClassifierBase object.
Base class for classifier objects.
SmartPointer< const Self > ConstPointer
Statistics::MembershipFunctionBase< MeasurementVectorType > MembershipFunctionType
TInputImage::SizeType InputImageSizeType
virtual void Classify()
A multi-dimensional iterator templated over image type that walks a region of pixels.
Superclass::DecisionRuleType DecisionRuleType
ClassifiedImagePointer m_ClassifiedImage
ImageRegionConstIterator< TInputImage > InputImageConstIterator
void PrintSelf(std::ostream &os, Indent indent) const override
TInputImage::PixelType InputImagePixelType
Superclass::MembershipFunctionPointerVector MembershipFunctionPointerVector
TInputImage::ConstPointer InputImageConstPointer
ClassifierBase< TInputImage > Superclass
std::vector< MembershipFunctionPointer > MembershipFunctionPointerVector
Statistics::DecisionRule DecisionRuleType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::MembershipFunctionType MembershipFunctionType
ImageRegionIterator< TClassifiedImage > ClassifiedImageIterator
TInputImage::Pointer InputImagePointer
A multi-dimensional iterator templated over image type that walks a region of pixels.
TClassifiedImage::PixelType ClassifiedImagePixelType