ITK  4.9.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 >
91  public DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >
92 {
93 public:
99 
101  itkNewMacro(Self);
102 
104  itkTypeMacro(CurvatureFlowImageFilter,
106 
109 
112  typedef typename OutputImageType::Pointer OutputImagePointer;
113 
117 
121 
124  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
125 
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:
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  CurvatureFlowImageFilter(const Self &) ITK_DELETE_FUNCTION;
194  void operator=(const Self &) ITK_DELETE_FUNCTION;
195 
197 };
198 } // end namspace itk
199 
200 #ifndef ITK_MANUAL_INSTANTIATION
201 #include "itkCurvatureFlowImageFilter.hxx"
202 #endif
203 
204 #endif
virtual void GenerateInputRequestedRegion() override
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
OutputImageType::Pointer OutputImagePointer
Base class for all process objects that output image data.
CurvatureFlowFunction< OutputImageType > CurvatureFlowFunctionType
virtual void InitializeIteration() override
Superclass::InputImageType InputImageType
Superclass::OutputImageType OutputImageType
virtual const IdentifierType & GetNumberOfIterations() const
This class encapsulate the finite difference equation which drives a curvature flow denoising algorit...
static const unsigned int ImageDimension
SmartPointer< const Self > ConstPointer
virtual void EnlargeOutputRequestedRegion(DataObject *) override
DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual const IdentifierType & GetElapsedIterations() const
#define itkConceptMacro(name, concept)
Denoise an image using curvature driven flow.
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
Base class for all data objects in ITK.