ITK  5.2.0
Insight Toolkit
itkPatchBasedDenoisingImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkPatchBasedDenoisingImageFilter_h
19 #define itkPatchBasedDenoisingImageFilter_h
20 
22 #include "itkImageRegionIterator.h"
24 #include "itkVector.h"
25 #include "itkVectorImage.h"
26 #include "itkRGBPixel.h"
27 #include "itkRGBAPixel.h"
28 #include "itkDiffusionTensor3D.h"
29 #include "itkFixedArray.h"
30 #include "itkMatrix.h"
32 #include <type_traits>
33 
34 #include <vector>
35 #include "ITKDenoisingExport.h"
36 
37 namespace itk
38 {
61 template <typename TInputImage, typename TOutputImage>
62 class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter
63  : public PatchBasedDenoisingBaseImageFilter<TInputImage, TOutputImage>
64 {
65 public:
66  ITK_DISALLOW_COPY_AND_MOVE(PatchBasedDenoisingImageFilter);
68 
74  using OutputImagePointer = typename Superclass::OutputImagePointer;
75 
77  itkNewMacro(Self);
78 
81 
83  using InputImageType = typename Superclass::InputImageType;
84  using OutputImageType = typename Superclass::OutputImageType;
85 
87  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
88 
91 
95 
98  using PixelType = typename Superclass::PixelType;
99  using PixelValueType = typename Superclass::PixelValueType;
100 
106 
108  using ListAdaptorType = typename Superclass::ListAdaptorType;
109  using PatchRadiusType = typename Superclass::PatchRadiusType;
110  using InputImagePatchIterator = typename Superclass::InputImagePatchIterator;
112  using PatchWeightsType = typename Superclass::PatchWeightsType;
113 
118 
126  using EigenValuesCacheType = std::vector<EigenValuesArrayType>;
127  using EigenVectorsCacheType = std::vector<EigenVectorsMatrixType>;
128 
130  {
140  };
141 
146  itkSetMacro(UseSmoothDiscPatchWeights, bool);
147  itkBooleanMacro(UseSmoothDiscPatchWeights);
148  itkGetConstMacro(UseSmoothDiscPatchWeights, bool);
150 
155  void
156  SetKernelBandwidthSigma(const RealArrayType & kernelSigma);
157  itkGetConstMacro(KernelBandwidthSigma, RealArrayType);
159 
164  itkSetClampMacro(KernelBandwidthFractionPixelsForEstimation, double, 0.01, 1.0);
165  itkGetConstReferenceMacro(KernelBandwidthFractionPixelsForEstimation, double);
167 
170  itkSetMacro(ComputeConditionalDerivatives, bool);
171  itkBooleanMacro(ComputeConditionalDerivatives);
172  itkGetConstMacro(ComputeConditionalDerivatives, bool);
174 
188  itkSetMacro(UseFastTensorComputations, bool);
189  itkBooleanMacro(UseFastTensorComputations);
190  itkGetConstMacro(UseFastTensorComputations, bool);
192 
194  static constexpr unsigned int MaxSigmaUpdateIterations = 20;
195 
202  itkSetClampMacro(KernelBandwidthMultiplicationFactor, double, 0.01, 100);
203  itkGetConstReferenceMacro(KernelBandwidthMultiplicationFactor, double);
205 
209  void
210  SetNoiseSigma(const RealType & sigma);
211 
212  itkGetConstMacro(NoiseSigma, RealType);
213 
215  itkSetObjectMacro(Sampler, BaseSamplerType);
216  itkGetModifiableObjectMacro(Sampler, BaseSamplerType);
218 
220  itkGetConstMacro(NumIndependentComponents, unsigned int);
221 
222 protected:
224  ~PatchBasedDenoisingImageFilter() override;
225  void
226  PrintSelf(std::ostream & os, Indent indent) const override;
227 
229  virtual void
230  EmptyCaches();
231 
233  void
234  AllocateUpdateBuffer() override;
235 
236  void
237  CopyInputToOutput() override;
238 
239  void
240  GenerateInputRequestedRegion() override;
241 
242  template <typename T, typename U = void>
244  typename std::enable_if<std::is_same<T, typename NumericTraits<T>::ValueType>::value, U>;
245 
246  template <typename T, typename U = void>
247  using EnableIfMultiComponent =
248  typename std::enable_if<!std::is_same<T, typename NumericTraits<T>::ValueType>::value, U>;
249 
250 
257  template <typename T>
259  GetComponent(const T pix, unsigned int itkNotUsed(idx)) const
260  {
261  // The enable if idiom is used to overload this method for both
262  // scalars and multi-component types. By exploiting that
263  // NumericTraits' ValueType type alias (defines the per-element type
264  // for multi-component types ) is different then the parameterize
265  // type, the bracket operator is used only for multi-component
266  // types.
267  return pix;
268  }
269 
270  template <typename T>
271  typename EnableIfMultiComponent<T, typename NumericTraits<T>::ValueType>::type
272  GetComponent(const T & pix, unsigned int idx) const
273  {
274  return pix[idx];
275  }
276 
278  template <typename T>
279  void
280  SetComponent(T & pix,
281  unsigned int itkNotUsed(idx),
283  {
284  pix = val;
285  }
286 
287  template <typename T>
288  void
289  SetComponent(T & pix, unsigned int idx, typename EnableIfMultiComponent<T, RealValueType>::type val) const
290  {
291  pix[idx] = val;
292  }
293 
297  void
299  {
300  if (this->GetComponentSpace() == Superclass::ComponentSpaceEnum::RIEMANNIAN)
301  {
302  DispatchedRiemannianMinMax(img);
303  }
304  else
305  {
306  DispatchedArrayMinMax(img);
307  }
308  }
309 
310  template <typename TImageType>
311  typename DisableIfMultiComponent<typename TImageType::PixelType>::type
312  ComputeMinMax(const TImageType * img)
313  {
314  DispatchedMinMax(img);
315  }
316 
317  template <typename TImageType>
318  typename EnableIfMultiComponent<typename TImageType::PixelType>::type
319  ComputeMinMax(const TImageType * img)
320  {
321  DispatchedArrayMinMax(img);
322  }
323 
332  void
335  const RealArrayType & weight,
336  bool useCachedComputations,
337  SizeValueType cacheIndex,
338  EigenValuesCacheType & eigenValsCache,
339  EigenVectorsCacheType & eigenVecsCache,
340  RealType & diff,
341  RealArrayType & norm)
342  {
343  if (this->GetComponentSpace() == Superclass::ComponentSpaceEnum::RIEMANNIAN)
344  {
345  ComputeLogMapAndWeightedSquaredGeodesicDifference(
346  a, b, weight, useCachedComputations, cacheIndex, eigenValsCache, eigenVecsCache, diff, norm);
347  }
348  else
349  {
350  ComputeSignedEuclideanDifferenceAndWeightedSquaredNorm(
351  a, b, weight, useCachedComputations, cacheIndex, eigenValsCache, eigenVecsCache, diff, norm);
352  }
353  }
355 
356  template <typename PixelT>
357  void
359  const PixelT & b,
360  const RealArrayType & weight,
361  bool useCachedComputations,
362  SizeValueType cacheIndex,
363  EigenValuesCacheType & eigenValsCache,
364  EigenVectorsCacheType & eigenVecsCache,
365  RealType & diff,
366  RealArrayType & norm)
367  {
368  ComputeSignedEuclideanDifferenceAndWeightedSquaredNorm(
369  a, b, weight, useCachedComputations, cacheIndex, eigenValsCache, eigenVecsCache, diff, norm);
370  }
371 
375  RealType
377  {
378  if (this->GetComponentSpace() == Superclass::ComponentSpaceEnum::RIEMANNIAN)
379  {
380  return this->AddExponentialMapUpdate(a, b);
381  }
382  else
383  {
384  return this->AddEuclideanUpdate(a, b);
385  }
386  }
388 
389  template <typename RealT>
390  RealType
391  AddUpdate(const RealT & a, const RealType & b)
392  {
393  return this->AddEuclideanUpdate(a, b);
394  }
395 
396  virtual void
397  EnforceConstraints();
398 
399  void
400  Initialize() override;
401 
402  virtual void
403  InitializeKernelSigma();
404 
405  void
406  InitializePatchWeights() override;
407 
408  virtual void
409  InitializePatchWeightsSmoothDisc();
410 
411  void
412  InitializeIteration() override;
413 
414  void
415  ComputeKernelBandwidthUpdate() override; // derived from base class;
416 
417  // define here
418 
419  virtual ThreadDataStruct
420  ThreadedComputeSigmaUpdate(const InputImageRegionType & regionToProcess,
421  const int itkNotUsed(threadId),
422  ThreadDataStruct threadData);
423 
424  virtual RealArrayType
425  ResolveSigmaUpdate();
426 
427  void
428  ComputeImageUpdate() override;
429 
430  virtual ThreadDataStruct
431  ThreadedComputeImageUpdate(const InputImageRegionType & regionToProcess,
432  const int threadId,
433  ThreadDataStruct threadData);
434 
435  virtual RealType
436  ComputeGradientJointEntropy(InstanceIdentifier id,
437  typename ListAdaptorType::Pointer & inList,
438  BaseSamplerPointer & sampler,
439  ThreadDataStruct & threadData);
440 
441  void
442  ApplyUpdate() override;
443 
444  virtual void
445  ThreadedApplyUpdate(const InputImageRegionType & regionToProcess, const int itkNotUsed(threadId));
446 
447  void
448  PostProcessOutput() override;
449 
450  virtual void
451  SetThreadData(int threadId, const ThreadDataStruct & data);
452 
453  virtual ThreadDataStruct
454  GetThreadData(int threadId);
455 
456 private:
460  ComputeSigmaUpdateThreaderCallback(void * arg);
461 
465  ComputeImageUpdateThreaderCallback(void * arg);
466 
470  ApplyUpdateThreaderCallback(void * arg);
471 
472  template <typename TInputImageType>
473  void
474  DispatchedMinMax(const TInputImageType * img);
475 
476  template <typename TInputImageType>
477  void
478  DispatchedArrayMinMax(const TInputImageType * img);
479 
480  template <typename TInputImageType>
481  void
482  DispatchedVectorMinMax(const TInputImageType * img);
483 
484  template <typename TInputImageType>
485  void
486  DispatchedRiemannianMinMax(const TInputImageType * img);
487 
491  RiemannianMinMaxThreaderCallback(void * arg);
492 
493  ThreadDataStruct
494  ThreadedRiemannianMinMax(const InputImageRegionType & regionToProcess,
495  const int itkNotUsed(threadId),
496  const InputImageType * img,
497  ThreadDataStruct threadData);
498 
499  virtual void
500  ResolveRiemannianMinMax();
501 
502  void
503  ComputeSignedEuclideanDifferenceAndWeightedSquaredNorm(const PixelType & a,
504  const PixelType & b,
505  const RealArrayType & weight,
506  bool useCachedComputations,
507  SizeValueType cacheIndex,
508  EigenValuesCacheType & eigenValsCache,
509  EigenVectorsCacheType & eigenVecsCache,
510  RealType & diff,
511  RealArrayType & norm);
512 
514  void
515  ComputeLogMapAndWeightedSquaredGeodesicDifference(const DiffusionTensor3D<PixelValueType> & spdMatrixA,
516  const DiffusionTensor3D<PixelValueType> & spdMatrixB,
517  const RealArrayType & weight,
518  bool useCachedComputations,
519  SizeValueType cacheIndex,
520  EigenValuesCacheType & eigenValsCache,
521  EigenVectorsCacheType & eigenVecsCache,
522  RealType & symMatrixLogMap,
523  RealArrayType & geodesicDist);
524 
525  template <typename TensorValueT>
526  void
527  Compute3x3EigenAnalysis(const DiffusionTensor3D<TensorValueT> & spdMatrix,
528  FixedArray<TensorValueT, 3> & eigenVals,
529  Matrix<TensorValueT, 3, 3> & eigenVecs);
530 
531  RealType
532  AddEuclideanUpdate(const RealType & a, const RealType & b);
533 
535  RealType
536  AddExponentialMapUpdate(const DiffusionTensor3D<RealValueType> & spdMatrix,
537  const DiffusionTensor3D<RealValueType> & symMatrix);
538 
540  {
543  };
544 
545  std::vector<ThreadDataStruct> m_ThreadData;
546 
548  typename OutputImageType::Pointer m_UpdateBuffer;
549 
550  unsigned int m_NumPixelComponents{ 0 };
551  unsigned int m_NumIndependentComponents{ 0 };
552  unsigned int m_TotalNumberPixels{ 0 };
553 
554  bool m_UseSmoothDiscPatchWeights{ true };
555 
556  bool m_UseFastTensorComputations{ true };
557 
559  bool m_KernelBandwidthSigmaIsSet{ false };
564  double m_KernelBandwidthFractionPixelsForEstimation{ 0.20 };
565  bool m_ComputeConditionalDerivatives{ false };
566  double m_MinSigma;
569  double m_SigmaUpdateConvergenceTolerance{ 0.01 };
571  double m_KernelBandwidthMultiplicationFactor{ 1.0 };
572 
575  bool m_NoiseSigmaIsSet{ false };
576 
578  typename ListAdaptorType::Pointer m_SearchSpaceList;
579 };
580 } // end namespace itk
581 
582 #ifndef ITK_MANUAL_INSTANTIATION
583 # include "itkPatchBasedDenoisingImageFilter.hxx"
584 #endif
585 
586 #endif
itk::PatchBasedDenoisingImageFilter::ComputeMinMax
DisableIfMultiComponent< typename TImageType::PixelType >::type ComputeMinMax(const TImageType *img)
Definition: itkPatchBasedDenoisingImageFilter.h:312
itk::PatchBasedDenoisingImageFilter::DisableIfMultiComponent
typename std::enable_if< std::is_same< T, typename NumericTraits< T >::ValueType >::value, U > DisableIfMultiComponent
Definition: itkPatchBasedDenoisingImageFilter.h:244
itk::PatchBasedDenoisingImageFilter::BaseSamplerPointer
typename BaseSamplerType::Pointer BaseSamplerPointer
Definition: itkPatchBasedDenoisingImageFilter.h:116
itk::PatchBasedDenoisingImageFilter::InputImageType
typename Superclass::InputImageType InputImageType
Definition: itkPatchBasedDenoisingImageFilter.h:83
itk::PatchBasedDenoisingImageFilter::RealType
typename NumericTraits< PixelType >::RealType RealType
Definition: itkPatchBasedDenoisingImageFilter.h:101
itk::PatchBasedDenoisingImageFilter::SetComponent
void SetComponent(T &pix, unsigned int idx, typename EnableIfMultiComponent< T, RealValueType >::type val) const
Definition: itkPatchBasedDenoisingImageFilter.h:289
itk::PatchBasedDenoisingImageFilter::m_ImageMin
PixelArrayType m_ImageMin
Definition: itkPatchBasedDenoisingImageFilter.h:562
itk::PatchBasedDenoisingImageFilter::RealValueType
typename NumericTraits< PixelValueType >::RealType RealValueType
Definition: itkPatchBasedDenoisingImageFilter.h:102
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itkNeighborhoodAlgorithm.h
itkRGBPixel.h
itkMatrix.h
itk::PatchBasedDenoisingImageFilter::m_NoiseSigmaSquared
RealType m_NoiseSigmaSquared
Definition: itkPatchBasedDenoisingImageFilter.h:574
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::eigenVecsCache
EigenVectorsCacheType eigenVecsCache
Definition: itkPatchBasedDenoisingImageFilter.h:139
itk::PatchBasedDenoisingImageFilter::m_ZeroPixel
PixelType m_ZeroPixel
Definition: itkPatchBasedDenoisingImageFilter.h:561
itk::PatchBasedDenoisingImageFilter::ThreadFilterStruct
Definition: itkPatchBasedDenoisingImageFilter.h:539
itk::PatchBasedDenoisingImageFilter::EnableIfMultiComponent
typename std::enable_if<!std::is_same< T, typename NumericTraits< T >::ValueType >::value, U > EnableIfMultiComponent
Definition: itkPatchBasedDenoisingImageFilter.h:248
itk::PatchBasedDenoisingImageFilter::PatchSampleType
ListAdaptorType PatchSampleType
Definition: itkPatchBasedDenoisingImageFilter.h:111
itkDiffusionTensor3D.h
itk::PatchBasedDenoisingImageFilter::SetComponent
void SetComponent(T &pix, unsigned int, typename DisableIfMultiComponent< T, RealValueType >::type val) const
A method to generically set a component.
Definition: itkPatchBasedDenoisingImageFilter.h:280
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::validNorms
ShortArrayType validNorms
Definition: itkPatchBasedDenoisingImageFilter.h:134
itk::PatchBasedDenoisingBaseImageFilter::PatchRadiusType
typename ListAdaptorType::NeighborhoodRadiusType PatchRadiusType
Definition: itkPatchBasedDenoisingBaseImageFilter.h:205
itk::PatchBasedDenoisingImageFilter::ComputeMinMax
void ComputeMinMax(const Image< DiffusionTensor3D< PixelValueType >, ImageDimension > *img)
Definition: itkPatchBasedDenoisingImageFilter.h:298
itk::DiffusionTensor3D
Represent a diffusion tensor as used in DTI images.
Definition: itkDiffusionTensor3D.h:79
itkRGBAPixel.h
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::maxNorm
RealArrayType maxNorm
Definition: itkPatchBasedDenoisingImageFilter.h:136
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::validDerivatives
ShortArrayType validDerivatives
Definition: itkPatchBasedDenoisingImageFilter.h:131
itk::SmartPointer< Self >
itkImageRegionIterator.h
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::PatchBasedDenoisingImageFilter::EigenValuesCacheType
std::vector< EigenValuesArrayType > EigenValuesCacheType
Definition: itkPatchBasedDenoisingImageFilter.h:126
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::sampler
BaseSamplerPointer sampler
Definition: itkPatchBasedDenoisingImageFilter.h:137
itkPatchBasedDenoisingBaseImageFilter.h
itk::PatchBasedDenoisingImageFilter::ComputeMinMax
EnableIfMultiComponent< typename TImageType::PixelType >::type ComputeMinMax(const TImageType *img)
Definition: itkPatchBasedDenoisingImageFilter.h:319
itk::PatchBasedDenoisingImageFilter::m_MinProbability
double m_MinProbability
Definition: itkPatchBasedDenoisingImageFilter.h:567
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::entropySecondDerivative
RealArrayType entropySecondDerivative
Definition: itkPatchBasedDenoisingImageFilter.h:133
itkVectorImage.h
itk::ImageRegionIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionIterator.h:80
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
itk::ITK_THREAD_RETURN_TYPE ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
Definition: itkThreadSupport.h:82
itk::PatchBasedDenoisingImageFilter::ComputeDifferenceAndWeightedSquaredNorm
void ComputeDifferenceAndWeightedSquaredNorm(const PixelT &a, const PixelT &b, const RealArrayType &weight, bool useCachedComputations, SizeValueType cacheIndex, EigenValuesCacheType &eigenValsCache, EigenVectorsCacheType &eigenVecsCache, RealType &diff, RealArrayType &norm)
Definition: itkPatchBasedDenoisingImageFilter.h:358
itk::PatchBasedDenoisingImageFilter::m_UpdateBuffer
OutputImageType::Pointer m_UpdateBuffer
Definition: itkPatchBasedDenoisingImageFilter.h:548
itk::PatchBasedDenoisingImageFilter::GetComponent
DisableIfMultiComponent< T, T >::type GetComponent(const T pix, unsigned int) const
A method to generically get a component.
Definition: itkPatchBasedDenoisingImageFilter.h:259
itk::PatchBasedDenoisingImageFilter::EigenVectorsCacheType
std::vector< EigenVectorsMatrixType > EigenVectorsCacheType
Definition: itkPatchBasedDenoisingImageFilter.h:127
itk::PatchBasedDenoisingImageFilter::m_ImageMax
PixelArrayType m_ImageMax
Definition: itkPatchBasedDenoisingImageFilter.h:563
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::minNorm
RealArrayType minNorm
Definition: itkPatchBasedDenoisingImageFilter.h:135
itkFixedArray.h
itk::PatchBasedDenoisingImageFilter::ThreadFilterStruct::Img
InputImageType * Img
Definition: itkPatchBasedDenoisingImageFilter.h:542
itk::PatchBasedDenoisingImageFilter
Derived class implementing a specific patch-based denoising algorithm, as detailed below.
Definition: itkPatchBasedDenoisingImageFilter.h:62
itk::PatchBasedDenoisingImageFilter::m_NoiseSigma
RealType m_NoiseSigma
Definition: itkPatchBasedDenoisingImageFilter.h:573
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:52
itk::Matrix
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:51
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::PatchBasedDenoisingImageFilter::m_MinSigma
double m_MinSigma
Definition: itkPatchBasedDenoisingImageFilter.h:566
itk::PatchBasedDenoisingImageFilter::m_KernelBandwidthSigma
RealArrayType m_KernelBandwidthSigma
Definition: itkPatchBasedDenoisingImageFilter.h:558
itk::PatchBasedDenoisingBaseImageFilter::ListAdaptorType
typename ::itk::Statistics::ImageToNeighborhoodSampleAdaptor< OutputImageType, BoundaryConditionType > ListAdaptorType
Definition: itkPatchBasedDenoisingBaseImageFilter.h:204
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkRegionConstrainedSubsampler.h
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:50
itk::PatchBasedDenoisingBaseImageFilter::PixelType
OutputPixelType PixelType
Definition: itkPatchBasedDenoisingBaseImageFilter.h:171
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::PatchBasedDenoisingImageFilter::InstanceIdentifier
typename BaseSamplerType::InstanceIdentifier InstanceIdentifier
Definition: itkPatchBasedDenoisingImageFilter.h:117
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::entropyFirstDerivative
RealArrayType entropyFirstDerivative
Definition: itkPatchBasedDenoisingImageFilter.h:132
itkVector.h
itk::PatchBasedDenoisingImageFilter::m_IntensityRescaleInvFactor
RealArrayType m_IntensityRescaleInvFactor
Definition: itkPatchBasedDenoisingImageFilter.h:560
itk::PatchBasedDenoisingImageFilter::m_SigmaConverged
ShortArrayType m_SigmaConverged
Definition: itkPatchBasedDenoisingImageFilter.h:570
itk::Array< PixelValueType >
itk::PatchBasedDenoisingImageFilter::m_SigmaUpdateDecimationFactor
unsigned int m_SigmaUpdateDecimationFactor
Definition: itkPatchBasedDenoisingImageFilter.h:568
itk::PatchBasedDenoisingImageFilter::AddUpdate
RealType AddUpdate(const DiffusionTensor3D< RealValueType > &a, const RealType &b)
Definition: itkPatchBasedDenoisingImageFilter.h:376
itk::PatchBasedDenoisingBaseImageFilter::PixelValueType
typename NumericTraits< PixelType >::ValueType PixelValueType
Definition: itkPatchBasedDenoisingBaseImageFilter.h:172
itk::ImageRegionConstIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionConstIterator.h:109
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::NumericTraits::RealType
double RealType
Definition: itkNumericTraits.h:84
itk::PatchBasedDenoisingImageFilter::ComputeDifferenceAndWeightedSquaredNorm
void ComputeDifferenceAndWeightedSquaredNorm(const DiffusionTensor3D< PixelValueType > &a, const DiffusionTensor3D< PixelValueType > &b, const RealArrayType &weight, bool useCachedComputations, SizeValueType cacheIndex, EigenValuesCacheType &eigenValsCache, EigenVectorsCacheType &eigenVecsCache, RealType &diff, RealArrayType &norm)
Definition: itkPatchBasedDenoisingImageFilter.h:333
itk::PatchBasedDenoisingImageFilter::m_SearchSpaceList
ListAdaptorType::Pointer m_SearchSpaceList
Definition: itkPatchBasedDenoisingImageFilter.h:578
itk::PatchBasedDenoisingBaseImageFilter
Base class for patch-based denoising algorithms.
Definition: itkPatchBasedDenoisingBaseImageFilter.h:145
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::PatchBasedDenoisingImageFilter::m_Sampler
BaseSamplerPointer m_Sampler
Definition: itkPatchBasedDenoisingImageFilter.h:577
itk::Statistics::RegionConstrainedSubsampler
This an abstract subsampler that constrains subsamples to be contained within a given image region.
Definition: itkRegionConstrainedSubsampler.h:54
itk::PatchBasedDenoisingImageFilter::m_ThreadData
std::vector< ThreadDataStruct > m_ThreadData
Definition: itkPatchBasedDenoisingImageFilter.h:545
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::Statistics::RegionConstrainedSubsampler::InstanceIdentifier
typename TSample::InstanceIdentifier InstanceIdentifier
Definition: itkRegionConstrainedSubsampler.h:73
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct::eigenValsCache
EigenValuesCacheType eigenValsCache
Definition: itkPatchBasedDenoisingImageFilter.h:138
itk::PatchBasedDenoisingImageFilter::ThreadDataStruct
Definition: itkPatchBasedDenoisingImageFilter.h:129
itk::PatchBasedDenoisingImageFilter::ThreadFilterStruct::Filter
PatchBasedDenoisingImageFilter * Filter
Definition: itkPatchBasedDenoisingImageFilter.h:541
itk::PatchBasedDenoisingImageFilter::AddUpdate
RealType AddUpdate(const RealT &a, const RealType &b)
Definition: itkPatchBasedDenoisingImageFilter.h:391
itk::PatchBasedDenoisingImageFilter::GetComponent
EnableIfMultiComponent< T, typename NumericTraits< T >::ValueType >::type GetComponent(const T &pix, unsigned int idx) const
Definition: itkPatchBasedDenoisingImageFilter.h:272