ITK  6.0.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 * https://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
24namespace itk
25{
95template <typename TInputImage, typename TOutputImage>
96class ITK_TEMPLATE_EXPORT CurvatureFlowImageFilter : public DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
97{
98public:
99 ITK_DISALLOW_COPY_AND_MOVE(CurvatureFlowImageFilter);
107
109 itkNewMacro(Self);
110
112 itkOverrideGetNameOfClassMacro(CurvatureFlowImageFilter);
113
115 using typename Superclass::InputImageType;
116
118 using typename Superclass::OutputImageType;
120
122 using typename Superclass::FiniteDifferenceFunctionType;
123
126
129 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
130
133 using typename Superclass::PixelType;
134
136 using typename Superclass::TimeStepType;
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>));
152 itkConceptMacro(OutputDoubleAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType, double>));
153 // End concept checking
154#endif
155
156protected:
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 }
180 void
182
186 void
188
192 void
194
195private:
196 TimeStepType m_TimeStep{};
197};
198} // namespace itk
199
200#ifndef ITK_MANUAL_INSTANTIATION
201# include "itkCurvatureFlowImageFilter.hxx"
202#endif
203
204#endif
This class encapsulate the finite difference equation which drives a curvature flow denoising algorit...
Denoise an image using curvature driven flow.
void PrintSelf(std::ostream &os, Indent indent) const override
void EnlargeOutputRequestedRegion(DataObject *) override
void InitializeIteration() override
~CurvatureFlowImageFilter() override=default
void GenerateInputRequestedRegion() override
Base class for all data objects in ITK.
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Base class for all process objects that output image data.
typename OutputImageType::Pointer OutputImagePointer
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....