ITK  5.4.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 TCoordRep, unsigned int VSpaceDimension>
45 class ITK_TEMPLATE_EXPORT SphereSignedDistanceFunction : public ShapeSignedDistanceFunction<TCoordRep, VSpaceDimension>
46 {
47 public:
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
86  GetNumberOfShapeParameters() const override
87  {
88  return 1;
89  }
90  unsigned int
91  GetNumberOfPoseParameters() const override
92  {
93  return SpaceDimension;
94  }
95 
97  OutputType
98  Evaluate(const PointType & point) const override;
99 
100 protected:
102  ~SphereSignedDistanceFunction() override = default;
103 
104  void
105  PrintSelf(std::ostream & os, Indent indent) const override;
106 
107 private:
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
itk::OptimizerParameters< double >
itkShapeSignedDistanceFunction.h
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::Vector< CoordRepType, 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:86
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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkVector.h
itk::SphereSignedDistanceFunction::GetNumberOfPoseParameters
unsigned int GetNumberOfPoseParameters() const override
Definition: itkSphereSignedDistanceFunction.h:91