ITK  4.3.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< class TInputImage,
70  class TClassifiedImage >
71 class ITK_EXPORT ImageClassifierBase:
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 
98  typedef typename Superclass::MeasurementVectorType MeasurementVectorType;
99 
101  typedef typename Superclass::MembershipFunctionType MembershipFunctionType;
102 
103  typedef typename Superclass::MembershipFunctionPointer
105 
106  typedef typename Superclass::MembershipFunctionPointerVector
108 
110  typedef typename Superclass::DecisionRuleType DecisionRuleType;
111 
113  itkSetConstObjectMacro(InputImage, InputImageType);
114 
116  itkGetConstObjectMacro(InputImage, InputImageType);
117 
119  itkSetMacro(ClassifiedImage, ClassifiedImagePointer);
120 
122  itkGetConstMacro(ClassifiedImage, ClassifiedImagePointer);
123 
126  typedef typename TInputImage::PixelType InputImagePixelType;
127 
130  typedef typename TClassifiedImage::PixelType ClassifiedImagePixelType;
131 
133  typedef
135  typedef
137 
139  std::vector< double >
140  GetPixelMembershipValue(const InputImagePixelType inputImagePixel);
141 
142 protected:
145  void PrintSelf(std::ostream & os, Indent indent) const;
146 
148  void Allocate();
149 
151  void GenerateData();
152 
153 private:
154  ImageClassifierBase(const Self &); //purposely not implemented
155  void operator=(const Self &); //purposely not implemented
156 
157  typedef typename TInputImage::SizeType InputImageSizeType;
158 
161 
163  virtual void Classify();
164 }; // class ImageClassifierBase
165 } // namespace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 #include "itkImageClassifierBase.hxx"
169 #endif
170 
171 #endif
172