ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkAnisotropicDiffusionLBRImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 //
19 // Created by Jean-Marie Mirebeau on 28/02/2014.
20 //
21 //
22 
23 #ifndef itkAnisotropicDiffusionLBRImageFilter_h
24 #define itkAnisotropicDiffusionLBRImageFilter_h
25 
28 
29 namespace itk
30 {
31 
45 template< typename TImage, typename TScalar = typename NumericTraits< typename TImage::PixelType >::RealType >
47 {
48 public:
53 
55  itkNewMacro(Self);
58 
59  using ImageType = TImage;
60  using PixelType = typename ImageType::PixelType;
61  using ScalarType = TScalar;
62 
63  static const unsigned int Dimension = ImageType::ImageDimension;
64 
67 
70 
72  itkSetMacro(NoiseScale, ScalarType);
73  itkGetConstMacro(NoiseScale, ScalarType);
74  itkSetMacro(FeatureScale, ScalarType);
75  itkGetConstMacro(FeatureScale, ScalarType);
77 
79  itkSetMacro(RatioToMaxStableTimeStep, ScalarType);
80  itkGetConstMacro(RatioToMaxStableTimeStep, ScalarType);
81  itkSetMacro(MaxTimeStepsBetweenTensorUpdates, int);
82  itkGetConstMacro(MaxTimeStepsBetweenTensorUpdates, int);
84 
85  itkSetMacro(DiffusionTime, ScalarType);
86  itkGetConstMacro(DiffusionTime, ScalarType);
87 
90  itkSetMacro(Adimensionize, bool);
91  itkGetConstMacro(Adimensionize, bool);
93 
99  {
100  itkExceptionMacro("Undefined tensor eigenvalues transform");
101  }
102 
104  {
105  return m_TensorImage;
106  }
107  using EffectiveTimesAndIterationsType = std::vector< std::pair<ScalarType, int> >;
108  itkGetConstReferenceMacro(LinearFilterEffectiveTimesAndIterations, EffectiveTimesAndIterationsType);
109 
110 protected:
113 
116 
119 
121 
122  virtual void ComputeDiffusionTensors(ImageType*);
123 
126 
127  void GenerateData() override;
128 
130 
131  struct DiffusionTensorFunctor;
132 };
133 
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkAnisotropicDiffusionLBRImageFilter.hxx"
138 #endif
139 
140 #endif
Light weight base class for most itk classes.
Represent a symmetric tensor of second rank.
virtual void ComputeDiffusionTensors(ImageType *)
typename TensorType::EigenValuesArrayType EigenValuesArrayType
Anisotropic diffusion using lattice basis reduction.
std::vector< std::pair< ScalarType, int > > EffectiveTimesAndIterationsType
virtual EigenValuesArrayType EigenValuesTransform(const EigenValuesArrayType &) const
EffectiveTimesAndIterationsType m_LinearFilterEffectiveTimesAndIterations
Non-linear anisotropic diffusion using lattice basis reduction.
Base class for filters that take an image as input and produce an image as output.
FixedArray< TComponent, NDimension > EigenValuesArrayType
Templated n-dimensional image class.
Definition: itkImage.h:75