SimpleITK  2.0.0rc1.post245
sitkN4BiasFieldCorrectionImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
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 
75  public:
77 
80 
84 
87 \
88 
92  SITK_RETURN_SELF_TYPE_HEADER SetConvergenceThreshold ( double ConvergenceThreshold ) { this->m_ConvergenceThreshold = ConvergenceThreshold; return *this; }
93 
97  double GetConvergenceThreshold() const { return this->m_ConvergenceThreshold; }\
98 
102  SITK_RETURN_SELF_TYPE_HEADER SetMaximumNumberOfIterations ( std::vector<uint32_t> MaximumNumberOfIterations ) { this->m_MaximumNumberOfIterations = MaximumNumberOfIterations; return *this; }
103 
107  std::vector<uint32_t> GetMaximumNumberOfIterations() const { return this->m_MaximumNumberOfIterations; }\
108 
112  SITK_RETURN_SELF_TYPE_HEADER SetBiasFieldFullWidthAtHalfMaximum ( double BiasFieldFullWidthAtHalfMaximum ) { this->m_BiasFieldFullWidthAtHalfMaximum = BiasFieldFullWidthAtHalfMaximum; return *this; }
113 
117  double GetBiasFieldFullWidthAtHalfMaximum() const { return this->m_BiasFieldFullWidthAtHalfMaximum; }\
118 
122  SITK_RETURN_SELF_TYPE_HEADER SetWienerFilterNoise ( double WienerFilterNoise ) { this->m_WienerFilterNoise = WienerFilterNoise; return *this; }
123 
127  double GetWienerFilterNoise() const { return this->m_WienerFilterNoise; }\
128 
132  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfHistogramBins ( uint32_t NumberOfHistogramBins ) { this->m_NumberOfHistogramBins = NumberOfHistogramBins; return *this; }
133 
137  uint32_t GetNumberOfHistogramBins() const { return this->m_NumberOfHistogramBins; }\
138 
142  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfControlPoints ( std::vector<uint32_t> NumberOfControlPoints ) { this->m_NumberOfControlPoints = std::move(NumberOfControlPoints); return *this; }
143 
145  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfControlPoints( uint32_t value ) { this->m_NumberOfControlPoints = std::vector<uint32_t>(3, value); return *this; }
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; }\
161 
165  SITK_RETURN_SELF_TYPE_HEADER SetUseMaskLabel ( bool UseMaskLabel ) { this->m_UseMaskLabel = UseMaskLabel; return *this; }
166 
168  SITK_RETURN_SELF_TYPE_HEADER UseMaskLabelOn() { return this->SetUseMaskLabel(true); }
169  SITK_RETURN_SELF_TYPE_HEADER UseMaskLabelOff() { return this->SetUseMaskLabel(false); }
170 
174  bool GetUseMaskLabel() const { return this->m_UseMaskLabel; }\
175 
179  SITK_RETURN_SELF_TYPE_HEADER SetMaskLabel ( uint8_t MaskLabel ) { this->m_MaskLabel = MaskLabel; return *this; }
180 
184  uint8_t GetMaskLabel() const { return this->m_MaskLabel; }
185 
187  std::string GetName() const { return std::string ("N4BiasFieldCorrectionImageFilter"); }
188 
190  std::string ToString() const;
191 
192 
195  Image Execute ( const Image & image, const Image & maskImage );
196  Image Execute ( const Image & image );
197 
198  private:
199 
202  using MemberFunctionType = Image (Self::*)( const Image * image, const Image * maskImage );
203  template <class TImageType> Image ExecuteInternal ( const Image * image, const Image * maskImage );
204 
205 
207 
208  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
209 
210 
211  /* */
212  double m_ConvergenceThreshold{0.001};
213 
214  /* odo this variable needs to be printed */
215  std::vector<uint32_t> m_MaximumNumberOfIterations{std::vector<uint32_t>(4,50)};
216 
217  /* */
218  double m_BiasFieldFullWidthAtHalfMaximum{0.15};
219 
220  /* */
221  double m_WienerFilterNoise{0.01};
222 
223  /* */
224  uint32_t m_NumberOfHistogramBins{200u};
225 
226  /* */
227  std::vector<uint32_t> m_NumberOfControlPoints{std::vector<uint32_t>(3, 4)};
228 
229  /* */
230  uint32_t m_SplineOrder{3u};
231 
232  bool m_UseMaskLabel{true};
233 
234  uint8_t m_MaskLabel{1};
235 
236 
237  };
238 
249  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, std::vector<uint32_t> numberOfControlPoints = std::vector<uint32_t>(3, 4), uint32_t splineOrder = 3u, bool useMaskLabel = true, uint8_t maskLabel = 1 );
250  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, std::vector<uint32_t> numberOfControlPoints = std::vector<uint32_t>(3, 4), uint32_t splineOrder = 3u, bool useMaskLabel = true, uint8_t maskLabel = 1 );
252  }
253 }
254 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
itk::simple::N4BiasFieldCorrectionImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkN4BiasFieldCorrectionImageFilter.h:208
sitkBasicFilters.h
itk::simple::N4BiasFieldCorrectionImageFilter::SetNumberOfHistogramBins
Self & SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:132
itk::uint8_t
::uint8_t uint8_t
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::N4BiasFieldCorrectionImageFilter::SetNumberOfControlPoints
Self & SetNumberOfControlPoints(std::vector< uint32_t > NumberOfControlPoints)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:142
itk::simple::RealPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:96
itk::simple::N4BiasFieldCorrectionImageFilter::GetMaximumNumberOfIterations
std::vector< uint32_t > GetMaximumNumberOfIterations() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:107
itk::simple::N4BiasFieldCorrectionImageFilter::GetNumberOfHistogramBins
uint32_t GetNumberOfHistogramBins() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:137
itk::simple::N4BiasFieldCorrectionImageFilter::GetNumberOfControlPoints
std::vector< uint32_t > GetNumberOfControlPoints() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:150
itk::simple::N4BiasFieldCorrectionImageFilter
Implementation of the N4 bias field correction algorithm.
Definition: sitkN4BiasFieldCorrectionImageFilter.h:74
sitkImageFilter.h
itk::simple::N4BiasFieldCorrectionImageFilter::MemberFunctionType
Image(Self::*)(const Image *image, const Image *maskImage) MemberFunctionType
Definition: sitkN4BiasFieldCorrectionImageFilter.h:202
itk::simple::N4BiasFieldCorrectionImageFilter::SetNumberOfControlPoints
Self & SetNumberOfControlPoints(uint32_t value)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:145
itk::simple::N4BiasFieldCorrectionImageFilter::GetName
std::string GetName() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:187
itk::simple::N4BiasFieldCorrectionImageFilter::SetBiasFieldFullWidthAtHalfMaximum
Self & SetBiasFieldFullWidthAtHalfMaximum(double BiasFieldFullWidthAtHalfMaximum)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:112
itk::simple::N4BiasFieldCorrectionImageFilter::SetConvergenceThreshold
Self & SetConvergenceThreshold(double ConvergenceThreshold)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:92
itk::simple::N4BiasFieldCorrectionImageFilter::SetMaximumNumberOfIterations
Self & SetMaximumNumberOfIterations(std::vector< uint32_t > MaximumNumberOfIterations)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:102
itk::simple::N4BiasFieldCorrectionImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkN4BiasFieldCorrectionImageFilter.h:86
itk::simple::N4BiasFieldCorrectionImageFilter::SetMaskLabel
Self & SetMaskLabel(uint8_t MaskLabel)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:179
itk::simple::N4BiasFieldCorrection
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, 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.
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::N4BiasFieldCorrectionImageFilter::SetUseMaskLabel
Self & SetUseMaskLabel(bool UseMaskLabel)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:165
itk::simple::N4BiasFieldCorrectionImageFilter::GetUseMaskLabel
bool GetUseMaskLabel() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:174
itk::simple::N4BiasFieldCorrectionImageFilter::GetSplineOrder
uint32_t GetSplineOrder() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:160
itk::simple::N4BiasFieldCorrectionImageFilter::SetWienerFilterNoise
Self & SetWienerFilterNoise(double WienerFilterNoise)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:122
itk::simple::N4BiasFieldCorrectionImageFilter::GetMaskLabel
uint8_t GetMaskLabel() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:184
itk::simple::N4BiasFieldCorrectionImageFilter::GetConvergenceThreshold
double GetConvergenceThreshold() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:97
itk
itk::simple::N4BiasFieldCorrectionImageFilter::SetSplineOrder
Self & SetSplineOrder(uint32_t SplineOrder)
Definition: sitkN4BiasFieldCorrectionImageFilter.h:155
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::Image
Definition: sitkPixelIDTypes.h:26
itk::uint32_t
::uint32_t uint32_t
itk::simple::N4BiasFieldCorrectionImageFilter::UseMaskLabelOff
Self & UseMaskLabelOff()
Definition: sitkN4BiasFieldCorrectionImageFilter.h:169
itk::simple::N4BiasFieldCorrectionImageFilter::UseMaskLabelOn
Self & UseMaskLabelOn()
Definition: sitkN4BiasFieldCorrectionImageFilter.h:168
itk::simple::N4BiasFieldCorrectionImageFilter::GetBiasFieldFullWidthAtHalfMaximum
double GetBiasFieldFullWidthAtHalfMaximum() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:117
itk::simple::N4BiasFieldCorrectionImageFilter::GetWienerFilterNoise
double GetWienerFilterNoise() const
Definition: sitkN4BiasFieldCorrectionImageFilter.h:127