SimpleITK  1.3.0.dev466
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::PatchBasedDenoisingImageFilter Class Reference

Derived class implementing a specific patch-based denoising algorithm, as detailed below. More...

#include <sitkPatchBasedDenoisingImageFilter.h>

+ Inheritance diagram for itk::simple::PatchBasedDenoisingImageFilter:
+ Collaboration diagram for itk::simple::PatchBasedDenoisingImageFilter:

Public Types

enum  NoiseModelType {
  NOMODEL,
  GAUSSIAN,
  RICIAN,
  POISSON
}
 
typedef BasicPixelIDTypeList PixelIDTypeList
 
typedef PatchBasedDenoisingImageFilter Self
 
- Public Types inherited from itk::simple::ImageFilter< 1 >
typedef ImageFilter Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

SelfAlwaysTreatComponentsAsEuclideanOff ()
 
SelfAlwaysTreatComponentsAsEuclideanOn ()
 
Image Execute (const Image &image1)
 
Image Execute (const Image &image1, double kernelBandwidthSigma, uint32_t patchRadius, uint32_t numberOfIterations, uint32_t numberOfSamplePatches, double sampleVariance, PatchBasedDenoisingImageFilter::NoiseModelType noiseModel, double noiseSigma, double noiseModelFidelityWeight, bool alwaysTreatComponentsAsEuclidean, bool kernelBandwidthEstimation, double kernelBandwidthMultiplicationFactor, uint32_t kernelBandwidthUpdateFrequency, double kernelBandwidthFractionPixelsForEstimation)
 
bool GetAlwaysTreatComponentsAsEuclidean () const
 
bool GetKernelBandwidthEstimation () const
 
double GetKernelBandwidthFractionPixelsForEstimation () const
 
double GetKernelBandwidthMultiplicationFactor () const
 
double GetKernelBandwidthSigma () const
 
uint32_t GetKernelBandwidthUpdateFrequency () const
 
std::string GetName () const
 
NoiseModelType GetNoiseModel () const
 
double GetNoiseModelFidelityWeight () const
 
double GetNoiseSigma () const
 
uint32_t GetNumberOfIterations () const
 
uint32_t GetNumberOfSamplePatches () const
 
uint32_t GetPatchRadius () const
 
double GetSampleVariance () const
 
SelfKernelBandwidthEstimationOff ()
 
SelfKernelBandwidthEstimationOn ()
 
 PatchBasedDenoisingImageFilter ()
 
SelfSetAlwaysTreatComponentsAsEuclidean (bool AlwaysTreatComponentsAsEuclidean)
 
SelfSetKernelBandwidthEstimation (bool KernelBandwidthEstimation)
 
SelfSetKernelBandwidthFractionPixelsForEstimation (double KernelBandwidthFractionPixelsForEstimation)
 
SelfSetKernelBandwidthMultiplicationFactor (double KernelBandwidthMultiplicationFactor)
 
SelfSetKernelBandwidthSigma (double KernelBandwidthSigma)
 
SelfSetKernelBandwidthUpdateFrequency (uint32_t KernelBandwidthUpdateFrequency)
 
SelfSetNoiseModel (NoiseModelType NoiseModel)
 
SelfSetNoiseModelFidelityWeight (double NoiseModelFidelityWeight)
 
SelfSetNoiseSigma (double NoiseSigma)
 
SelfSetNumberOfIterations (uint32_t NumberOfIterations)
 
SelfSetNumberOfSamplePatches (uint32_t NumberOfSamplePatches)
 
SelfSetPatchRadius (uint32_t PatchRadius)
 
SelfSetSampleVariance (double SampleVariance)
 
std::string ToString () const
 
virtual ~PatchBasedDenoisingImageFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter< 1 >
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Private Types

typedef Image(Self::* MemberFunctionType) (const Image &image1)
 

Private Member Functions

template<class TImageType >
Image ExecuteInternal (const Image &image1)
 

Private Attributes

bool m_AlwaysTreatComponentsAsEuclidean
 
bool m_KernelBandwidthEstimation
 
double m_KernelBandwidthFractionPixelsForEstimation
 
double m_KernelBandwidthMultiplicationFactor
 
double m_KernelBandwidthSigma
 
