ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkBayesianClassifierInitializationImageFilter.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 itkBayesianClassifierInitializationImageFilter_h
19 #define itkBayesianClassifierInitializationImageFilter_h
20 
21 #include "itkVectorImage.h"
22 #include "itkVectorContainer.h"
23 #include "itkImageToImageFilter.h"
24 #include "itkImageRegionIterator.h"
26 
27 namespace itk
28 {
75 template< typename TInputImage, typename TProbabilityPrecisionType = float >
77  public
78  ImageToImageFilter< TInputImage, VectorImage< TProbabilityPrecisionType,
79  TInputImage::ImageDimension > >
80 {
81 public:
84  typedef TInputImage InputImageType;
85  typedef TProbabilityPrecisionType ProbabilityPrecisionType;
86 
88  itkStaticConstMacro(Dimension, unsigned int,
89  InputImageType ::ImageDimension);
90 
92  itkGetStaticConstMacro(Dimension) > OutputImageType;
96 
98  itkNewMacro(Self);
99 
102 
105 
107  typedef typename InputImageType::PixelType InputPixelType;
109 
114  itkGetStaticConstMacro(Dimension) > MembershipImageType;
118 
121 
125 
127  typedef VectorContainer< unsigned int,
131 
137  virtual void SetMembershipFunctions(MembershipFunctionContainerType
138  *densityFunctionContainer);
139  itkGetModifiableObjectMacro(MembershipFunctionContainer, MembershipFunctionContainerType);
141 
143  itkSetMacro(NumberOfClasses, unsigned int);
144  itkGetConstMacro(NumberOfClasses, unsigned int);
146 
147  virtual void GenerateOutputInformation() ITK_OVERRIDE;
148 
149 #ifdef ITK_USE_CONCEPT_CHECKING
150  // Begin concept checking
151  itkConceptMacro( InputMultiplyOperatorCheck,
153  itkConceptMacro( DoubleConvertibleToProbabilityCheck,
155  itkConceptMacro( InputHasNumericTraitsCheck,
157  itkConceptMacro( ProbabilityHasNumericTraitsCheck,
159  itkConceptMacro( DoublePlusInputCheck,
161  // End concept checking
162 #endif
163 
164 protected:
167  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
168 
174  virtual void InitializeMembershipFunctions();
175 
178  virtual void GenerateData() ITK_OVERRIDE;
179 
180 private:
181  ITK_DISALLOW_COPY_AND_ASSIGN(BayesianClassifierInitializationImageFilter);
182 
183  bool m_UserSuppliesMembershipFunctions;
184  unsigned int m_NumberOfClasses;
185 
186  typename MembershipFunctionContainerType::Pointer m_MembershipFunctionContainer;
187 };
188 } // end namespace itk
189 
190 #ifndef ITK_MANUAL_INSTANTIATION
191 #include "itkBayesianClassifierInitializationImageFilter.hxx"
192 #endif
193 
194 #endif
ImageToImageFilter< InputImageType, OutputImageType > Superclass
Light weight base class for most itk classes.
This filter is intended to be used as a helper class to initialize the BayesianClassifierImageFilter...
Statistics::MembershipFunctionBase< MeasurementVectorType > MembershipFunctionType
Templated n-dimensional vector image class.
Represents an array whose length can be defined at run-time.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
A multi-dimensional iterator templated over image type that walks a region of pixels.
MembershipFunctionBase defines common interfaces for membership functions.
VectorContainer< unsigned int, MembershipFunctionPointer > MembershipFunctionContainerType
Base class for filters that take an image as input and produce an image as output.
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
VectorImage< ProbabilityPrecisionType, itkGetStaticConstMacro(Dimension) > MembershipImageType
#define itkConceptMacro(name, concept)
VectorImage< ProbabilityPrecisionType, itkGetStaticConstMacro(Dimension) > OutputImageType
A multi-dimensional iterator templated over image type that walks a region of pixels.