ITK
4.2.0
Insight Segmentation and Registration Toolkit
|
#include <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 > |
Protected Attributes | |
bool | m_AlwaysTreatComponentsAsEuclidean |
ComponentSpaceType | m_ComponentSpace |
bool | m_DoKernelBandwidthEstimation |
unsigned int | m_ElapsedIterations |
double | m_FidelityWeight |
unsigned int | m_KernelBandwidthUpdateFrequency |
LoggerPointer | m_Logger |
bool | m_ManualReinitialization |
NoiseModelType | m_NoiseModel |
unsigned int | m_NumberOfIterations |
unsigned int | m_PatchRadius |
PatchWeightsType | m_PatchWeights |
double | m_SmoothingWeight |
Private Member Functions | |
void | operator= (const Self &) |
PatchBasedDenoisingBaseImageFilter (const Self &) |
Private Attributes | |
FilterStateType | m_State |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(OutputImageDimension), itkGetStaticConstMacro(InputImageDimension) > | InputToOutputRegionCopierType |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | OutputToInputRegionCopierType |
Base class for patch-based denoisng 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 and (2) the weighted fidelity updates that prevent large deviations of the denoised image from the noisy data.
Definition at line 95 of file itkPatchBasedDenoisingBaseImageFilter.h.
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 145 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef SmartPointer<const Self> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::ConstPointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 103 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef ConstNeighborhoodIterator< InputImageType, BoundaryConditionType > itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::InputImagePatchIterator |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 150 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef TInputImage itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::InputImageType |
Input and output image types.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 106 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 119 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef ::itk::Statistics::ImageToNeighborhoodSampleAdaptor< OutputImageType, BoundaryConditionType > itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::ListAdaptorType |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 147 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef LoggerType::Pointer itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::LoggerPointer |
Definition at line 125 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef itk::LoggerThreadWrapper<itk::Logger> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::LoggerType |
Definition at line 124 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef TOutputImage itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::OutputImageType |
Some convenient typedefs.
Reimplemented from itk::ImageSource< TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 110 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef OutputImageType::PixelType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::OutputPixelType |
Definition at line 120 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef ListAdaptorType::NeighborhoodRadiusType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::PatchRadiusType |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 148 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.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 140 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef OutputPixelType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::PixelType |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 121 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef NumericTraits<PixelType>::ValueType itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::PixelValueType |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 122 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef SmartPointer<Self> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::Pointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 102 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef PatchBasedDenoisingBaseImageFilter itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::Self |
Standard class typedefs.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 100 of file itkPatchBasedDenoisingBaseImageFilter.h.
typedef ImageToImageFilter<TInputImage, TOutputImage> itk::PatchBasedDenoisingBaseImageFilter< TInputImage, TOutputImage >::Superclass |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 101 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
Definition at line 133 of file itkPatchBasedDenoisingBaseImageFilter.h.
enum itk::PatchBasedDenoisingBaseImageFilter::FilterStateType |
Definition at line 135 of file itkPatchBasedDenoisingBaseImageFilter.h.
enum itk::PatchBasedDenoisingBaseImageFilter::NoiseModelType |
Type definition for selecting the noise model.
Definition at line 128 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
|
protected |
|
private |
|
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 |
Perform one iteration of image denoising.
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 311 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotected |
Determine the component space based on pixel type
Definition at line 313 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotected |
Determine the component space based on pixel type
Definition at line 315 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotected |
Determine the component space based on pixel type
Definition at line 318 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.
|
protectedvirtual |
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 >.
|
protectedvirtual |
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.
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.
|
virtual |
Get the number of elapsed iterations of the filter.
|
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.
|
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 |
Set/Get the logger
|
virtual |
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 GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive.
|
virtual |
Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 5.
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 |
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.
|
virtual |
Set/Get the state of the filter.
|
protectedvirtual |
Check and indicate whether to continue iterations or stop.
|
inlineprotectedvirtual |
Allocate memory and initialize patch weights.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 281 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotectedvirtual |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 289 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protectedvirtual |
Allocate memory and initialize patch weights.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
virtual |
Require the filter to be manually reinitialized (by calling SetStateToUninitialized()
|
virtual |
Require the filter to be manually reinitialized (by calling SetStateToUninitialized()
|
private |
PushBackInput(), PushFronInput() in the public section force the input to be the type expected by an ImageToImageFilter. However, these methods end of "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
|
inlineprotectedvirtual |
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 299 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
inlineprotectedvirtual |
Definition at line 287 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protectedvirtual |
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.
|
virtual |
Set/Get flag indicating whether kernel-bandwidth should be estimated automatically from the image data. Defaults to true.
|
protectedvirtual |
|
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.
|
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 |
Set/Get the logger
|
virtual |
Require the filter to be manually reinitialized (by calling SetStateToUninitialized()
|
virtual |
Set/Get the noise model type. Defaults to GAUSSIAN. To use the noise model during denoising, FidelityWeight must be positive.
|
virtual |
Set/Get the number of denoising iterations to perform. Must be a positive integer. Defaults to 5.
|
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.
|
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 |
Check and indicate whether to continue iterations or stop.
Definition at line 303 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
static |
Image dimension, assumed to be the same for input and output data.
Reimplemented in itk::PatchBasedDenoisingImageFilter< TInputImage, TOutputImage >.
Definition at line 114 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Parameter indicating whether components should be treated as if they are in Euclidean space regardless of pixel type.
Definition at line 343 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 344 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Parameters that define the strategy for kernel-bandwidth estimation.
Definition at line 328 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 334 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 339 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 329 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Logger for logging messages especially from multiple threads
Definition at line 351 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Indicates whether the filter automatically resets to UNINITIALIZED state after completing, or whether filter must be manually reset
Definition at line 348 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Parameters defining the usage of a specific noise model, if desired.
Definition at line 337 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Parameters that define the total number of denoising iterations to perform and those completed so far.
Definition at line 333 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Parameters that define patch size and patch weights (mask).
Definition at line 324 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 325 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
protected |
Definition at line 338 of file itkPatchBasedDenoisingBaseImageFilter.h.
|
private |
State that the filter is in, i.e. UNINITIALIZED or INITIALIZED
Definition at line 358 of file itkPatchBasedDenoisingBaseImageFilter.h.