ITK  5.2.0
Insight Toolkit
itkCurvatureFlowImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 {
95 template <typename TInputImage, typename TOutputImage>
96 class ITK_TEMPLATE_EXPORT CurvatureFlowImageFilter : public DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
97 {
98 public:
99  ITK_DISALLOW_COPY_AND_MOVE(CurvatureFlowImageFilter);
101 
107 
109  itkNewMacro(Self);
110 
113 
115  using InputImageType = typename Superclass::InputImageType;
116 
118  using OutputImageType = typename Superclass::OutputImageType;
119  using OutputImagePointer = typename OutputImageType::Pointer;
120 
122  using FiniteDifferenceFunctionType = typename Superclass::FiniteDifferenceFunctionType;
123 
126 
129  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
130 
133  using PixelType = typename Superclass::PixelType;
134 
137 
139  itkSetMacro(TimeStep, TimeStepType);
140 
142  itkGetConstMacro(TimeStep, TimeStepType);
143 
144 #ifdef ITK_USE_CONCEPT_CHECKING
145  // Begin concept checking
146  itkConceptMacro(DoubleConvertibleToOutputCheck, (Concept::Convertible<double, PixelType>));
147  itkConceptMacro(OutputConvertibleToDoubleCheck, (Concept::Convertible<PixelType, double>));
148  itkConceptMacro(OutputDivisionOperatorsCheck, (Concept::DivisionOperators<PixelType>));
149  itkConceptMacro(DoubleOutputMultiplyOperatorCheck, (Concept::MultiplyOperator<double, PixelType, PixelType>));
152  itkConceptMacro(OutputDoubleAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType, double>));
153  // End concept checking
154 #endif
155 
156 protected:
158  ~CurvatureFlowImageFilter() override = default;
159  void
160  PrintSelf(std::ostream & os, Indent indent) const override;
161 
164  bool
165  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
181  InitializeIteration() override;
182 
186  void
187  EnlargeOutputRequestedRegion(DataObject *) override;
188 
192  void
193  GenerateInputRequestedRegion() override;
194 
195 private:
197 };
198 } // namespace itk
199 
200 #ifndef ITK_MANUAL_INSTANTIATION
201 # include "itkCurvatureFlowImageFilter.hxx"
202 #endif
203 
204 #endif
itk::CurvatureFlowImageFilter
Denoise an image using curvature driven flow.
Definition: itkCurvatureFlowImageFilter.h:96
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::CurvatureFlowImageFilter::Halt
bool Halt() override
Definition: itkCurvatureFlowImageFilter.h:165
itk::DenseFiniteDifferenceImageFilter
Definition: itkDenseFiniteDifferenceImageFilter.h:69
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itkCurvatureFlowFunction.h
itk::CurvatureFlowFunction
This class encapsulate the finite difference equation which drives a curvature flow denoising algorit...
Definition: itkCurvatureFlowFunction.h:44
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::DenseFiniteDifferenceImageFilter::FiniteDifferenceFunctionType
typename Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
Definition: itkDenseFiniteDifferenceImageFilter.h:88
itk::DenseFiniteDifferenceImageFilter::TimeStepType
typename Superclass::TimeStepType TimeStepType
Definition: itkDenseFiniteDifferenceImageFilter.h:99
itk::Concept::DivisionOperators
Definition: itkConceptChecking.h:473
itk::Concept::MultiplyOperator
Definition: itkConceptChecking.h:419
itkDenseFiniteDifferenceImageFilter.h
itk::Concept::AdditiveOperators
Definition: itkConceptChecking.h:358
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::Concept::Convertible
Definition: itkConceptChecking.h:216
itk::CurvatureFlowImageFilter::m_TimeStep
TimeStepType m_TimeStep
Definition: itkCurvatureFlowImageFilter.h:196
itk::DenseFiniteDifferenceImageFilter::PixelType
typename Superclass::PixelType PixelType
Definition: itkDenseFiniteDifferenceImageFilter.h:96
itk::Concept::LessThanComparable
Definition: itkConceptChecking.h:262
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293