uint32_t m_KernelBandwidthUpdateFrequency
 
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
NoiseModelType m_NoiseModel
 
double m_NoiseModelFidelityWeight
 
double m_NoiseSigma
 
uint32_t m_NumberOfIterations
 
uint32_t m_NumberOfSamplePatches
 
uint32_t m_PatchRadius
 
double m_SampleVariance
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter< 1 >
static void FixNonZeroIndex (TImageType *img)
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

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 also
PatchBasedDenoisingBaseImageFilter
itk::PatchBasedDenoisingImageFilter for the Doxygen on the original ITK class.

Definition at line 46 of file sitkPatchBasedDenoisingImageFilter.h.

Member Typedef Documentation

typedef Image(Self::* itk::simple::PatchBasedDenoisingImageFilter::MemberFunctionType) (const Image &image1)
private

Setup for member function dispatching

Definition at line 234 of file sitkPatchBasedDenoisingImageFilter.h.

Define the pixels types supported by this filter

Definition at line 58 of file sitkPatchBasedDenoisingImageFilter.h.

Definition at line 48 of file sitkPatchBasedDenoisingImageFilter.h.

Member Enumeration Documentation

Enumerator
NOMODEL 
GAUSSIAN 
RICIAN 
POISSON 

Definition at line 118 of file sitkPatchBasedDenoisingImageFilter.h.

Constructor & Destructor Documentation

virtual itk::simple::PatchBasedDenoisingImageFilter::~PatchBasedDenoisingImageFilter ( )
virtual

Destructor

itk::simple::PatchBasedDenoisingImageFilter::PatchBasedDenoisingImageFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

Self& itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOff ( )
inline

Definition at line 161 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOn ( )
inline

Set the value of AlwaysTreatComponentsAsEuclidean to true or false respectfully.

Definition at line 160 of file sitkPatchBasedDenoisingImageFilter.h.

Image itk::simple::PatchBasedDenoisingImageFilter::Execute ( const Image image1)

Execute the filter on the input image

Image itk::simple::PatchBasedDenoisingImageFilter::Execute ( const Image image1,
double  kernelBandwidthSigma,
uint32_t  patchRadius,
uint32_t  numberOfIterations,
uint32_t  numberOfSamplePatches,
double  sampleVariance,
PatchBasedDenoisingImageFilter::NoiseModelType  noiseModel,
double  noiseSigma,
double  noiseModelFidelityWeight,
bool  alwaysTreatComponentsAsEuclidean,
bool  kernelBandwidthEstimation,
double  kernelBandwidthMultiplicationFactor,
uint32_t  kernelBandwidthUpdateFrequency,
double  kernelBandwidthFractionPixelsForEstimation 
)

Execute the filter on the input image with the given parameters

template<class TImageType >
Image itk::simple::PatchBasedDenoisingImageFilter::ExecuteInternal ( const Image image1)
private
bool itk::simple::PatchBasedDenoisingImageFilter::GetAlwaysTreatComponentsAsEuclidean ( ) const
inline

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.

Definition at line 167 of file sitkPatchBasedDenoisingImageFilter.h.

bool itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthEstimation ( ) const
inline

Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.

Definition at line 183 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthFractionPixelsForEstimation ( ) const
inline

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.

Definition at line 215 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthMultiplicationFactor ( ) const
inline

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.

Definition at line 193 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthSigma ( ) const
inline

Set/Get initial kernel bandwidth estimate. To prevent the class from automatically modifying this estimate, set KernelBandwidthEstimation to false in the base class.

Definition at line 70 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthUpdateFrequency ( ) const
inline

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.

Definition at line 205 of file sitkPatchBasedDenoisingImageFilter.h.

std::string itk::simple::PatchBasedDenoisingImageFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 217 of file sitkPatchBasedDenoisingImageFilter.h.

NoiseModelType itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModel ( ) const
inline

Set/Get the noise model type. Defaults to GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive.

Definition at line 130 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModelFidelityWeight ( ) const
inline

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.

Definition at line 151 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::GetNoiseSigma ( ) const
inline

Definition at line 139 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfIterations ( ) const
inline

Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1.

Definition at line 94 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfSamplePatches ( ) const
inline

