18 #ifndef itkN4BiasFieldCorrectionImageFilter_h
19 #define itkN4BiasFieldCorrectionImageFilter_h
28 #include "vnl/vnl_vector.h"
90 template<
typename TInputImage,
typename TMaskImage =
91 Image<unsigned char, TInputImage::ImageDimension>,
92 class TOutputImage = TInputImage>
111 TInputImage::ImageDimension );
151 this->
SetNthInput( 1, const_cast<MaskImageType *>( mask ) );
178 this->
SetNthInput( 2, const_cast<RealImageType *>( image ) );
221 itkSetMacro( NumberOfHistogramBins,
unsigned int );
227 itkGetConstMacro( NumberOfHistogramBins,
unsigned int );
232 itkSetMacro( WienerFilterNoise,
RealType );
237 itkGetConstMacro( WienerFilterNoise,
RealType );
243 itkSetMacro( BiasFieldFullWidthAtHalfMaximum,
RealType );
249 itkGetConstMacro( BiasFieldFullWidthAtHalfMaximum,
RealType );
256 itkSetMacro( SplineOrder,
unsigned int );
261 itkGetConstMacro( SplineOrder,
unsigned int );
270 itkSetMacro( NumberOfControlPoints,
ArrayType );
279 itkGetConstMacro( NumberOfControlPoints,
ArrayType );
287 itkSetMacro( NumberOfFittingLevels,
ArrayType );
309 itkGetConstMacro( NumberOfFittingLevels,
ArrayType );
330 itkSetMacro( ConvergenceThreshold,
RealType );
339 itkGetConstMacro( ConvergenceThreshold,
RealType );
350 itkGetConstMacro( LogBiasFieldControlPointLattice,
357 itkGetConstMacro( ElapsedIterations,
unsigned int );
363 itkGetConstMacro( CurrentConvergenceMeasurement,
RealType );
369 itkGetConstMacro( CurrentLevel,
unsigned int );
381 void operator=( const Self& );
446 #ifndef ITK_MANUAL_INSTANTIATION
447 #include "itkN4BiasFieldCorrectionImageFilter.hxx"
void PrintSelf(std::ostream &os, Indent indent) const override
PointSet< ScalarType, itkGetStaticConstMacro(ImageDimension)> PointSetType
Vector< RealType, 1 > ScalarType
SmartPointer< Self > Pointer
void SetInput1(const InputImageType *image)
PointSetType::Pointer PointSetPointer
SmartPointer< Self > Pointer
void SetInput2(const MaskImageType *mask)
RealType m_ConvergenceThreshold
SmartPointer< const Self > ConstPointer
Image< ScalarType, itkGetStaticConstMacro(ImageDimension)> ScalarImageType
RealType m_BiasFieldFullWidthAtHalfMaximum
const RealImageType * GetConfidenceImage() const
Base class for all process objects that output image data.
ArrayType m_NumberOfFittingLevels
void SetInput3(const RealImageType *image)
PointSetType::PointType PointType
Image< RealType, ImageDimension > RealImageType
void Fill(const ValueType &)
N4BiasFieldCorrectionImageFilter Self
RealImagePointer SharpenImage(const RealImageType *) const
ImageToImageFilter< TInputImage, TOutputImage > Superclass
RealImagePointer UpdateBiasFieldEstimate(RealImageType *)
const MaskImageType * GetMaskImage() const
virtual void SetInput(const InputImageType *image)
ArrayType m_NumberOfControlPoints
A templated class holding a n-Dimensional vector.
TInputImage InputImageType
BSplineScatteredDataPointSetToImageFilter< PointSetType, ScalarImageType > BSplineFilterType
BSplineFilterType::ArrayType ArrayType
~N4BiasFieldCorrectionImageFilter()
VariableSizeArrayType m_MaximumNumberOfIterations
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
TInputImage InputImageType
virtual void SetNumberOfFittingLevels(ArrayType _arg)
MeshTraits::PointType PointType
Image filter which provides a B-spline output approximation.
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
void SetMaskImage(const MaskImageType *mask)
TOutputImage OutputImageType
RealType m_CurrentConvergenceMeasurement
BSplineFilterType::PointDataImageType BiasFieldControlPointLatticeType
MaskImageType::PixelType MaskPixelType
void SetNumberOfFittingLevels(unsigned int n)
static const unsigned int ImageDimension
unsigned int m_ElapsedIterations
RealImagePointer ReconstructBiasField(BiasFieldControlPointLatticeType *)
RealImageType::Pointer RealImagePointer
N4BiasFieldCorrectionImageFilter()
void GenerateData() override
Base class for filters that take an image as input and produce an image as output.
RealType CalculateConvergenceMeasurement(const RealImageType *, const RealImageType *) const
Control indentation during Print() invocation.
RealType m_WienerFilterNoise
unsigned int m_NumberOfHistogramBins
unsigned int m_SplineOrder
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
void SetConfidenceImage(const RealImageType *image)
BiasFieldControlPointLatticeType::Pointer m_LogBiasFieldControlPointLattice
unsigned int m_CurrentLevel
MaskPixelType m_MaskLabel
Implementation of the N4 bias field correction algorithm.
Templated n-dimensional image class.
Array< unsigned int > VariableSizeArrayType