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 
24 namespace itk
25 {
44 template <typename TCoordinate, unsigned int VSpaceDimension>
45 class ITK_TEMPLATE_EXPORT SphereSignedDistanceFunction
46  : public ShapeSignedDistanceFunction<TCoordinate, VSpaceDimension>
47 {
48 public:
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
87  GetNumberOfShapeParameters() const override
88  {
89  return 1;
90  }
91  unsigned int
92  GetNumberOfPoseParameters() const override
93  {
94  return SpaceDimension;
95  }
96 
98  OutputType
99  Evaluate(const PointType & point) const override;
100 
101 protected:
103  ~SphereSignedDistanceFunction() override = default;
104 
105  void
106  PrintSelf(std::ostream & os, Indent indent) const override;
107 
108 private:
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
itk::OptimizerParameters< double >
itkShapeSignedDistanceFunction.h
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::Vector< CoordinateType, Self::SpaceDimension >
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::SphereSignedDistanceFunction::GetNumberOfShapeParameters
unsigned int GetNumberOfShapeParameters() const override
Definition: itkSphereSignedDistanceFunction.h:87
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::ShapeSignedDistanceFunction
Base class for functions which evaluates the signed distance from a shape.
Definition: itkShapeSignedDistanceFunction.h:53
itk::SphereSignedDistanceFunction
Compute the signed distance from a N-dimensional sphere.
Definition: itkSphereSignedDistanceFunction.h:45
itk::point
*par Constraints *The filter requires an 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
itk::SphereSignedDistanceFunction::GetNumberOfPoseParameters
unsigned int GetNumberOfPoseParameters() const override
Definition: itkSphereSignedDistanceFunction.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkVector.h