Definition at line 104 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::GetPatchRadius ( ) const
inline

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.

Definition at line 82 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::GetSampleVariance ( ) const
inline

Set/Get the variance of the domain where patches are sampled.

Definition at line 116 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOff ( )
inline

Definition at line 177 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOn ( )
inline

Set the value of KernelBandwidthEstimation to true or false respectfully.

Definition at line 176 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetAlwaysTreatComponentsAsEuclidean ( bool  AlwaysTreatComponentsAsEuclidean)
inline

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.

Definition at line 157 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthEstimation ( bool  KernelBandwidthEstimation)
inline

Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.

Definition at line 173 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthFractionPixelsForEstimation ( double  KernelBandwidthFractionPixelsForEstimation)
inline

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.

Definition at line 210 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthMultiplicationFactor ( double  KernelBandwidthMultiplicationFactor)
inline

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.

Definition at line 188 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthSigma ( double  KernelBandwidthSigma)
inline

Set/Get initial kernel bandwidth estimate. To prevent the class from automatically modifying this estimate, set KernelBandwidthEstimation to false in the base class.

Definition at line 65 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthUpdateFrequency ( uint32_t  KernelBandwidthUpdateFrequency)
inline

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.

Definition at line 199 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModel ( NoiseModelType  NoiseModel)
inline

Set/Get the noise model type. Defaults to GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive.

Definition at line 124 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModelFidelityWeight ( double  NoiseModelFidelityWeight)
inline

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.

Definition at line 145 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetNoiseSigma ( double  NoiseSigma)
inline

Set/Get the noise sigma. Used by the noise model where appropriate, defaults to 5% of the image intensity range

Definition at line 135 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfIterations ( uint32_t  NumberOfIterations)
inline

Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1.

Definition at line 88 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfSamplePatches ( uint32_t  NumberOfSamplePatches)
inline

Set/Get the number of patches to sample for each pixel.

Definition at line 100 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetPatchRadius ( uint32_t  PatchRadius)
inline

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.

Definition at line 76 of file sitkPatchBasedDenoisingImageFilter.h.

Self& itk::simple::PatchBasedDenoisingImageFilter::SetSampleVariance ( double  SampleVariance)
inline

Set/Get the variance of the domain where patches are sampled.

Definition at line 110 of file sitkPatchBasedDenoisingImageFilter.h.

std::string itk::simple::PatchBasedDenoisingImageFilter::ToString ( ) const
virtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

Definition at line 238 of file sitkPatchBasedDenoisingImageFilter.h.

Member Data Documentation

bool itk::simple::PatchBasedDenoisingImageFilter::m_AlwaysTreatComponentsAsEuclidean
private

Definition at line 253 of file sitkPatchBasedDenoisingImageFilter.h.

bool itk::simple::PatchBasedDenoisingImageFilter::m_KernelBandwidthEstimation
private

Definition at line 254 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::m_KernelBandwidthFractionPixelsForEstimation
private

Definition at line 257 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::m_KernelBandwidthMultiplicationFactor
private

Definition at line 255 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::m_KernelBandwidthSigma
private

Definition at line 244 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::m_KernelBandwidthUpdateFrequency
private

Definition at line 256 of file sitkPatchBasedDenoisingImageFilter.h.

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::PatchBasedDenoisingImageFilter::m_MemberFactory
private

Definition at line 240 of file sitkPatchBasedDenoisingImageFilter.h.

NoiseModelType itk::simple::PatchBasedDenoisingImageFilter::m_NoiseModel
private

Definition at line 250 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::m_NoiseModelFidelityWeight
private

Definition at line 252 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::m_NoiseSigma
private

Definition at line 251 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::m_NumberOfIterations
private

Definition at line 247 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::m_NumberOfSamplePatches
private

Definition at line 248 of file sitkPatchBasedDenoisingImageFilter.h.

uint32_t itk::simple::PatchBasedDenoisingImageFilter::m_PatchRadius
private

Definition at line 245 of file sitkPatchBasedDenoisingImageFilter.h.

double itk::simple::PatchBasedDenoisingImageFilter::m_SampleVariance
private

Definition at line 249 of file sitkPatchBasedDenoisingImageFilter.h.


The documentation for this class was generated from the following file: