SimpleITK  1.3.0.dev466
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 sitkImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkBasicFilters.h"
30 #include "sitkImageFilter.h"
31 
32 namespace itk {
33  namespace simple {
34 
72  public:
74 
77 
81 
84 
85 
86 
90  SITK_RETURN_SELF_TYPE_HEADER SetConvergenceThreshold ( double ConvergenceThreshold ) { this->m_ConvergenceThreshold = ConvergenceThreshold; return *this; }
91 
95  double GetConvergenceThreshold() const { return this->m_ConvergenceThreshold; }
96 
100  SITK_RETURN_SELF_TYPE_HEADER SetMaximumNumberOfIterations ( std::vector<uint32_t> MaximumNumberOfIterations ) { this->m_MaximumNumberOfIterations = MaximumNumberOfIterations; return *this; }
101 
105  std::vector<uint32_t> GetMaximumNumberOfIterations() const { return this->m_MaximumNumberOfIterations; }
106 
110  SITK_RETURN_SELF_TYPE_HEADER SetBiasFieldFullWidthAtHalfMaximum ( double BiasFieldFullWidthAtHalfMaximum ) { this->m_BiasFieldFullWidthAtHalfMaximum = BiasFieldFullWidthAtHalfMaximum; return *this; }
111 
115  double GetBiasFieldFullWidthAtHalfMaximum() const { return this->m_BiasFieldFullWidthAtHalfMaximum; }
116 
120  SITK_RETURN_SELF_TYPE_HEADER SetWienerFilterNoise ( double WienerFilterNoise ) { this->m_WienerFilterNoise = WienerFilterNoise; return *this; }
121 
125  double GetWienerFilterNoise() const { return this->m_WienerFilterNoise; }
126 
130  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfHistogramBins ( uint32_t NumberOfHistogramBins ) { this->m_NumberOfHistogramBins = NumberOfHistogramBins; return *this; }
131 
135  uint32_t GetNumberOfHistogramBins() const { return this->m_NumberOfHistogramBins; }
136 
140  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfControlPoints ( const std::vector<uint32_t> & NumberOfControlPoints ) { this->m_NumberOfControlPoints = NumberOfControlPoints; return *this; }
141 
143  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfControlPoints( uint32_t value ) { this->m_NumberOfControlPoints = std::vector<uint32_t>(3, value); return *this; }
144 
145 
149  std::vector<uint32_t> GetNumberOfControlPoints() const { return this->m_NumberOfControlPoints; }
150 
154  SITK_RETURN_SELF_TYPE_HEADER SetSplineOrder ( uint32_t SplineOrder ) { this->m_SplineOrder = SplineOrder; return *this; }
155 
159  uint32_t GetSplineOrder() const { return this->m_SplineOrder; }
160 
164  SITK_RETURN_SELF_TYPE_HEADER SetUseMaskLabel ( bool UseMaskLabel ) { this->m_UseMaskLabel = UseMaskLabel; return *this; }
165 
167  SITK_RETURN_SELF_TYPE_HEADER UseMaskLabelOn() { return this->SetUseMaskLabel(true); }
168  SITK_RETURN_SELF_TYPE_HEADER UseMaskLabelOff() { return this->SetUseMaskLabel(false); }
169 
173  bool GetUseMaskLabel() const { return this->m_UseMaskLabel; }
174 
178  SITK_RETURN_SELF_TYPE_HEADER SetMaskLabel ( uint8_t MaskLabel ) { this->m_MaskLabel = MaskLabel; return *this; }
179 
183  uint8_t GetMaskLabel() const { return this->m_MaskLabel; }
185  std::string GetName() const { return std::string ("N4BiasFieldCorrectionImageFilter"); }
186 
188  std::string ToString() const;
189 
190 
192  Image Execute ( const Image & image, const Image & maskImage );
193  Image Execute ( const Image & image );
194 
195 
197  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, bool useMaskLabel, uint8_t maskLabel );
198  Image Execute ( const Image & image, double convergenceThreshold, std::vector<uint32_t> maximumNumberOfIterations, double biasFieldFullWidthAtHalfMaximum, double wienerFilterNoise, uint32_t numberOfHistogramBins, const std::vector<uint32_t> & numberOfControlPoints, uint32_t splineOrder, bool useMaskLabel, uint8_t maskLabel );
199 
200  private:
201 
204  typedef Image (Self::*MemberFunctionType)( const Image * image, const Image * maskImage );
205  template <class TImageType> Image ExecuteInternal ( const Image * image, const Image * maskImage );
206 
207 
208  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
209 
210  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
211 
212 
213  /* */
215  /* odo this variable needs to be printed */
216  std::vector<uint32_t> m_MaximumNumberOfIterations;
217  /* */
219  /* */
221  /* */
223  /* */
224  std::vector<uint32_t> m_NumberOfControlPoints;
225  /* */
229  };
230 
231 
240  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, bool useMaskLabel = true, uint8_t maskLabel = 1 );
241  SITKBasicFilters_EXPORT Image N4BiasFieldCorrection ( const Image & image, 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, bool useMaskLabel = true, uint8_t maskLabel = 1 );
242  }
243 }
244 #endif
#define SITKBasicFilters_EXPORT
Self & SetMaximumNumberOfIterations(std::vector< uint32_t > MaximumNumberOfIterations)
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, bool useMaskLabel=true, uint8_t maskLabel=1)
Implementation of the N4 bias field correction algorithm.
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
::uint8_t uint8_t
Implementation of the N4 bias field correction algorithm.
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
::uint32_t uint32_t
The Image class for SimpleITK.
Definition: sitkImage.h:78
Self & SetBiasFieldFullWidthAtHalfMaximum(double BiasFieldFullWidthAtHalfMaximum)
Self & SetNumberOfControlPoints(const std::vector< uint32_t > &NumberOfControlPoints)
The base interface for SimpleITK filters that take one input image.