18 #ifndef itkWienerDeconvolutionImageFilter_h
19 #define itkWienerDeconvolutionImageFilter_h
74 template<
typename TInputImage,
typename TKernelImage = TInputImage,
typename TOutputImage = TInputImage,
typename TInternalPrecision=
double >
96 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
124 itkSetMacro(NoiseVariance,
double);
125 itkGetConstMacro(NoiseVariance,
double);
133 void GenerateData()
override;
135 void PrintSelf( std::ostream & os,
Indent indent )
const override;
143 template<
typename TPixel >
156 return !(*
this != other);
158 inline TPixel
operator()(
const TPixel & I,
const TPixel & H)
const
160 TPixel Pn = m_NoisePowerSpectralDensityConstant;
165 TPixel Pf = std::norm( I );
167 TPixel denominator = std::norm( H ) + ( Pn / (Pf - Pn) );
169 if ( std::abs( denominator ) >= m_KernelZeroMagnitudeThreshold )
171 value = I * ( std::conj( H ) / denominator );
181 m_NoisePowerSpectralDensityConstant = constant;
185 return m_NoisePowerSpectralDensityConstant;
193 m_KernelZeroMagnitudeThreshold = mu;
197 return m_KernelZeroMagnitudeThreshold;
209 #ifndef ITK_MANUAL_INSTANTIATION
210 #include "itkWienerDeconvolutionImageFilter.hxx"
double m_KernelZeroMagnitudeThreshold
TPixel operator()(const TPixel &I, const TPixel &H) const
typename InternalImageType::Pointer InternalImagePointerType
typename InputImageType::PixelType InputPixelType
typename KernelImageType::SizeType KernelSizeType
typename OutputImageType::IndexType OutputIndexType
Define numeric traits for std::vector.
typename InputSizeType::SizeValueType SizeValueType
typename OutputImageType::PixelType OutputPixelType
unsigned long SizeValueType
typename KernelImageType::PixelType KernelPixelType
double GetNoisePowerSpectralDensityConstant() const
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The Wiener deconvolution image filter is designed to restore an image convolved with a blurring kerne...
Base class for all process objects that output image data.
double m_NoisePowerSpectralDensityConstant
typename InputImageType::RegionType InputRegionType
TInputImage InputImageType
WienerDeconvolutionFunctor()
void SetNoisePowerSpectralDensityConstant(double constant)
TKernelImage KernelImageType
typename InternalComplexImageType::Pointer InternalComplexImagePointerType
bool operator!=(const WienerDeconvolutionFunctor &) const
std::complex< TInternalPrecision > InternalComplexType
TOutputImage OutputImageType
bool operator==(const WienerDeconvolutionFunctor &other) const
typename InputImageType::SizeType InputSizeType
typename InputImageType::IndexType InputIndexType
double GetKernelZeroMagnitudeThreshold() const
typename KernelImageType::RegionType KernelRegionType
typename OutputImageType::RegionType OutputRegionType
Control indentation during Print() invocation.
typename OutputImageType::SizeType OutputSizeType
typename KernelImageType::IndexType KernelIndexType
The direct linear inverse deconvolution filter.
Templated n-dimensional image class.
void SetKernelZeroMagnitudeThreshold(double mu)