ITK  6.0.0
Insight Toolkit
itkShapeSignedDistanceFunction.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 itkShapeSignedDistanceFunction_h
19#define itkShapeSignedDistanceFunction_h
20
21#include "itkSpatialFunction.h"
23
24namespace itk
25{
52template <typename TCoordRep, unsigned int VSpaceDimension>
53class ITK_TEMPLATE_EXPORT ShapeSignedDistanceFunction
54 : public SpatialFunction<double, VSpaceDimension, Point<TCoordRep, VSpaceDimension>>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(ShapeSignedDistanceFunction);
58
62
65
67 itkOverrideGetNameOfClassMacro(ShapeSignedDistanceFunction);
68
70 using typename Superclass::OutputType;
71
73 using typename Superclass::InputType;
74
76 static constexpr unsigned int SpaceDimension = VSpaceDimension;
77
79 using CoordRepType = TCoordRep;
80
83
86
88 virtual void
90
91 virtual ParametersType &
93 {
94 return m_Parameters;
95 }
96 virtual unsigned int
98
99 virtual unsigned int
101
102 virtual unsigned int
104 {
105 return this->GetNumberOfShapeParameters() + this->GetNumberOfPoseParameters();
106 }
107
109 OutputType
110 Evaluate(const PointType & point) const override = 0;
111
114 virtual void
116 {}
117
118protected:
120
121 ~ShapeSignedDistanceFunction() override = default;
122
123 void
124 PrintSelf(std::ostream & os, Indent indent) const override
125 {
126 Superclass::PrintSelf(os, indent);
127 // FIX os << indent << "Parameters: " << m_Parameters << std::endl;
128 }
129
130 ParametersType m_Parameters{};
131};
132} // end namespace itk
133
134#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
Base class for functions which evaluates the signed distance from a shape.
virtual void SetParameters(const ParametersType &)=0
virtual unsigned int GetNumberOfPoseParameters() const =0
void PrintSelf(std::ostream &os, Indent indent) const override
virtual unsigned int GetNumberOfShapeParameters() const =0
~ShapeSignedDistanceFunction() override=default
OutputType Evaluate(const PointType &point) const override=0
virtual unsigned int GetNumberOfParameters() const
N-dimensional spatial function class.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents