ITK  6.0.0
Insight Toolkit
itkNormalVectorFunctionBase.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 itkNormalVectorFunctionBase_h
19#define itkNormalVectorFunctionBase_h
20
22
23namespace itk
24{
51template <typename TSparseImageType>
52class ITK_TEMPLATE_EXPORT NormalVectorFunctionBase : public FiniteDifferenceSparseImageFunction<TSparseImageType>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(NormalVectorFunctionBase);
56
62
64 itkOverrideGetNameOfClassMacro(NormalVectorFunctionBase);
65
67 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
68
70 using typename Superclass::TimeStepType;
71 using typename Superclass::RadiusType;
72 using typename Superclass::NeighborhoodType;
73 using typename Superclass::FloatOffsetType;
74 using typename Superclass::IndexType;
75 using typename Superclass::SparseImageType;
76
78 using NodeType = typename SparseImageType::NodeType;
79
81 using NodeValueType = typename NodeType::NodeValueType;
82
84 using NormalVectorType = typename NodeType::NodeDataType;
85
87 void *
88 GetGlobalDataPointer() const override
89 {
90 return nullptr;
91 }
92 void
93 ReleaseGlobalDataPointer(void *) const override
94 {}
98 TimeStepType
99 ComputeGlobalTimeStep(void *) const override
100 {
101 return m_TimeStep;
102 }
103
105 void
107 {
108 m_TimeStep = ts;
109 }
110
112 TimeStepType
114 {
115 return m_TimeStep;
116 }
117
118protected:
120 ~NormalVectorFunctionBase() override = default;
121 void
122 PrintSelf(std::ostream & os, Indent indent) const override;
123
124private:
126 TimeStepType m_TimeStep{};
127};
128} // end namespace itk
129
130#ifndef ITK_MANUAL_INSTANTIATION
131# include "itkNormalVectorFunctionBase.hxx"
132#endif
133
134#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename ConstNeighborhoodIterator< TSparseImageType >::RadiusType RadiusType
This is the base class for function classes that can be used with filters derived from FiniteDifferen...
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
This class defines the common functionality for Sparse Image neighborhoods of unit vectors.
void ReleaseGlobalDataPointer(void *) const override
typename NodeType::NodeValueType NodeValueType
typename NodeType::NodeDataType NormalVectorType
~NormalVectorFunctionBase() override=default
void * GetGlobalDataPointer() const override
void SetTimeStep(const TimeStepType &ts)
void PrintSelf(std::ostream &os, Indent indent) const override
TimeStepType ComputeGlobalTimeStep(void *) const override
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....