ITK  5.0.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:
94  ITK_DISALLOW_COPY_AND_ASSIGN(CurvatureFlowImageFilter);
95 
101 
103  itkNewMacro(Self);
104 
106  itkTypeMacro(CurvatureFlowImageFilter,
108 
110  using InputImageType = typename Superclass::InputImageType;
111 
113  using OutputImageType = typename Superclass::OutputImageType;
114  using OutputImagePointer = typename OutputImageType::Pointer;
115 
117  using FiniteDifferenceFunctionType = typename Superclass::FiniteDifferenceFunctionType;
118 
121 
124  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
125 
128  using PixelType = typename Superclass::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() override = default;
161  void PrintSelf(std::ostream & os, Indent indent) const override;
162 
165  bool Halt() override
166  {
167  if ( this->GetElapsedIterations() == this->GetNumberOfIterations() )
168  {
169  return true;
170  }
171  else
172  {
173  return false;
174  }
175  }
177 
180  void InitializeIteration() override;
181 
185  void EnlargeOutputRequestedRegion(DataObject *) override;
186 
190  void GenerateInputRequestedRegion() override;
191 
192 private:
194 };
195 } // end namspace itk
196 
197 #ifndef ITK_MANUAL_INSTANTIATION
198 #include "itkCurvatureFlowImageFilter.hxx"
199 #endif
200 
201 #endif
typename OutputImageType::Pointer OutputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
TOutputImage OutputImageType
This class encapsulate the finite difference equation which drives a curvature flow denoising algorit...
typename Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Denoise an image using curvature driven flow.
Base class for all data objects in ITK.