ITK  6.0.0
Insight Toolkit
itkFiniteDifferenceFunction.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 itkFiniteDifferenceFunction_h
19#define itkFiniteDifferenceFunction_h
20
21#include "itkLightObject.h"
23#include "itkVector.h"
24
25namespace itk
26{
65template <typename TImageType>
66class ITK_TEMPLATE_EXPORT FiniteDifferenceFunction : public LightObject
67{
68public:
69 ITK_DISALLOW_COPY_AND_MOVE(FiniteDifferenceFunction);
77
79 itkOverrideGetNameOfClassMacro(FiniteDifferenceFunction);
80
82 using ImageType = TImageType;
83 using PixelType = typename ImageType::PixelType;
84 using PixelRealType = double;
85
87 static constexpr unsigned int ImageDimension = ImageType::ImageDimension;
88
90 using TimeStepType = double;
91
95
98
102
106
110
120 virtual void
122 {}
123
137 virtual PixelType
138 ComputeUpdate(const NeighborhoodType & neighborhood,
139 void * globalData,
140 const FloatOffsetType & offset = FloatOffsetType(0.0)) = 0;
141
142
145 void
147
150 const RadiusType &
151 GetRadius() const;
152
156 void
157 SetScaleCoefficients(const PixelRealType vals[ImageDimension]);
158
160 void
161 GetScaleCoefficients(PixelRealType vals[ImageDimension]) const;
162
168
175 virtual TimeStepType
176 ComputeGlobalTimeStep(void * GlobalData) const = 0;
177
185 virtual void *
187
193 virtual void
194 ReleaseGlobalDataPointer(void * GlobalData) const = 0;
195
196protected:
198 ~FiniteDifferenceFunction() override = default;
199
200 void
201 PrintSelf(std::ostream & os, Indent indent) const override;
202
203 RadiusType m_Radius{};
204 PixelRealType m_ScaleCoefficients[ImageDimension]{};
205};
206} // end namespace itk
207
208#ifndef ITK_MANUAL_INSTANTIATION
209# include "itkFiniteDifferenceFunction.hxx"
210#endif
211
212#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
virtual void * GetGlobalDataPointer() const =0
const NeighborhoodScalesType ComputeNeighborhoodScales() const
const RadiusType & GetRadius() const
virtual void ReleaseGlobalDataPointer(void *GlobalData) const =0
typename ImageType::PixelType PixelType
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0))=0
void GetScaleCoefficients(PixelRealType vals[ImageDimension]) const
~FiniteDifferenceFunction() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const =0
void SetScaleCoefficients(const PixelRealType vals[ImageDimension])
void SetRadius(const RadiusType &r)
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....