18 #ifndef itkPatchBasedDenoisingBaseImageFilter_h
19 #define itkPatchBasedDenoisingBaseImageFilter_h
93 template <
typename TInputImage,
typename TOutputImage>
114 static constexpr
unsigned int ImageDimension = InputImageType::ImageDimension;
125 typedef enum { NOMODEL = 0, GAUSSIAN = 1, RICIAN = 2, POISSON = 3 } NoiseModelType;
131 typedef enum { EUCLIDEAN = 0, RIEMANNIAN = 1 } ComponentSpaceType;
134 typedef enum { UNINITIALIZED = 0, INITIALIZED = 1 } FilterStateType;
145 using ListAdaptorType = typename::itk::Statistics::ImageToNeighborhoodSampleAdaptor<
156 itkSetMacro(PatchRadius,
unsigned int);
157 itkGetConstMacro(PatchRadius,
unsigned int);
187 itkSetClampMacro(SmoothingWeight,
double, 0.0, 1.0);
188 itkGetConstMacro(SmoothingWeight,
double);
196 itkSetClampMacro(NoiseModelFidelityWeight,
double, 0.0, 1.0);
197 itkGetConstMacro(NoiseModelFidelityWeight,
double);
204 itkSetMacro(KernelBandwidthEstimation,
bool);
205 itkBooleanMacro(KernelBandwidthEstimation);
206 itkGetConstMacro(KernelBandwidthEstimation,
bool);
216 itkGetConstMacro(KernelBandwidthUpdateFrequency,
unsigned int);
224 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
228 itkGetConstReferenceMacro(ElapsedIterations,
unsigned int);
234 itkSetMacro(AlwaysTreatComponentsAsEuclidean,
bool);
235 itkBooleanMacro(AlwaysTreatComponentsAsEuclidean);
236 itkGetConstMacro(AlwaysTreatComponentsAsEuclidean,
bool);
240 virtual void SetStateToInitialized();
243 virtual void SetStateToUninitialized();
246 #if !defined(ITK_WRAPPING_PARSER)
256 itkSetMacro(ManualReinitialization,
bool);
257 itkGetConstReferenceMacro(ManualReinitialization,
bool);
258 itkBooleanMacro(ManualReinitialization);
265 void PrintSelf(std::ostream& os,
Indent indent)
const override;
267 void GenerateInputRequestedRegion()
override;
269 void GenerateData()
override;
271 virtual void CopyInputToOutput() = 0;
274 virtual void InitializePatchWeights();
279 virtual void AllocateUpdateBuffer() = 0;
286 virtual void ComputeKernelBandwidthUpdate() = 0;
289 virtual void ComputeImageUpdate() = 0;
291 virtual void ApplyUpdate() = 0;
303 itkSetMacro(ElapsedIterations,
unsigned int);
321 template <
typename PixelT>
328 itkSetMacro(ComponentSpace, ComponentSpaceType);
339 unsigned int m_PatchRadius{ 4 };
343 bool m_KernelBandwidthEstimation{
false };
344 unsigned int m_KernelBandwidthUpdateFrequency{ 3 };
348 unsigned int m_NumberOfIterations{ 1 };
349 unsigned int m_ElapsedIterations{ 0 };
353 double m_SmoothingWeight{ 1.0 };
354 double m_NoiseModelFidelityWeight{ 0.0 };
358 bool m_AlwaysTreatComponentsAsEuclidean{
false };
361 bool m_ManualReinitialization{
false };
367 #ifndef ITK_MANUAL_INSTANTIATION
368 #include "itkPatchBasedDenoisingBaseImageFilter.hxx"
const InputImageType * m_InputImage
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
TInputImage InputImageType
Define numeric traits for std::vector.
Represent Red, Green, Blue and Alpha components for color images.
OutputPixelType PixelType
Base class for patch-based denoising algorithms.
unsigned long SizeValueType
virtual void PreProcessInput()
NoiseModelType m_NoiseModel
OutputImageType * m_OutputImage
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename::itk::Statistics::ImageToNeighborhoodSampleAdaptor< OutputImageType, BoundaryConditionType > ListAdaptorType
typename NumericTraits< PixelType >::ValueType PixelValueType
TOutputImage OutputImageType
virtual void InitializeIteration()
ComponentSpaceType DetermineComponentSpace(const RGBAPixel< PixelValueType > &)
virtual bool ThreadedHalt(void *)
ComponentSpaceType m_ComponentSpace
Represent Red, Green and Blue components for color images.
virtual void PostProcessOutput()
ComponentSpaceType DetermineComponentSpace(const RGBPixel< PixelValueType > &)
ComponentSpaceType DetermineComponentSpace(const PixelT &)
Base class for filters that take an image as input and produce an image as output.
typename OutputImageType::PixelType OutputPixelType
Control indentation during Print() invocation.
typename InputImageType::PixelType InputPixelType
PatchWeightsType m_PatchWeights
typename ListAdaptorType::NeighborhoodRadiusType PatchRadiusType
virtual void Initialize()
Represent a diffusion tensor as used in DTI images.
ComponentSpaceType DetermineComponentSpace(const DiffusionTensor3D< PixelValueType > &)