18#ifndef itkPatchBasedDenoisingBaseImageFilter_h
19#define itkPatchBasedDenoisingBaseImageFilter_h
31#include "ITKDenoisingExport.h"
77extern ITKDenoising_EXPORT std::ostream &
79extern ITKDenoising_EXPORT std::ostream &
82extern ITKDenoising_EXPORT std::ostream &
144template <
typename TInputImage,
typename TOutputImage>
164 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
177#if !defined(ITK_LEGACY_REMOVE)
182 static constexpr NoiseModelEnum NOMODEL = NoiseModelEnum::NOMODEL;
183 static constexpr NoiseModelEnum GAUSSIAN = NoiseModelEnum::GAUSSIAN;
185 static constexpr NoiseModelEnum POISSON = NoiseModelEnum::POISSON;
213 itkSetMacro(PatchRadius,
unsigned int);
214 itkGetConstMacro(PatchRadius,
unsigned int);
249 itkSetClampMacro(SmoothingWeight,
double, 0.0, 1.0);
250 itkGetConstMacro(SmoothingWeight,
double);
258 itkSetClampMacro(NoiseModelFidelityWeight,
double, 0.0, 1.0);
259 itkGetConstMacro(NoiseModelFidelityWeight,
double);
266 itkSetMacro(KernelBandwidthEstimation,
bool);
267 itkBooleanMacro(KernelBandwidthEstimation);
268 itkGetConstMacro(KernelBandwidthEstimation,
bool);
278 itkGetConstMacro(KernelBandwidthUpdateFrequency,
unsigned int);
286 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
290 itkGetConstReferenceMacro(ElapsedIterations,
unsigned int);
296 itkSetMacro(AlwaysTreatComponentsAsEuclidean,
bool);
297 itkBooleanMacro(AlwaysTreatComponentsAsEuclidean);
298 itkGetConstMacro(AlwaysTreatComponentsAsEuclidean,
bool);
310#if !defined(ITK_WRAPPING_PARSER)
320 itkSetMacro(ManualReinitialization,
bool);
321 itkGetConstReferenceMacro(ManualReinitialization,
bool);
322 itkBooleanMacro(ManualReinitialization);
386 itkSetMacro(ElapsedIterations,
unsigned int);
392 return ComponentSpaceEnum::EUCLIDEAN;
398 return ComponentSpaceEnum::EUCLIDEAN;
404 return ComponentSpaceEnum::RIEMANNIAN;
407 template <
typename PixelT>
411 return ComponentSpaceEnum::EUCLIDEAN;
426 unsigned int m_PatchRadius{ 4 };
430 bool m_KernelBandwidthEstimation{
false };
431 unsigned int m_KernelBandwidthUpdateFrequency{ 3 };
435 unsigned int m_NumberOfIterations{ 1 };
436 unsigned int m_ElapsedIterations{ 0 };
440 double m_SmoothingWeight{ 1.0 };
441 double m_NoiseModelFidelityWeight{ 0.0 };
445 bool m_AlwaysTreatComponentsAsEuclidean{
false };
448 bool m_ManualReinitialization{
false };
454#ifndef ITK_MANUAL_INSTANTIATION
455# include "itkPatchBasedDenoisingBaseImageFilter.hxx"
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Represent a diffusion tensor as used in DTI images.
Base class for all process objects that output image data.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Define additional traits for native types such as int or float.
Contains all enum classes used by the PatchBasedDenoisingBaseImageFilter class.
Base class for patch-based denoising algorithms.
virtual void PostProcessOutput()
ComponentSpaceEnum DetermineComponentSpace(const PixelT &)
typename NumericTraits< PixelType >::ValueType PixelValueType
typename InputImageType::PixelType InputPixelType
virtual void CopyInputToOutput()=0
void PrintSelf(std::ostream &os, Indent indent) const override
PatchWeightsType GetPatchWeights() const
typename OutputImageType::PixelType OutputPixelType
virtual void InitializeIteration()
virtual void ComputeKernelBandwidthUpdate()=0
virtual void PreProcessInput()
ComponentSpaceEnum DetermineComponentSpace(const RGBPixel< PixelValueType > &)
typename ListAdaptorType::NeighborhoodRadiusType PatchRadiusType
typename itk::Statistics::ImageToNeighborhoodSampleAdaptor< OutputImageType, BoundaryConditionType > ListAdaptorType
void GenerateData() override
void GenerateInputRequestedRegion() override
~PatchBasedDenoisingBaseImageFilter() override=default
PatchRadiusType GetPatchDiameterInVoxels() const
virtual bool ThreadedHalt(void *)
TOutputImage OutputImageType
PatchBasedDenoisingBaseImageFilter()
ComponentSpaceEnum DetermineComponentSpace(const RGBAPixel< PixelValueType > &)
PatchRadiusType::SizeValueType GetPatchLengthInVoxels() const
virtual void InitializePatchWeights()
virtual void SetStateToUninitialized()
virtual void ApplyUpdate()=0
void SetPatchWeights(const PatchWeightsType &weights)
ComponentSpaceEnum DetermineComponentSpace(const DiffusionTensor3D< PixelValueType > &)
virtual void ComputeImageUpdate()=0
virtual void Initialize()
virtual void SetStateToInitialized()
PatchRadiusType GetPatchRadiusInVoxels() const
TInputImage InputImageType
virtual void AllocateUpdateBuffer()=0
OutputPixelType PixelType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Represent Red, Green, Blue and Alpha components for color images.
Represent Red, Green and Blue components for color images.
This class provides ListSample interface to ITK Image.
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
unsigned long SizeValueType