18 #ifndef itkPatchBasedDenoisingBaseImageFilter_h
19 #define itkPatchBasedDenoisingBaseImageFilter_h
93 template <
typename TInputImage,
typename TOutputImage>
112 itkStaticConstMacro(ImageDimension,
unsigned int,
113 InputImageType::ImageDimension);
124 typedef enum { NOMODEL = 0, GAUSSIAN = 1, RICIAN = 2, POISSON = 3 } NoiseModelType;
130 typedef enum { EUCLIDEAN = 0, RIEMANNIAN = 1 } ComponentSpaceType;
132 typedef enum { UNINITIALIZED = 0, INITIALIZED = 1 } FilterStateType;
143 typedef typename::itk::Statistics::ImageToNeighborhoodSampleAdaptor<
154 itkSetMacro(PatchRadius,
unsigned int);
155 itkGetConstMacro(PatchRadius,
unsigned int);
184 itkSetClampMacro(SmoothingWeight,
double, 0.0, 1.0);
185 itkGetConstMacro(SmoothingWeight,
double);
192 itkSetClampMacro(NoiseModelFidelityWeight,
double, 0.0, 1.0);
193 itkGetConstMacro(NoiseModelFidelityWeight,
double);
200 itkSetMacro(KernelBandwidthEstimation,
bool);
201 itkBooleanMacro(KernelBandwidthEstimation);
202 itkGetConstMacro(KernelBandwidthEstimation,
bool);
212 itkGetConstMacro(KernelBandwidthUpdateFrequency,
unsigned int);
220 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
224 itkGetConstReferenceMacro(ElapsedIterations,
unsigned int);
230 itkSetMacro(AlwaysTreatComponentsAsEuclidean,
bool);
231 itkBooleanMacro(AlwaysTreatComponentsAsEuclidean);
232 itkGetConstMacro(AlwaysTreatComponentsAsEuclidean,
bool);
236 virtual void SetStateToInitialized();
239 virtual void SetStateToUninitialized();
242 #if !defined(ITK_WRAPPING_PARSER)
250 itkSetMacro(ManualReinitialization,
bool);
251 itkGetConstReferenceMacro(ManualReinitialization,
bool);
252 itkBooleanMacro(ManualReinitialization);
259 virtual void PrintSelf(std::ostream& os,
Indent indent)
const ITK_OVERRIDE;
261 virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
263 virtual
void GenerateData() ITK_OVERRIDE;
265 virtual
void CopyInputToOutput() = 0;
268 virtual
void InitializePatchWeights();
270 virtual
void Initialize() { }
273 virtual void AllocateUpdateBuffer() = 0;
280 virtual void ComputeKernelBandwidthUpdate() = 0;
283 virtual void ComputeImageUpdate() = 0;
285 virtual void ApplyUpdate() = 0;
297 itkSetMacro(ElapsedIterations,
unsigned int);
315 template <
typename PixelT>
364 #ifndef ITK_MANUAL_INSTANTIATION
365 # include "itkPatchBasedDenoisingBaseImageFilter.hxx"
const InputImageType * m_InputImage
unsigned int m_KernelBandwidthUpdateFrequency
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
SmartPointer< const Self > ConstPointer
unsigned int m_PatchRadius
ImageToImageFilter< TInputImage, TOutputImage > Superclass
ConstNeighborhoodIterator< InputImageType, BoundaryConditionType > InputImagePatchIterator
Represent Red, Green, Blue and Alpha components for color images.
InputImageType::PixelType InputPixelType
Base class for patch-based denoising algorithms.
virtual void PreProcessInput()
ZeroFluxNeumannBoundaryCondition< OutputImageType > BoundaryConditionType
NoiseModelType m_NoiseModel
OutputImageType * m_OutputImage
SmartPointer< Self > Pointer
TInputImage InputImageType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
unsigned long SizeValueType
OutputPixelType PixelType
TOutputImage OutputImageType
typename::itk::Statistics::ImageToNeighborhoodSampleAdaptor< OutputImageType, BoundaryConditionType > ListAdaptorType
double m_NoiseModelFidelityWeight
unsigned int m_ElapsedIterations
PatchBasedDenoisingBaseImageFilter Self
virtual void InitializeIteration()
ComponentSpaceType DetermineComponentSpace(const RGBAPixel< PixelValueType > &)
bool m_KernelBandwidthEstimation
virtual bool ThreadedHalt(void *)
ComponentSpaceType m_ComponentSpace
unsigned int m_NumberOfIterations
Represent Red, Green and Blue components for color images.
virtual void PostProcessOutput()
ComponentSpaceType DetermineComponentSpace(const RGBPixel< PixelValueType > &)
bool m_AlwaysTreatComponentsAsEuclidean
ComponentSpaceType DetermineComponentSpace(const PixelT &)
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Array< float > PatchWeightsType
OutputImageType::PixelType OutputPixelType
PatchWeightsType m_PatchWeights
Define additional traits for native types such as int or float.
bool m_ManualReinitialization
Represent a diffusion tensor as used in DTI images.
NumericTraits< PixelType >::ValueType PixelValueType
ComponentSpaceType DetermineComponentSpace(const DiffusionTensor3D< PixelValueType > &)
ListAdaptorType::NeighborhoodRadiusType PatchRadiusType