18 #ifndef itkPatchBasedDenoisingBaseImageFilter_h
19 #define itkPatchBasedDenoisingBaseImageFilter_h
31 #include "ITKDenoisingExport.h"
77 extern ITKDenoising_EXPORT std::ostream &
79 extern ITKDenoising_EXPORT std::ostream &
82 extern ITKDenoising_EXPORT std::ostream &
144 template <
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;
204 typename ::itk::Statistics::ImageToNeighborhoodSampleAdaptor<OutputImageType, BoundaryConditionType>;
213 itkSetMacro(PatchRadius,
unsigned int);
214 itkGetConstMacro(PatchRadius,
unsigned int);
218 GetPatchRadiusInVoxels()
const;
221 GetPatchDiameterInVoxels()
const;
224 GetPatchLengthInVoxels()
const;
234 GetPatchWeights()
const;
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);
303 SetStateToInitialized();
307 SetStateToUninitialized();
310 #if !defined(ITK_WRAPPING_PARSER)
320 itkSetMacro(ManualReinitialization,
bool);
321 itkGetConstReferenceMacro(ManualReinitialization,
bool);
322 itkBooleanMacro(ManualReinitialization);
330 PrintSelf(std::ostream & os,
Indent indent)
const override;
333 GenerateInputRequestedRegion()
override;
336 GenerateData()
override;
339 CopyInputToOutput() = 0;
343 InitializePatchWeights();
351 AllocateUpdateBuffer() = 0;
363 ComputeKernelBandwidthUpdate() = 0;
367 ComputeImageUpdate() = 0;
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;
415 itkSetEnumMacro(ComponentSpace, ComponentSpaceEnum);
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"