ITK
4.13.0
Insight Segmentation and Registration Toolkit
|
#include <itkPatchBasedDenoisingBaseImageFilter.h>
Base class for patch-based denoising algorithms.
Implementation of 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. The weights are derived using a kernel function on distances between (i) the patch around pixel p and (ii) the patches around the chosen subset of pixels in the image. This class of methods is motivated by texture-based image models and relies on nonparametric statistical modeling in the high-dimensional space of image patches. The choice of an appropriate kernel bandwidth parameter underlying nonparametric modeling can be important and may be estimated using cross-validation schemes.
Engineering issues underlying this class of methods include the choice of the patch size, the definition of a weighting mask on patches (e.g. to make patches more isotropic and less rectangular), the number of iterations over the image, the scheme for sampling patches from the image, and the weights balancing the regularization and data fidelity when the noise model is known.
This class of methods stems from the following two independent and simultaneous publications:
Suyash P. Awate, Ross T. Whitaker. Higher-Order Image Statistics for Unsupervised, Information-Theoretic, Adaptive, Image Filtering. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):44-51.
Antoni Buades, Bartomeu Coll, Jean-Michel Morel. A Non-Local Algorithm for Image Denoising. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):60-65.
While the former work considers the denoising algorithm as performing entropy reduction using nonparametric density estimation, the latter work treats it as nonparametric regression. Details underlying this class of methods appear in:
Suyash P. Awate, Ross T. Whitaker. Unsupervised, Information-Theoretic, Adaptive Image Filtering for Image Restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2006; 28(3):364-376.
Antoni Buades, Bartomeu Coll, Jean-Michel Morel. Nonlocal Image and Movie Denoising. International Journal of Computer Vision (IJCV) 2008; 76(2):123-139.
This class provides the base software framework for implementing patch-based denoising methods for multi-dimensional and multi-channel (i.e. vector-valued pixels) images. This framework is multithreaded on shared-memory architectures. Multithreading is incorporated in, both, intensity-updates and bandwidth-estimation stages by subdividing the image domain and associating each sub-domain to a single thread for processing.
To prevent oversmoothing, this class provides the framework for including a data-fidelity term based on the knowledge of the noise model. The intensity updates are then treated as the sum of (1) the weighted smoothing updates (weighted by SmoothingWeight) and (2) the weighted fidelity updates (weighted by NoiseModelFidelityWeight) that prevent large deviations of the denoised image from the noisy data.
Definition at line 94 of file itkPatchBasedDenoisingBaseImageFilter.h.
Static Public Attributes | |
static const unsigned int | ImageDimension = InputImageType::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static const unsigned int | InputImageDimension = TInputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Protected Attributes | |
const InputImageType * | m_InputImage |
OutputImageType * | m_OutputImage |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
Private Attributes | |
bool | m_AlwaysTreatComponentsAsEuclidean |
ComponentSpaceType | m_ComponentSpace |
unsigned int | m_ElapsedIterations |
bool | m_KernelBandwidthEstimation |
unsigned int | m_KernelBandwidthUpdateFrequency |
bool | m_ManualReinitialization |
NoiseModelType | m_NoiseModel |
double | m_NoiseModelFidelityWeight |
unsigned int | m_NumberOfIterations |
unsigned int | m_PatchRadius |
PatchWeightsType | m_PatchWeights |
double | m_SmoothingWeight |
FilterStateType | m_State |
typedef ZeroFluxNeumannBoundaryCondition<OutputImageType> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::BoundaryConditionType |
This data structure type is used for efficiently accessing patch values from the image data structure.
Definition at line 143 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef SmartPointer<const Self> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 102 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef ConstNeighborhoodIterator< InputImageType, BoundaryConditionType > itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::InputImagePatchIterator |
Definition at line 148 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef TInputImage itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::InputImageType |
Input and output image types.
Definition at line 105 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef InputImageType::PixelType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::InputPixelType |
Type definition for the input and output pixel types. Output pixel type will be used in computations.
Definition at line 118 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef typename::itk::Statistics::ImageToNeighborhoodSampleAdaptor< OutputImageType, BoundaryConditionType > itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::ListAdaptorType |
Definition at line 145 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef TOutputImage itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::OutputImageType |
Definition at line 109 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef OutputImageType::PixelType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::OutputPixelType |
Definition at line 119 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef ListAdaptorType::NeighborhoodRadiusType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::PatchRadiusType |
Definition at line 146 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef Array<float> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::PatchWeightsType |
This data structure type is used to store the weights (mask) for pixels in a patch in order to make the patch more isotropic and less rectangular.
Definition at line 138 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef OutputPixelType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::PixelType |
Definition at line 120 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef NumericTraits<PixelType>::ValueType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::PixelValueType |
Definition at line 121 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef SmartPointer<Self> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 101 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef PatchBasedDenoisingBaseImageFilter itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::Self |
Standard class typedefs.
Definition at line 99 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef ImageToImageFilter<TInputImage, TOutputImage> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 100 of file itkPatchBasedDenoisingBaseImageFilter.h.
enum itk::PatchBasedDenoisingBaseImageFilter::ComponentSpaceType |
Type definition to determine which space to do calculations in. TODO add comment about why no noise model can be used for RIEMANNIAN space
Enumerator | |
---|---|
EUCLIDEAN | |
RIEMANNIAN |
Definition at line 130 of file itkPatchBasedDenoisingBaseImageFilter.h.
enum itk::PatchBasedDenoisingBaseImageFilter::FilterStateType |
State that the filter is in, i.e. UNINITIALIZED or INITIALIZED.
Enumerator | |
---|---|
UNINITIALIZED | |
INITIALIZED |
Definition at line 133 of file itkPatchBasedDenoisingBaseImageFilter.h.
enum itk::PatchBasedDenoisingBaseImageFilter::NoiseModelType |
Type definition for selecting the noise model.
Enumerator | |
---|---|
NOMODEL | |
GAUSSIAN | |
RICIAN | |
POISSON |
Definition at line 124 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
|
overrideprotected |
|
protectedpure virtual |
Allocate memory for a temporary update container in the subclass.
Implemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
virtual |
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.
|
virtual |
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.
|
protectedpure virtual |
Implemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
protectedpure virtual |
Perform one iteration of image denoising.
Implemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
protectedpure virtual |
Automatically estimate kernel bandwidth from the image data.
Implemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
protectedpure virtual |
Implemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
inlineprotected |
Determine the component space based on pixel type
Definition at line 305 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotected |
Definition at line 310 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotected |
Definition at line 315 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotected |
Definition at line 321 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
overrideprotectedvirtual |
A version of GenerateData() specific for image processing filters. This implementation will split the processing across multiple threads. The buffer is allocated by this method. Then the BeforeThreadedGenerateData() method is called (if provided). Then, a series of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). If an image processing filter cannot be threaded, the filter should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a filter an be threaded, it should NOT provide a GenerateData() method but should provide a ThreadedGenerateData() instead.
Reimplemented from itk::ImageSource< TOutputImage >.
|
overrideprotectedvirtual |
What is the input requested region that is required to produce the output requested region? The base assumption for image processing filters is that the input requested region can be set to match the output requested region. If a filter requires more input (for instance a filter that uses neighborhoods needs more input than output to avoid introducing artificial boundary conditions) or less input (for instance a magnify filter) will have to override this method. In doing so, it should call its superclass' implementation as its first step. Note that imaging filters operate differently than the classes to this point in the class hierarchy. Up till now, the base assumption has been that the largest possible region will be requested of the input.
This implementation of GenerateInputRequestedRegion() only processes the inputs that are a subclass of the ImageBase<InputImageDimension>. If an input is another type of DataObject (including an Image of a different dimension), they are skipped by this method. The subclasses of ImageToImageFilter are responsible for providing an implementation of GenerateInputRequestedRegion() when there are multiple inputs of different types.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
virtual |
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.
|
protectedvirtual |
Set/Get the component space type.
|
virtual |
Get the number of elapsed iterations of the filter.
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to false.
|
virtual |
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.
|
virtual |
Indicates whether the filter automatically resets to UNINITIALIZED state after completing, or whether filter must be manually reset. Require the filter to be manually reinitialized (by calling SetStateToUninitialized().
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
virtual |
Set/Get the noise model type. Defaults to NOMODEL. To use the noise model during denoising, NoiseModelFidelityWeight must be positive.
|
virtual |
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. Use a positive weight to prevent oversmoothing.
|
virtual |
Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1.
PatchRadiusType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::GetPatchDiameterInVoxels | ( | ) | const |
PatchRadiusType::SizeValueType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::GetPatchLengthInVoxels | ( | ) | const |
|
virtual |
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.
PatchRadiusType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::GetPatchRadiusInVoxels | ( | ) | const |
PatchWeightsType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::GetPatchWeights | ( | ) | const |
|
virtual |
Set/Get the weight on the smoothing term. 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. Large stepsizes may cause instabilities.
|
virtual |
Set/Get the state of the filter.
|
protectedvirtual |
Check and indicate whether to continue iterations or stop.
|
inlineprotectedvirtual |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 275 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotectedvirtual |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 282 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protectedvirtual |
Allocate memory and initialize patch weights.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to false.
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to false.
|
virtual |
Indicates whether the filter automatically resets to UNINITIALIZED state after completing, or whether filter must be manually reset. Require the filter to be manually reinitialized (by calling SetStateToUninitialized().
|
virtual |
Indicates whether the filter automatically resets to UNINITIALIZED state after completing, or whether filter must be manually reset. Require the filter to be manually reinitialized (by calling SetStateToUninitialized().
|
inlineprotectedvirtual |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 292 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotectedvirtual |
Definition at line 280 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
virtual |
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.
|
protectedvirtual |
Set/Get the component space type.
|
protectedvirtual |
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to false.
|
virtual |
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.
|
virtual |
Indicates whether the filter automatically resets to UNINITIALIZED state after completing, or whether filter must be manually reset. Require the filter to be manually reinitialized (by calling SetStateToUninitialized().
|
virtual |
Set/Get the noise model type. Defaults to NOMODEL. To use the noise model during denoising, NoiseModelFidelityWeight must be positive.
|
virtual |
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. Use a positive weight to prevent oversmoothing.
|
virtual |
Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 1.
|
virtual |
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.
void itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::SetPatchWeights | ( | const PatchWeightsType & | weights | ) |
Set/Get the patch weights, or mask, that make the patch more isotropic (less rectangular). This function allows the user to set arbitrary patch weights by providing a 1-D array of weights.
|
virtual |
Set/Get the weight on the smoothing term. 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. Large stepsizes may cause instabilities.
|
virtual |
Set/Get the state of the filter.
|
virtual |
Set the state of the filter to INITIALIZED.
|
virtual |
Set the state of the filter to UNINITIALIZED.
|
inlineprotectedvirtual |
Definition at line 297 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
static |
Image dimension, assumed to be the same for input and output data.
Definition at line 113 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Parameter indicating whether components should be treated as if they are in Euclidean space regardless of pixel type.
Definition at line 359 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 360 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 350 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 328 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Parameters that define the strategy for kernel-bandwidth estimation.
Definition at line 344 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 345 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 362 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Parameters defining the usage of a specific noise model, if desired.
Definition at line 353 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 355 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Parameters that define the total number of denoising iterations to perform and those completed so far.
Definition at line 349 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 334 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Parameters that define patch size and patch weights (mask).
Definition at line 337 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 341 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 354 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
Definition at line 364 of file itkPatchBasedDenoisingBaseImageFilter.h.