ITK  4.2.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< class TInputImage, class TProbabilityPrecisionType = float >
77  public
78  ImageToImageFilter< TInputImage, VectorImage< TProbabilityPrecisionType,
79  ::itk::GetImageDimension< TInputImage >::ImageDimension > >
80 {
81 public:
84  typedef TInputImage InputImageType;
85  typedef TProbabilityPrecisionType ProbabilityPrecisionType;
86 
88  itkStaticConstMacro(Dimension, unsigned int,
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 
140  itkGetObjectMacro(MembershipFunctionContainer, MembershipFunctionContainerType);
141 
143  itkSetMacro(NumberOfClasses, unsigned int);
144  itkGetConstMacro(NumberOfClasses, unsigned int);
146 
147  virtual void GenerateOutputInformation();
148 
149 #ifdef ITK_USE_CONCEPT_CHECKING
150 
151  itkConceptMacro( InputMultiplyOperatorCheck,
153  itkConceptMacro( DoubleConvertibleToProbabilityCheck,
155  itkConceptMacro( InputHasNumericTraitsCheck,
157  itkConceptMacro( ProbabilityHasNumericTraitsCheck,
159  itkConceptMacro( DoublePlusInputCheck,
161 
163 #endif
164 protected:
167  void PrintSelf(std::ostream & os, Indent indent) const;
169 
175  virtual void InitializeMembershipFunctions();
176 
179  virtual void GenerateData();
180 
181 private:
182  BayesianClassifierInitializationImageFilter(const Self &); //purposely not
183  // implemented
184  void operator=(const Self &); //purposely not
185  // implemented
186 
188  unsigned int m_NumberOfClasses;
189 
191 };
192 } // end namespace itk
193 
194 #ifndef ITK_MANUAL_INSTANTIATION
195 #include "itkBayesianClassifierInitializationImageFilter.hxx"
196 #endif
197 
198 #endif
199