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;
133 typedef enum { UNINITIALIZED = 0, INITIALIZED = 1 } FilterStateType;
144 typedef typename::itk::Statistics::ImageToNeighborhoodSampleAdaptor<
155 itkSetMacro(PatchRadius,
unsigned int);
156 itkGetConstMacro(PatchRadius,
unsigned int);
186 itkSetClampMacro(SmoothingWeight,
double, 0.0, 1.0);
187 itkGetConstMacro(SmoothingWeight,
double);
195 itkSetClampMacro(NoiseModelFidelityWeight,
double, 0.0, 1.0);
196 itkGetConstMacro(NoiseModelFidelityWeight,
double);
203 itkSetMacro(KernelBandwidthEstimation,
bool);
204 itkBooleanMacro(KernelBandwidthEstimation);
205 itkGetConstMacro(KernelBandwidthEstimation,
bool);
215 itkGetConstMacro(KernelBandwidthUpdateFrequency,
unsigned int);
223 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
227 itkGetConstReferenceMacro(ElapsedIterations,
unsigned int);
233 itkSetMacro(AlwaysTreatComponentsAsEuclidean,
bool);
234 itkBooleanMacro(AlwaysTreatComponentsAsEuclidean);
235 itkGetConstMacro(AlwaysTreatComponentsAsEuclidean,
bool);
239 virtual void SetStateToInitialized();
242 virtual void SetStateToUninitialized();
245 #if !defined(ITK_WRAPPING_PARSER)
255 itkSetMacro(ManualReinitialization,
bool);
256 itkGetConstReferenceMacro(ManualReinitialization,
bool);
257 itkBooleanMacro(ManualReinitialization);
264 virtual
void PrintSelf(std::ostream& os,
Indent indent) const ITK_OVERRIDE;
266 virtual
void GenerateInputRequestedRegion() ITK_OVERRIDE;
268 virtual
void GenerateData() ITK_OVERRIDE;
270 virtual
void CopyInputToOutput() = 0;
273 virtual
void InitializePatchWeights();
275 virtual
void Initialize() { }
278 virtual void AllocateUpdateBuffer() = 0;
285 virtual void ComputeKernelBandwidthUpdate() = 0;
288 virtual void ComputeImageUpdate() = 0;
290 virtual void ApplyUpdate() = 0;
302 itkSetMacro(ElapsedIterations,
unsigned int);
320 template <
typename PixelT>
327 itkSetMacro(ComponentSpace, ComponentSpaceType);
368 #ifndef ITK_MANUAL_INSTANTIATION
369 #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