ITK  5.2.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 
74  using IndexType = typename Superclass::IndexType;
75  using SparseImageType = 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
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:
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::FiniteDifferenceSparseImageFunction::FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
Definition: itkFiniteDifferenceSparseImageFunction.h:69
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::FiniteDifferenceSparseImageFunction::NeighborhoodType
typename Superclass::NeighborhoodType NeighborhoodType
Definition: itkFiniteDifferenceSparseImageFunction.h:68
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::FiniteDifferenceSparseImageFunction::IndexType
typename SparseImageType::IndexType IndexType
Definition: itkFiniteDifferenceSparseImageFunction.h:73
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::FiniteDifferenceSparseImageFunction::TimeStepType
typename Superclass::TimeStepType TimeStepType
Definition: itkFiniteDifferenceSparseImageFunction.h:66
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::FiniteDifferenceSparseImageFunction::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkFiniteDifferenceSparseImageFunction.h:67
itk::FiniteDifferenceFunction< TSparseImageType >
itk::FiniteDifferenceSparseImageFunction::SparseImageType
typename Superclass::ImageType SparseImageType
Definition: itkFiniteDifferenceSparseImageFunction.h:70