ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkCoherenceEnhancingDiffusionImageFilter.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 06/03/2014.
20 //
21 //
22 
23 #ifndef itkCoherenceEnhancingDiffusionImageFilter_h
24 #define itkCoherenceEnhancingDiffusionImageFilter_h
25 
27 
28 
29 namespace itk
30 {
63 template< typename TImage, typename TScalar = typename NumericTraits< typename TImage::PixelType >::RealType >
65  public AnisotropicDiffusionLBRImageFilter< TImage, TScalar >
66 {
67 public:
73 
75  itkNewMacro(Self);
76 
79 
80  static const unsigned int Dimension = Superclass::Dimension;
81 
84 
87  itkSetMacro(Exponent, ScalarType);
88  itkSetMacro(Lambda, ScalarType);
89  itkSetMacro(Alpha, ScalarType);
91 
92  itkGetMacro(Exponent, ScalarType);
93  itkGetMacro(Lambda, ScalarType);
94  itkGetMacro(Alpha, ScalarType);
95 
98  itkSetEnumMacro(Enhancement, EnhancementType);
99  itkGetEnumMacro(Enhancement, EnhancementType);
100 
101 protected:
106 
107  ScalarType g_CED(ScalarType s) const {return s<=0 ? m_Alpha : m_Alpha + (1-m_Alpha)*exp(-pow(m_Lambda/s,m_Exponent));}
108  ScalarType g_EED(ScalarType s) const {return s<=0 ? 1 : 1 - (1-m_Alpha)*exp(-pow(m_Lambda/s,m_Exponent));}
109 
111 };
112 
113 } // end namespace itk
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 #include "itkCoherenceEnhancingDiffusionImageFilter.hxx"
117 #endif
118 
119 #endif
Light weight base class for most itk classes.
virtual EigenValuesArrayType EigenValuesTransform(const EigenValuesArrayType &) const
Simulate a standard C array with copy semnatics.
Definition: itkFixedArray.h:50
Coherence enhanging diffusion and edge enhancing diffusion.
Non-linear anisotropic diffusion using lattice basis reduction.
AnisotropicDiffusionLBRImageFilter< TImage, TScalar > Superclass