ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkCurvatureFlowImageFilter.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 itkCurvatureFlowImageFilter_h
19 #define itkCurvatureFlowImageFilter_h
20 
23 
24 namespace itk
25 {
89 template< typename TInputImage, typename TOutputImage >
90 class ITK_TEMPLATE_EXPORT CurvatureFlowImageFilter:
91  public DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >
92 {
93 public:
99 
101  itkNewMacro(Self);
102 
104  itkTypeMacro(CurvatureFlowImageFilter,
106 
108  typedef typename Superclass::InputImageType InputImageType;
109 
111  typedef typename Superclass::OutputImageType OutputImageType;
112  typedef typename OutputImageType::Pointer OutputImagePointer;
113 
115  typedef typename Superclass::FiniteDifferenceFunctionType
117 
121 
124  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
125 
128  typedef typename Superclass::PixelType PixelType;
129 
132 
134  itkSetMacro(TimeStep, TimeStepType);
135 
137  itkGetConstMacro(TimeStep, TimeStepType);
138 
139 #ifdef ITK_USE_CONCEPT_CHECKING
140  // Begin concept checking
141  itkConceptMacro( DoubleConvertibleToOutputCheck,
143  itkConceptMacro( OutputConvertibleToDoubleCheck,
145  itkConceptMacro( OutputDivisionOperatorsCheck,
147  itkConceptMacro( DoubleOutputMultiplyOperatorCheck,
149  itkConceptMacro( IntOutputMultiplyOperatorCheck,
151  itkConceptMacro( OutputLessThanDoubleCheck,
153  itkConceptMacro( OutputDoubleAdditiveOperatorsCheck,
155  // End concept checking
156 #endif
157 
158 protected:
160  ~CurvatureFlowImageFilter() ITK_OVERRIDE {}
161  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
162 
165  virtual bool Halt() ITK_OVERRIDE
166  {
167  if ( this->GetElapsedIterations() == this->GetNumberOfIterations() )
168  {
169  return true;
170  }
171  else
172  {
173  return false;
174  }
175  }
177 
180  virtual void InitializeIteration() ITK_OVERRIDE;
181 
185  virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE;
186 
190  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
191 
192 private:
193  ITK_DISALLOW_COPY_AND_ASSIGN(CurvatureFlowImageFilter);
194 
195  TimeStepType m_TimeStep;
196 };
197 } // end namspace itk
198 
199 #ifndef ITK_MANUAL_INSTANTIATION
200 #include "itkCurvatureFlowImageFilter.hxx"
201 #endif
202 
203 #endif
OutputImageType::Pointer OutputImagePointer
Base class for all process objects that output image data.
CurvatureFlowFunction< OutputImageType > CurvatureFlowFunctionType
Superclass::InputImageType InputImageType
Superclass::OutputImageType OutputImageType
This class encapsulate the finite difference equation which drives a curvature flow denoising algorit...
SmartPointer< const Self > ConstPointer
DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Denoise an image using curvature driven flow.
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
Base class for all data objects in ITK.