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 TCoordRep, unsigned int VSpaceDimension>
45class ITK_TEMPLATE_EXPORT SphereSignedDistanceFunction : public ShapeSignedDistanceFunction<TCoordRep, VSpaceDimension>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(SphereSignedDistanceFunction);
49
55
57 itkOverrideGetNameOfClassMacro(SphereSignedDistanceFunction);
58
60 itkNewMacro(Self);
61
63 using typename Superclass::OutputType;
64
66 using typename Superclass::InputType;
67
69 static constexpr unsigned int SpaceDimension = Superclass::SpaceDimension;
70
72 using typename Superclass::CoordRepType;
73
75 using typename Superclass::PointType;
76
78 using typename Superclass::ParametersType;
79
82 void
83 SetParameters(const ParametersType &) override;
84
85 unsigned int
87 {
88 return 1;
89 }
90 unsigned int
92 {
93 return SpaceDimension;
94 }
95
97 OutputType
98 Evaluate(const PointType & point) const override;
99
100protected:
102 ~SphereSignedDistanceFunction() override = default;
103
104 void
105 PrintSelf(std::ostream & os, Indent indent) const override;
106
107private:
109
110 VectorType m_Translation{};
111 double m_Radius{};
112};
113} // end namespace itk
114
115#ifndef ITK_MANUAL_INSTANTIATION
116# include "itkSphereSignedDistanceFunction.hxx"
117#endif
118
119#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.
unsigned int GetNumberOfPoseParameters() const override
void PrintSelf(std::ostream &os, Indent indent) const override
~SphereSignedDistanceFunction() override=default
OutputType Evaluate(const PointType &point) const override
void SetParameters(const ParametersType &) 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