Package org.itk.simple
Class PatchBasedDenoisingImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.PatchBasedDenoisingImageFilter
Derived class implementing a specific patch-based denoising algorithm,
as detailed below.
This class is derived from the base class PatchBasedDenoisingBaseImageFilter ; please refer to the documentation of the base class first. This
class implements a denoising filter that uses iterative non-local, or
semi-local, weighted averaging of image patches for image denoising.
The intensity at each pixel 'p' gets updated as a weighted average of
intensities of a chosen subset of pixels from the image.
This class implements the denoising algorithm using a Gaussian kernel
function for nonparametric density estimation. The class implements a
scheme to automatically estimated the kernel bandwidth parameter
(namely, sigma) using leave-one-out cross validation. It implements
schemes for random sampling of patches non-locally (from the entire
image) as well as semi-locally (from the spatial proximity of the
pixel being denoised at the specific point in time). It implements a
specific scheme for defining patch weights (mask) as described in
Awate and Whitaker 2005 IEEE CVPR and 2006 IEEE TPAMI.
See:
PatchBasedDenoisingBaseImageFilter
itk::PatchBasedDenoisingImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkPatchBasedDenoisingImageFilter.h
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::PatchBasedDenoisingImageFilter::PatchBasedDenoisingImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
PatchBasedDenoisingImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Self& itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOff()void
Self& itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOn() Set the value of AlwaysTreatComponentsAsEuclidean to true or false respectfully.void
delete()
virtual itk::simple::PatchBasedDenoisingImageFilter::~PatchBasedDenoisingImageFilter() DestructorImage itk::simple::PatchBasedDenoisingImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected void
finalize()
boolean
bool itk::simple::PatchBasedDenoisingImageFilter::GetAlwaysTreatComponentsAsEuclidean() const Set/Get flag indicating whether all components should always be treated as if they are in euclidean space regardless of pixel type.protected static long
boolean
bool itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthEstimation() const Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data.double
double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthFractionPixelsForEstimation() const Set/Get the fraction of the image to use for kernel bandwidth sigma estimation.double
double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthMultiplicationFactor() const Set/Get the kernel bandwidth sigma multiplication factor used to modify the automatically-estimated kernel bandwidth sigma.double
double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthSigma() const Set/Get initial kernel bandwidth estimate.long
uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthUpdateFrequency() const Set/Get the update frequency for the kernel bandwidth estimation.getName()
std::string itk::simple::PatchBasedDenoisingImageFilter::GetName() const Name of this classNoiseModelType itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModel() const Set/Get the noise model type.double
double itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModelFidelityWeight() const Set/Get the weight on the fidelity term (penalizes deviations from the noisy data).double
double itk::simple::PatchBasedDenoisingImageFilter::GetNoiseSigma() constlong
uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfIterations() const Set/Get the number of denoising iterations to perform.long
uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfSamplePatches() constlong
uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetPatchRadius() const Set/Get the patch radius specified in physical coordinates.double
double itk::simple::PatchBasedDenoisingImageFilter::GetSampleVariance() const Set/Get the variance of the domain where patches are sampled.void
Self& itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOff()void
Self& itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOn() Set the value of KernelBandwidthEstimation to true or false respectfully.void
setAlwaysTreatComponentsAsEuclidean
(boolean AlwaysTreatComponentsAsEuclidean) Self& itk::simple::PatchBasedDenoisingImageFilter::SetAlwaysTreatComponentsAsEuclidean(bool AlwaysTreatComponentsAsEuclidean) Set/Get flag indicating whether all components should always be treated as if they are in euclidean space regardless of pixel type.void
setKernelBandwidthEstimation
(boolean KernelBandwidthEstimation) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthEstimation(bool KernelBandwidthEstimation) Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data.void
setKernelBandwidthFractionPixelsForEstimation
(double KernelBandwidthFractionPixelsForEstimation) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthFractionPixelsForEstimation(double KernelBandwidthFractionPixelsForEstimation) Set/Get the fraction of the image to use for kernel bandwidth sigma estimation.void
setKernelBandwidthMultiplicationFactor
(double KernelBandwidthMultiplicationFactor) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthMultiplicationFactor(double KernelBandwidthMultiplicationFactor) Set/Get the kernel bandwidth sigma multiplication factor used to modify the automatically-estimated kernel bandwidth sigma.void
setKernelBandwidthSigma
(double KernelBandwidthSigma) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthSigma(double KernelBandwidthSigma) Set/Get initial kernel bandwidth estimate.void
setKernelBandwidthUpdateFrequency
(long KernelBandwidthUpdateFrequency) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthUpdateFrequency(uint32_t KernelBandwidthUpdateFrequency) Set/Get the update frequency for the kernel bandwidth estimation.void
Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModel(NoiseModelType NoiseModel) Set/Get the noise model type.void
setNoiseModelFidelityWeight
(double NoiseModelFidelityWeight) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModelFidelityWeight(double NoiseModelFidelityWeight) Set/Get the weight on the fidelity term (penalizes deviations from the noisy data).void
setNoiseSigma
(double NoiseSigma) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseSigma(double NoiseSigma) Set/Get the noise sigma.void
setNumberOfIterations
(long NumberOfIterations) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfIterations(uint32_t NumberOfIterations) Set/Get the number of denoising iterations to perform.void
setNumberOfSamplePatches
(long NumberOfSamplePatches) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfSamplePatches(uint32_t NumberOfSamplePatches) Set/Get the number of patches to sample for each pixel.void
setPatchRadius
(long PatchRadius) Self& itk::simple::PatchBasedDenoisingImageFilter::SetPatchRadius(uint32_t PatchRadius) Set/Get the patch radius specified in physical coordinates.void
setSampleVariance
(double SampleVariance) Self& itk::simple::PatchBasedDenoisingImageFilter::SetSampleVariance(double SampleVariance) Set/Get the variance of the domain where patches are sampled.protected static long
toString()
std::string itk::simple::PatchBasedDenoisingImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
-
Constructor Details
-
PatchBasedDenoisingImageFilter
protected PatchBasedDenoisingImageFilter(long cPtr, boolean cMemoryOwn) -
PatchBasedDenoisingImageFilter
public PatchBasedDenoisingImageFilter()itk::simple::PatchBasedDenoisingImageFilter::PatchBasedDenoisingImageFilter() Default Constructor that takes no arguments and initializes default parameters
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::PatchBasedDenoisingImageFilter::~PatchBasedDenoisingImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setKernelBandwidthSigma
public void setKernelBandwidthSigma(double KernelBandwidthSigma) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthSigma(double KernelBandwidthSigma) Set/Get initial kernel bandwidth estimate. To prevent the class from automatically modifying this estimate, set KernelBandwidthEstimation to false in the base class. -
getKernelBandwidthSigma
public double getKernelBandwidthSigma()double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthSigma() const Set/Get initial kernel bandwidth estimate. To prevent the class from automatically modifying this estimate, set KernelBandwidthEstimation to false in the base class. -
setPatchRadius
public void setPatchRadius(long PatchRadius) Self& itk::simple::PatchBasedDenoisingImageFilter::SetPatchRadius(uint32_t PatchRadius) Set/Get the patch radius specified in physical coordinates. Patch radius is preferably set to an even number. Currently, only isotropic patches in physical space are allowed; patches can be anisotropic in voxel space. -
getPatchRadius
public long getPatchRadius()uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetPatchRadius() const Set/Get the patch radius specified in physical coordinates. Patch radius is preferably set to an even number. Currently, only isotropic patches in physical space are allowed; patches can be anisotropic in voxel space. -
setNumberOfIterations
public void setNumberOfIterations(long NumberOfIterations) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfIterations(uint32_t NumberOfIterations) Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1. -
getNumberOfIterations
public long getNumberOfIterations()uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfIterations() const Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1. -
setNumberOfSamplePatches
public void setNumberOfSamplePatches(long NumberOfSamplePatches) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfSamplePatches(uint32_t NumberOfSamplePatches) Set/Get the number of patches to sample for each pixel. -
getNumberOfSamplePatches
public long getNumberOfSamplePatches()uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfSamplePatches() const -
setSampleVariance
public void setSampleVariance(double SampleVariance) Self& itk::simple::PatchBasedDenoisingImageFilter::SetSampleVariance(double SampleVariance) Set/Get the variance of the domain where patches are sampled. -
getSampleVariance
public double getSampleVariance()double itk::simple::PatchBasedDenoisingImageFilter::GetSampleVariance() const Set/Get the variance of the domain where patches are sampled. -
setNoiseModel
Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModel(NoiseModelType NoiseModel) Set/Get the noise model type. Defaults to GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive. -
getNoiseModel
NoiseModelType itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModel() const Set/Get the noise model type. Defaults to GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive. -
setNoiseSigma
public void setNoiseSigma(double NoiseSigma) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseSigma(double NoiseSigma) Set/Get the noise sigma. Used by the noise model where appropriate, defaults to 5% of the image intensity range -
getNoiseSigma
public double getNoiseSigma()double itk::simple::PatchBasedDenoisingImageFilter::GetNoiseSigma() const -
setNoiseModelFidelityWeight
public void setNoiseModelFidelityWeight(double NoiseModelFidelityWeight) Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModelFidelityWeight(double NoiseModelFidelityWeight) Set/Get the weight on the fidelity term (penalizes deviations from the noisy data). This option is used when a noise model is specified. This weight controls the balance between the smoothing and the closeness to the noisy data. -
getNoiseModelFidelityWeight
public double getNoiseModelFidelityWeight()double itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModelFidelityWeight() const Set/Get the weight on the fidelity term (penalizes deviations from the noisy data). This option is used when a noise model is specified. This weight controls the balance between the smoothing and the closeness to the noisy data. -
setAlwaysTreatComponentsAsEuclidean
public void setAlwaysTreatComponentsAsEuclidean(boolean AlwaysTreatComponentsAsEuclidean) Self& itk::simple::PatchBasedDenoisingImageFilter::SetAlwaysTreatComponentsAsEuclidean(bool AlwaysTreatComponentsAsEuclidean) Set/Get flag indicating whether all components should always be treated as if they are in euclidean space regardless of pixel type. Defaults to false. -
alwaysTreatComponentsAsEuclideanOn
public void alwaysTreatComponentsAsEuclideanOn()Self& itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOn() Set the value of AlwaysTreatComponentsAsEuclidean to true or false respectfully. -
alwaysTreatComponentsAsEuclideanOff
public void alwaysTreatComponentsAsEuclideanOff()Self& itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOff() -
getAlwaysTreatComponentsAsEuclidean
public boolean getAlwaysTreatComponentsAsEuclidean()bool itk::simple::PatchBasedDenoisingImageFilter::GetAlwaysTreatComponentsAsEuclidean() const Set/Get flag indicating whether all components should always be treated as if they are in euclidean space regardless of pixel type. Defaults to false. -
setKernelBandwidthEstimation
public void setKernelBandwidthEstimation(boolean KernelBandwidthEstimation) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthEstimation(bool KernelBandwidthEstimation) Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true. -
kernelBandwidthEstimationOn
public void kernelBandwidthEstimationOn()Self& itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOn() Set the value of KernelBandwidthEstimation to true or false respectfully. -
kernelBandwidthEstimationOff
public void kernelBandwidthEstimationOff()Self& itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOff() -
getKernelBandwidthEstimation
public boolean getKernelBandwidthEstimation()bool itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthEstimation() const Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true. -
setKernelBandwidthMultiplicationFactor
public void setKernelBandwidthMultiplicationFactor(double KernelBandwidthMultiplicationFactor) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthMultiplicationFactor(double KernelBandwidthMultiplicationFactor) Set/Get the kernel bandwidth sigma multiplication factor used to modify the automatically-estimated kernel bandwidth sigma. At times, it may be desirable to modify the value of the automatically-estimated sigma. Typically, this number isn't very far from 1. Note: This is used only when KernelBandwidthEstimation is True/On. -
getKernelBandwidthMultiplicationFactor
public double getKernelBandwidthMultiplicationFactor()double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthMultiplicationFactor() const Set/Get the kernel bandwidth sigma multiplication factor used to modify the automatically-estimated kernel bandwidth sigma. At times, it may be desirable to modify the value of the automatically-estimated sigma. Typically, this number isn't very far from 1. Note: This is used only when KernelBandwidthEstimation is True/On. -
setKernelBandwidthUpdateFrequency
public void setKernelBandwidthUpdateFrequency(long KernelBandwidthUpdateFrequency) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthUpdateFrequency(uint32_t KernelBandwidthUpdateFrequency) Set/Get the update frequency for the kernel bandwidth estimation. An optimal bandwidth will be re-estimated based on the denoised image after every 'n' iterations. Must be a positive integer. Defaults to 3, i.e. bandwidth updated after every 3 denoising iteration. -
getKernelBandwidthUpdateFrequency
public long getKernelBandwidthUpdateFrequency()uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthUpdateFrequency() const Set/Get the update frequency for the kernel bandwidth estimation. An optimal bandwidth will be re-estimated based on the denoised image after every 'n' iterations. Must be a positive integer. Defaults to 3, i.e. bandwidth updated after every 3 denoising iteration. -
setKernelBandwidthFractionPixelsForEstimation
public void setKernelBandwidthFractionPixelsForEstimation(double KernelBandwidthFractionPixelsForEstimation) Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthFractionPixelsForEstimation(double KernelBandwidthFractionPixelsForEstimation) Set/Get the fraction of the image to use for kernel bandwidth sigma estimation. To reduce the computational burden for computing sigma, a small random fraction of the image pixels can be used. -
getKernelBandwidthFractionPixelsForEstimation
public double getKernelBandwidthFractionPixelsForEstimation()double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthFractionPixelsForEstimation() const Set/Get the fraction of the image to use for kernel bandwidth sigma estimation. To reduce the computational burden for computing sigma, a small random fraction of the image pixels can be used. -
getName
std::string itk::simple::PatchBasedDenoisingImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::PatchBasedDenoisingImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::PatchBasedDenoisingImageFilter::Execute(const Image &image1) Execute the filter on the input image
-