SimpleITK  1.0.1
sitkN4BiasFieldCorrectionImageFilter.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 sitkN4BiasFieldCorrectionImageFilter_h
19 #define sitkN4BiasFieldCorrectionImageFilter_h
20 
21 /*
22  * WARNING: DO NOT EDIT THIS FILE!
23  * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24  * Please look at sitkDualImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkImageFilter.h"
31 #include "sitkBasicFilters.h"
32 
33 namespace itk {
34  namespace simple {
35 
73  public:
75 
79 
82 
85 
86 
87 
91  SITK_RETURN_SELF_TYPE_HEADER SetConvergenceThreshold ( double ConvergenceThreshold ) { this->m_ConvergenceThreshold = ConvergenceThreshold; return *this; }
92 
96  double GetConvergenceThreshold() const { return this->m_ConvergenceThreshold; }
97 
101  SITK_RETURN_SELF_TYPE_HEADER SetMaximumNumberOfIterations ( std::vector<uint32_t> MaximumNumberOfIterations ) { this->m_MaximumNumberOfIterations = MaximumNumberOfIterations; return *this; }
102 
106  std::vector<uint32_t> GetMaximumNumberOfIterations() const { return this->m_MaximumNumberOfIterations; }
107 
111  SITK_RETURN_SELF_TYPE_HEADER SetBiasFieldFullWidthAtHalfMaximum ( double BiasFieldFullWidthAtHalfMaximum ) { this->m_BiasFieldFullWidthAtHalfMaximum = BiasFieldFullWidthAtHalfMaximum; return *this; }
112 
116  double GetBiasFieldFullWidthAtHalfMaximum() const { return this->m_BiasFieldFullWidthAtHalfMaximum; }
117 
121  SITK_RETURN_SELF_TYPE_HEADER SetWienerFilterNoise ( double WienerFilterNoise ) { this->m_WienerFilterNoise = WienerFilterNoise; return *this; }
122 
126  double GetWienerFilterNoise() const { return this->m_WienerFilterNoise; }
127 
131  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfHistogramBins ( uint32_t NumberOfHistogramBins ) { this->m_NumberOfHistogramBins = NumberOfHistogramBins; return *this; }
132 
136  uint32_t GetNumberOfHistogramBins() const { return this->m_NumberOfHistogramBins; }
137 
141  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfControlPoints ( const std::vector<uint32_t> & NumberOfControlPoints ) { this->m_NumberOfControlPoints = NumberOfControlPoints; return *this; }
142 
144  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfControlPoints( uint32_t value ) { this->m_NumberOfControlPoints = std::vector<uint32_t>(3, value); return *this; }
145 
146 
150  std::vector<uint32_t> GetNumberOfControlPoints() const { return this->m_NumberOfControlPoints; }
151 
155  SITK_RETURN_SELF_TYPE_HEADER SetSplineOrder ( uint32_t SplineOrder ) { this->m_SplineOrder = SplineOrder; return *this; }
156 
160  uint32_t GetSplineOrder() const { return this->m_SplineOrder; }
162  std::string GetName() const { return std::string ("N4BiasFieldCorrectionImageFilter"); }
163 
165  std::string ToString() const;
166 
167 
169  Image Execute ( const Image & image, const Image & maskImage );
170 
171 
173  Image Execute ( const Image & image, const Image & maskImage, double convergenceThreshold, std::vector<uint32_t> maximumNumberOfIterations, double biasFieldFullWidthAtHalfMaximum, double wienerFilterNoise, uint32_t numberOfHistogramBins, const std::vector<uint32_t> & numberOfControlPoints, uint32_t splineOrder );
174 
175 
176  private:
178  typedef Image (Self::*MemberFunctionType)( const Image * image, const Image * maskImage );
179 
180  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
181  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image * image, const Image * maskImage );
182 
183 
184  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
185 
186 
187 
188  /* */
190  /* odo this variable needs to be printed */
191  std::vector<uint32_t> m_MaximumNumberOfIterations;
192  /* */
194  /* */
196  /* */
198  /* */
199  std::vector<uint32_t> m_NumberOfControlPoints;
200  /* */
202  };
203 
204 
205 
214  SITKBasicFilters_EXPORT Image N4BiasFieldCorrection ( const Image & image, const Image & maskImage, double convergenceThreshold = 0.001, std::vector<uint32_t> maximumNumberOfIterations = std::vector<uint32_t>(4,50), double biasFieldFullWidthAtHalfMaximum = 0.15, double wienerFilterNoise = 0.01, uint32_t numberOfHistogramBins = 200u, const std::vector<uint32_t> & numberOfControlPoints = std::vector<uint32_t>(3, 4), uint32_t splineOrder = 3u );
215 
216  }
217 }
218 #endif
#define SITKBasicFilters_EXPORT
Image N4BiasFieldCorrection(const Image &image, const Image &maskImage, double convergenceThreshold=0.001, std::vector< uint32_t > maximumNumberOfIterations=std::vector< uint32_t >(4, 50), double biasFieldFullWidthAtHalfMaximum=0.15, double wienerFilterNoise=0.01, uint32_t numberOfHistogramBins=200u, const std::vector< uint32_t > &numberOfControlPoints=std::vector< uint32_t >(3, 4), uint32_t splineOrder=3u)
Implementation of the N4 bias field correction algorithm.
Self & SetMaximumNumberOfIterations(std::vector< uint32_t > MaximumNumberOfIterations)
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
Implementation of the N4 bias field correction algorithm.
::uint32_t uint32_t
The main Image class for SimpleITK.
Definition: sitkImage.h:54
Self & SetBiasFieldFullWidthAtHalfMaximum(double BiasFieldFullWidthAtHalfMaximum)
Self & SetNumberOfControlPoints(const std::vector< uint32_t > &NumberOfControlPoints)
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
The base interface for SimpleITK filters that take one input image.