18#ifndef itkN4BiasFieldCorrectionImageFilter_h
19#define itkN4BiasFieldCorrectionImageFilter_h
28#include "vnl/vnl_vector.h"
93template <
typename TInputImage,
94 typename TMaskImage = Image<unsigned char, TInputImage::ImageDimension>,
95 class TOutputImage = TInputImage>
114 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
149 this->SetInput(image);
161 this->SetMaskImage(mask);
187 itkSetMacro(UseMaskLabel,
bool);
188 itkGetConstMacro(UseMaskLabel,
bool);
189 itkBooleanMacro(UseMaskLabel);
206 this->SetConfidenceImage(image);
231 itkSetMacro(NumberOfHistogramBins,
unsigned int);
237 itkGetConstMacro(NumberOfHistogramBins,
unsigned int);
253 itkSetMacro(BiasFieldFullWidthAtHalfMaximum,
RealType);
259 itkGetConstMacro(BiasFieldFullWidthAtHalfMaximum,
RealType);
266 itkSetMacro(SplineOrder,
unsigned int);
271 itkGetConstMacro(SplineOrder,
unsigned int);
308 auto nlevels = MakeFilled<ArrayType>(n);
309 this->SetNumberOfFittingLevels(nlevels);
366 itkGetConstMacro(ElapsedIterations,
unsigned int);
372 itkGetConstMacro(CurrentConvergenceMeasurement,
RealType);
378 itkGetConstMacro(CurrentLevel,
unsigned int);
428 bool m_UseMaskLabel{
false };
432 unsigned int m_NumberOfHistogramBins{ 200 };
439 unsigned int m_ElapsedIterations{ 0 };
442 unsigned int m_CurrentLevel{ 0 };
448 unsigned int m_SplineOrder{ 3 };
455#ifndef ITK_MANUAL_INSTANTIATION
456# include "itkN4BiasFieldCorrectionImageFilter.hxx"
Image filter which provides a B-spline output approximation.
Base class for all data objects in ITK.
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Implementation of the N4 bias field correction algorithm.
itkGetInputMacro(ConfidenceImage, RealImageType)
TOutputImage OutputImageType
void SharpenImage(const RealImageType *unsharpenedImage, RealImageType *sharpenedImage) const
itkGetInputMacro(MaskImage, MaskImageType)
void SetInput3(const RealImageType *image)
void SetNumberOfFittingLevels(unsigned int n)
TInputImage InputImageType
itkSetInputMacro(MaskImage, MaskImageType)
typename PointSetType::PointType PointType
void PrintSelf(std::ostream &os, Indent indent) const override
void SetInput1(const InputImageType *image)
N4BiasFieldCorrectionImageFilter()
itkSetInputMacro(ConfidenceImage, RealImageType)
void EnlargeOutputRequestedRegion(DataObject *) override
RealImagePointer UpdateBiasFieldEstimate(RealImageType *, vcl_size_t)
void SetInput2(const MaskImageType *mask)
typename BSplineFilterType::PointDataImageType BiasFieldControlPointLatticeType
typename PointSetType::Pointer PointSetPointer
typename RealImageType::Pointer RealImagePointer
RealImagePointer ReconstructBiasField(const BiasFieldControlPointLatticeType *)
typename MaskImageType::PixelType MaskPixelType
typename BSplineFilterType::ArrayType ArrayType
~N4BiasFieldCorrectionImageFilter() override=default
RealType CalculateConvergenceMeasurement(const RealImageType *, const RealImageType *) const
void GenerateData() override
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
A templated class holding a n-Dimensional vector.
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....