ITK  5.3.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  * 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 itkNormalVectorFunctionBase_h
19 #define itkNormalVectorFunctionBase_h
20 
22 
23 namespace itk
24 {
51 template <typename TSparseImageType>
52 class ITK_TEMPLATE_EXPORT NormalVectorFunctionBase : public FiniteDifferenceSparseImageFunction<TSparseImageType>
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(NormalVectorFunctionBase);
56 
62 
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  {}
96 
98  TimeStepType
99  ComputeGlobalTimeStep(void *) const override
100  {
101  return m_TimeStep;
102  }
103 
105  void
106  SetTimeStep(const TimeStepType & ts)
107  {
108  m_TimeStep = ts;
109  }
110 
112  TimeStepType
113  GetTimeStep() const
114  {
115  return m_TimeStep;
116  }
117 
118 protected:
120  ~NormalVectorFunctionBase() override = default;
121  void
122  PrintSelf(std::ostream & os, Indent indent) const override;
123 
124 private:
126  TimeStepType m_TimeStep;
127 };
128 } // end namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 # include "itkNormalVectorFunctionBase.hxx"
132 #endif
133 
134 #endif
itk::NormalVectorFunctionBase::NormalVectorType
typename NodeType::NodeDataType NormalVectorType
Definition: itkNormalVectorFunctionBase.h:84
itk::FiniteDifferenceFunction< TSparseImageType >::RadiusType
typename ConstNeighborhoodIterator< TSparseImageType >::RadiusType RadiusType
Definition: itkFiniteDifferenceFunction.h:97
itk::NormalVectorFunctionBase::ComputeGlobalTimeStep
TimeStepType ComputeGlobalTimeStep(void *) const override
Definition: itkNormalVectorFunctionBase.h:99
itk::FiniteDifferenceSparseImageFunction
This is the base class for function classes that can be used with filters derived from FiniteDifferen...
Definition: itkFiniteDifferenceSparseImageFunction.h:47
itk::NormalVectorFunctionBase::GetTimeStep
TimeStepType GetTimeStep() const
Definition: itkNormalVectorFunctionBase.h:113
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::NormalVectorFunctionBase::SetTimeStep
void SetTimeStep(const TimeStepType &ts)
Definition: itkNormalVectorFunctionBase.h:106
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkFiniteDifferenceSparseImageFunction.h
itk::NormalVectorFunctionBase
This class defines the common functionality for Sparse Image neighborhoods of unit vectors.
Definition: itkNormalVectorFunctionBase.h:52
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::NormalVectorFunctionBase::GetGlobalDataPointer
void * GetGlobalDataPointer() const override
Definition: itkNormalVectorFunctionBase.h:88
itk::NormalVectorFunctionBase::ReleaseGlobalDataPointer
void ReleaseGlobalDataPointer(void *) const override
Definition: itkNormalVectorFunctionBase.h:93
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::NormalVectorFunctionBase::m_TimeStep
TimeStepType m_TimeStep
Definition: itkNormalVectorFunctionBase.h:126
itk::NormalVectorFunctionBase::NodeValueType
typename NodeType::NodeValueType NodeValueType
Definition: itkNormalVectorFunctionBase.h:81
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:51
itk::FiniteDifferenceSparseImageFunction::NodeType
typename SparseImageType::NodeType NodeType
Definition: itkFiniteDifferenceSparseImageFunction.h:76
itk::FiniteDifferenceFunction< TSparseImageType >
itk::FiniteDifferenceFunction< TSparseImageType >::TimeStepType
double TimeStepType
Definition: itkFiniteDifferenceFunction.h:90