ITK  6.0.0
Insight Toolkit
itkSphereSignedDistanceFunction.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 itkSphereSignedDistanceFunction_h
19#define itkSphereSignedDistanceFunction_h
20
22#include "itkVector.h"
23
24namespace itk
25{
44template <typename TCoordinate, unsigned int VSpaceDimension>
45class ITK_TEMPLATE_EXPORT SphereSignedDistanceFunction
46 : public ShapeSignedDistanceFunction<TCoordinate, VSpaceDimension>
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(SphereSignedDistanceFunction);
50
56
58 itkOverrideGetNameOfClassMacro(SphereSignedDistanceFunction);
59
61 itkNewMacro(Self);
62
64 using typename Superclass::OutputType;
65
67 using typename Superclass::InputType;
68
70 static constexpr unsigned int SpaceDimension = Superclass::SpaceDimension;
71
73 using typename Superclass::CoordinateType;
74
76 using typename Superclass::PointType;
77
79 using typename Superclass::ParametersType;
80
83 void
84 SetParameters(const ParametersType &) override;
85
86 unsigned int
88 {
89 return 1;
90 }
91 unsigned int
93 {
94 return SpaceDimension;
95 }
96
98 OutputType
99 Evaluate(const PointType & point) const override;
100
101protected:
103 ~SphereSignedDistanceFunction() override = default;
104
105 void
106 PrintSelf(std::ostream & os, Indent indent) const override;
107
108private:
110
111 VectorType m_Translation{};
112 double m_Radius{};
113};
114} // end namespace itk
115
116#ifndef ITK_MANUAL_INSTANTIATION
117# include "itkSphereSignedDistanceFunction.hxx"
118#endif
119
120#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.
Compute the signed distance from a N-dimensional sphere.
~SphereSignedDistanceFunction() override=default
void SetParameters(const ParametersType &) override
void PrintSelf(std::ostream &os, Indent indent) const override
unsigned int GetNumberOfPoseParameters() const override
OutputType Evaluate(const PointType &point) const override
unsigned int GetNumberOfShapeParameters() const override
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