SimpleITK
|
Derived class implementing a specific patch-based denoising algorithm, as detailed below. More...
#include <sitkPatchBasedDenoisingImageFilter.h>
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.
Definition at line 45 of file sitkPatchBasedDenoisingImageFilter.h.
Public Types | |
enum | NoiseModelType { NOMODEL, GAUSSIAN, RICIAN, POISSON } |
using | PixelIDTypeList = BasicPixelIDTypeList |
using | Self = PatchBasedDenoisingImageFilter |
Public Types inherited from itk::simple::ImageFilter | |
using | Self = ImageFilter |
Public Types inherited from itk::simple::ProcessObject | |
using | Self = ProcessObject |
Public Member Functions | |
Self & | AlwaysTreatComponentsAsEuclideanOff () |
Self & | AlwaysTreatComponentsAsEuclideanOn () |
Image | Execute (const Image &image1) |
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 |
Self & | KernelBandwidthEstimationOff () |
Self & | KernelBandwidthEstimationOn () |
PatchBasedDenoisingImageFilter () | |
Self & | SetAlwaysTreatComponentsAsEuclidean (bool AlwaysTreatComponentsAsEuclidean) |
Self & | SetKernelBandwidthEstimation (bool KernelBandwidthEstimation) |
Self & | SetKernelBandwidthFractionPixelsForEstimation (double KernelBandwidthFractionPixelsForEstimation) |
Self & | SetKernelBandwidthMultiplicationFactor (double KernelBandwidthMultiplicationFactor) |
Self & | SetKernelBandwidthSigma (double KernelBandwidthSigma) |
Self & | SetKernelBandwidthUpdateFrequency (uint32_t KernelBandwidthUpdateFrequency) |
Self & | SetNoiseModel (NoiseModelType NoiseModel) |
Self & | SetNoiseModelFidelityWeight (double NoiseModelFidelityWeight) |
Self & | SetNoiseSigma (double NoiseSigma) |
Self & | SetNumberOfIterations (uint32_t NumberOfIterations) |
Self & | SetNumberOfSamplePatches (uint32_t NumberOfSamplePatches) |
Self & | SetPatchRadius (uint32_t PatchRadius) |
Self & | SetSampleVariance (double SampleVariance) |
std::string | ToString () const |
virtual | ~PatchBasedDenoisingImageFilter () |
Public Member Functions inherited from itk::simple::ImageFilter | |
ImageFilter () | |
virtual | ~ImageFilter ()=0 |
Public Member Functions inherited from itk::simple::ProcessObject | |
virtual void | Abort () |
virtual int | AddCommand (itk::simple::EventEnum event, const std::function< void()> &func) |
Directly add a callback to observe an event. More... | |
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 |
virtual void | SetNumberOfWorkUnits (unsigned int n) |
virtual unsigned int | GetNumberOfWorkUnits () const |
Private Types | |
using | MemberFunctionType = Image(Self::*)(const Image &image1) |
Private Member Functions | |
template<class TImageType > | |
Image | ExecuteInternal (const Image &image1) |
Private Attributes | |
bool | m_AlwaysTreatComponentsAsEuclidean {false} |
bool | m_KernelBandwidthEstimation {false} |
double | m_KernelBandwidthFractionPixelsForEstimation {0.2} |
double | m_KernelBandwidthMultiplicationFactor {1.0} |
double | m_KernelBandwidthSigma {400.0} |
uint32_t | m_KernelBandwidthUpdateFrequency {3u} |
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > | m_MemberFactory |
NoiseModelType | m_NoiseModel {itk::simple::PatchBasedDenoisingImageFilter::NOMODEL} |
double | m_NoiseModelFidelityWeight {0.0} |
double | m_NoiseSigma {0.0} |
uint32_t | m_NumberOfIterations {1u} |
uint32_t | m_NumberOfSamplePatches {200u} |
uint32_t | m_PatchRadius {4u} |
double | m_SampleVariance {400.0} |
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 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... | |
static bool | SetGlobalDefaultThreader (const std::string &threader) |
Set/Get the default threader used for process objects. More... | |
static std::string | GetGlobalDefaultThreader () |
Set/Get the default threader used for process objects. More... | |
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
static unsigned int | GetGlobalDefaultNumberOfThreads () |
Set/Get the default threader used for process objects. More... | |
Protected Member Functions inherited from itk::simple::ImageFilter | |
void | CheckImageMatchingDimension (const Image &image1, const Image &image2, const std::string &image2Name) |
void | CheckImageMatchingPixelType (const Image &image1, const Image &image2, const std::string &image2Name) |
void | CheckImageMatchingSize (const Image &image1, const Image &image2, const std::string &image2Name) |
Protected Member Functions inherited from itk::simple::ProcessObject | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | OnActiveProcessDelete () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) noexcept |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
Protected Member Functions inherited from itk::simple::NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
Static Protected Member Functions inherited from itk::simple::ImageFilter | |
template<class TImageType > | |
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 TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
template<unsigned int VImageDimension, unsigned int VLength, template< unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< VLength >, VImageDimension > *img) |
template<class TImageType > | |
static Image | CastITKToImage (TImageType *img) |
static const itk::EventObject & | GetITKEventObject (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) |
|
private |
Setup for member function dispatching
Definition at line 230 of file sitkPatchBasedDenoisingImageFilter.h.
Define the pixels types supported by this filter
Definition at line 57 of file sitkPatchBasedDenoisingImageFilter.h.
Definition at line 47 of file sitkPatchBasedDenoisingImageFilter.h.
Enumerator | |
---|---|
NOMODEL | |
GAUSSIAN | |
RICIAN | |
POISSON |
Definition at line 116 of file sitkPatchBasedDenoisingImageFilter.h.
|
virtual |
Destructor
itk::simple::PatchBasedDenoisingImageFilter::PatchBasedDenoisingImageFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
|
inline |
Definition at line 159 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set the value of AlwaysTreatComponentsAsEuclidean to true or false respectfully.
Definition at line 158 of file sitkPatchBasedDenoisingImageFilter.h.
Execute the filter on the input image
|
private |
|
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 165 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.
Definition at line 181 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 213 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 191 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 68 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 203 of file sitkPatchBasedDenoisingImageFilter.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 216 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the noise model type. Defaults to GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive.
Definition at line 128 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 149 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Definition at line 137 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1.
Definition at line 92 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Definition at line 102 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 80 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the variance of the domain where patches are sampled.
Definition at line 114 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Definition at line 175 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set the value of KernelBandwidthEstimation to true or false respectfully.
Definition at line 174 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 155 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.
Definition at line 171 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 208 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 186 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 63 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 197 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the noise model type. Defaults to GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive.
Definition at line 122 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 143 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the noise sigma. Used by the noise model where appropriate, defaults to 5% of the image intensity range
Definition at line 133 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1.
Definition at line 86 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the number of patches to sample for each pixel.
Definition at line 98 of file sitkPatchBasedDenoisingImageFilter.h.
|
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 74 of file sitkPatchBasedDenoisingImageFilter.h.
|
inline |
Set/Get the variance of the domain where patches are sampled.
Definition at line 108 of file sitkPatchBasedDenoisingImageFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 234 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 257 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 259 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 265 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 261 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 240 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 263 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 236 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 251 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 255 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 253 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 245 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 247 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 242 of file sitkPatchBasedDenoisingImageFilter.h.
|
private |
Definition at line 249 of file sitkPatchBasedDenoisingImageFilter.h.