ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkShapeSignedDistanceFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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"
22 #include "itkOptimizerParameters.h"
23 
24 namespace itk
25 {
51 template< typename TCoordRep, unsigned int VSpaceDimension >
53  public SpatialFunction< double, VSpaceDimension, Point< TCoordRep, VSpaceDimension > >
54 {
55 public:
58  typedef SpatialFunction< double, VSpaceDimension,
60 
63 
66 
68  typedef typename Superclass::OutputType OutputType;
69 
71  typedef typename Superclass::InputType InputType;
72 
74  itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension);
75 
77  typedef TCoordRep CoordRepType;
78 
81 
84 
86  virtual void SetParameters(const ParametersType &) = 0;
87 
88  virtual ParametersType & GetParameters(void)
89  { return m_Parameters; }
90  virtual unsigned int GetNumberOfShapeParameters(void) const = 0;
91 
92  virtual unsigned int GetNumberOfPoseParameters(void) const = 0;
93 
94  virtual unsigned int GetNumberOfParameters(void) const
95  { return this->GetNumberOfShapeParameters() + this->GetNumberOfPoseParameters(); }
96 
98  virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE = 0;
99 
102  virtual void Initialize() {}
103 
104 protected:
105 
107 
109 
110  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
111  {
112  Superclass::PrintSelf(os, indent);
113 //FIX os << indent << "Parameters: " << m_Parameters << std::endl;
114  }
115 
117 
118 private:
119  ITK_DISALLOW_COPY_AND_ASSIGN(ShapeSignedDistanceFunction);
120 };
121 } // end namespace itk
122 
123 #endif
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetParameters(const ParametersType &)=0
OptimizerParameters< double > ParametersType
Base class for functions which evaluates the signed distance from a shape.
virtual unsigned int GetNumberOfPoseParameters(void) const =0
virtual OutputType Evaluate(const PointType &point) const override=0
virtual unsigned int GetNumberOfParameters(void) const
SpatialFunction< double, VSpaceDimension, Point< TCoordRep, VSpaceDimension > > Superclass
virtual ParametersType & GetParameters(void)
virtual unsigned int GetNumberOfShapeParameters(void) const =0
Control indentation during Print() invocation.
Definition: itkIndent.h:49
N-dimensional spatial function class.
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52