ITK  5.1.0
Insight 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 {
94 template <typename TInputImage, typename TOutputImage>
95 class ITK_TEMPLATE_EXPORT CurvatureFlowImageFilter : public DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
96 {
97 public:
98  ITK_DISALLOW_COPY_AND_ASSIGN(CurvatureFlowImageFilter);
99 
105 
107  itkNewMacro(Self);
108 
111 
113  using InputImageType = typename Superclass::InputImageType;
114 
116  using OutputImageType = typename Superclass::OutputImageType;
117  using OutputImagePointer = typename OutputImageType::Pointer;
118 
120  using FiniteDifferenceFunctionType = typename Superclass::FiniteDifferenceFunctionType;
121 
124 
127  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
128 
131  using PixelType = typename Superclass::PixelType;
132 
135 
137  itkSetMacro(TimeStep, TimeStepType);
138 
140  itkGetConstMacro(TimeStep, TimeStepType);
141 
142 #ifdef ITK_USE_CONCEPT_CHECKING
143  // Begin concept checking
144  itkConceptMacro(DoubleConvertibleToOutputCheck, (Concept::Convertible<double, PixelType>));
145  itkConceptMacro(OutputConvertibleToDoubleCheck, (Concept::Convertible<PixelType, double>));
146  itkConceptMacro(OutputDivisionOperatorsCheck, (Concept::DivisionOperators<PixelType>));
147  itkConceptMacro(DoubleOutputMultiplyOperatorCheck, (Concept::MultiplyOperator<double, PixelType, PixelType>));
150  itkConceptMacro(OutputDoubleAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType, double>));
151  // End concept checking
152 #endif
153 
154 protected:
156  ~CurvatureFlowImageFilter() override = default;
157  void
158  PrintSelf(std::ostream & os, Indent indent) const override;
159 
162  bool
163  Halt() override
164  {
165  if (this->GetElapsedIterations() == this->GetNumberOfIterations())
166  {
167  return true;
168  }
169  else
170  {
171  return false;
172  }
173  }
175 
178  void
179  InitializeIteration() override;
180 
184  void
185  EnlargeOutputRequestedRegion(DataObject *) override;
186 
190  void
191  GenerateInputRequestedRegion() override;
192 
193 private:
195 };
196 } // namespace itk
197 
198 #ifndef ITK_MANUAL_INSTANTIATION
199 # include "itkCurvatureFlowImageFilter.hxx"
200 #endif
201 
202 #endif
itk::CurvatureFlowImageFilter
Denoise an image using curvature driven flow.
Definition: itkCurvatureFlowImageFilter.h:95
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:163
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:43
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:471
itk::Concept::MultiplyOperator
Definition: itkConceptChecking.h:417
itkDenseFiniteDifferenceImageFilter.h
itk::Concept::AdditiveOperators
Definition: itkConceptChecking.h:356
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:135
itk::Concept::Convertible
Definition: itkConceptChecking.h:214
itk::CurvatureFlowImageFilter::m_TimeStep
TimeStepType m_TimeStep
Definition: itkCurvatureFlowImageFilter.h:194
itk::DenseFiniteDifferenceImageFilter::PixelType
typename Superclass::PixelType PixelType
Definition: itkDenseFiniteDifferenceImageFilter.h:96
itk::Concept::LessThanComparable
Definition: itkConceptChecking.h:260
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:288