ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkAnisotropicDiffusionImageFilter.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 #ifndef itkAnisotropicDiffusionImageFilter_h
19 #define itkAnisotropicDiffusionImageFilter_h
20 
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
72 template< typename TInputImage, typename TOutputImage >
73 class ITK_TEMPLATE_EXPORT AnisotropicDiffusionImageFilter:
74  public DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >
75 {
76 public:
82 
86 
88  typedef typename Superclass::InputImageType InputImageType;
89  typedef typename Superclass::OutputImageType OutputImageType;
90  typedef typename Superclass::UpdateBufferType UpdateBufferType;
91 
94  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
95 
98  typedef typename Superclass::PixelType PixelType;
100 
102  itkSetMacro(TimeStep, TimeStepType);
103  itkGetConstMacro(TimeStep, TimeStepType);
105 
108  itkSetMacro(ConductanceParameter, double);
109  itkGetConstMacro(ConductanceParameter, double);
111 
114  itkSetMacro(ConductanceScalingUpdateInterval, unsigned int);
115  itkGetConstMacro(ConductanceScalingUpdateInterval, unsigned int);
117 
120  itkSetMacro(ConductanceScalingParameter, double);
121  itkGetConstMacro(ConductanceScalingParameter, double);
123 
132  {
133  m_FixedAverageGradientMagnitude = a;
134  this->Modified();
135  m_GradientMagnitudeIsFixed = true;
136  }
138 
139  itkGetConstMacro(FixedAverageGradientMagnitude, double);
140 
141 protected:
144  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
145 
148  // virtual bool Halt();
149 
151  virtual void InitializeIteration() ITK_OVERRIDE;
152 
153  bool m_GradientMagnitudeIsFixed;
154 
155 private:
156  ITK_DISALLOW_COPY_AND_ASSIGN(AnisotropicDiffusionImageFilter);
157 
158  double m_ConductanceParameter;
159  double m_ConductanceScalingParameter;
160  unsigned int m_ConductanceScalingUpdateInterval;
161  double m_FixedAverageGradientMagnitude;
162 
163  TimeStepType m_TimeStep;
164 };
165 } // end namspace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 #include "itkAnisotropicDiffusionImageFilter.hxx"
169 #endif
170 
171 #endif
DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49