18 #ifndef sitkN4BiasFieldCorrectionImageFilter_h
19 #define sitkN4BiasFieldCorrectionImageFilter_h
91 SITK_RETURN_SELF_TYPE_HEADER
SetConvergenceThreshold (
double ConvergenceThreshold ) { this->m_ConvergenceThreshold = ConvergenceThreshold;
return *
this; }
101 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumNumberOfIterations ( std::vector<uint32_t> MaximumNumberOfIterations ) { this->m_MaximumNumberOfIterations = MaximumNumberOfIterations;
return *
this; }
111 SITK_RETURN_SELF_TYPE_HEADER
SetBiasFieldFullWidthAtHalfMaximum (
double BiasFieldFullWidthAtHalfMaximum ) { this->m_BiasFieldFullWidthAtHalfMaximum = BiasFieldFullWidthAtHalfMaximum;
return *
this; }
121 SITK_RETURN_SELF_TYPE_HEADER
SetWienerFilterNoise (
double WienerFilterNoise ) { this->m_WienerFilterNoise = WienerFilterNoise;
return *
this; }
131 SITK_RETURN_SELF_TYPE_HEADER
SetNumberOfHistogramBins ( uint32_t NumberOfHistogramBins ) { this->m_NumberOfHistogramBins = NumberOfHistogramBins;
return *
this; }
141 SITK_RETURN_SELF_TYPE_HEADER
SetNumberOfControlPoints ( std::vector<uint32_t> NumberOfControlPoints ) { this->m_NumberOfControlPoints = std::move(NumberOfControlPoints);
return *
this; }
144 SITK_RETURN_SELF_TYPE_HEADER
SetNumberOfControlPoints( uint32_t value ) { this->m_NumberOfControlPoints = std::vector<uint32_t>(3, value);
return *
this; }
154 SITK_RETURN_SELF_TYPE_HEADER
SetSplineOrder ( uint32_t SplineOrder ) { this->m_SplineOrder = SplineOrder;
return *
this; }
164 SITK_RETURN_SELF_TYPE_HEADER
SetUseMaskLabel (
bool UseMaskLabel ) { this->m_UseMaskLabel = UseMaskLabel;
return *
this; }
167 SITK_RETURN_SELF_TYPE_HEADER
UseMaskLabelOn() {
return this->SetUseMaskLabel(
true); }
168 SITK_RETURN_SELF_TYPE_HEADER
UseMaskLabelOff() {
return this->SetUseMaskLabel(
false); }
178 SITK_RETURN_SELF_TYPE_HEADER
SetMaskLabel ( uint8_t MaskLabel ) { this->m_MaskLabel = MaskLabel;
return *
this; }
223 std::string
GetName()
const {
return std::string (
"N4BiasFieldCorrectionImageFilter"); }
226 std::string ToString()
const;
239 template <
class TImageType>
Image ExecuteInternal (
const Image * image,
const Image * maskImage );
248 double m_ConvergenceThreshold{0.001};
251 std::vector<uint32_t> m_MaximumNumberOfIterations{std::vector<uint32_t>(4,50)};
254 double m_BiasFieldFullWidthAtHalfMaximum{0.15};
257 double m_WienerFilterNoise{0.01};
260 uint32_t m_NumberOfHistogramBins{200u};
263 std::vector<uint32_t> m_NumberOfControlPoints{std::vector<uint32_t>(3, 4)};
266 uint32_t m_SplineOrder{3u};
268 bool m_UseMaskLabel{
true};
270 uint8_t m_MaskLabel{1};
296 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 );
297 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 );