ITK  4.6.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 = 0;
99 
102  virtual void Initialize()
103  throw ( ExceptionObject ) {}
104 
105 protected:
106 
108 
110 
111  void PrintSelf(std::ostream & os, Indent indent) const
112  {
113  Superclass::PrintSelf(os, indent);
114 //FIX os << indent << "Parameters: " << m_Parameters << std::endl;
115  }
116 
118 
119 private:
120  ShapeSignedDistanceFunction(const Self &); //purposely not implemented
121  void operator=(const Self &); //purposely not implemented
122 };
123 } // end namespace itk
124 
125 #endif
Light weight base class for most itk classes.
void PrintSelf(std::ostream &os, Indent indent) const
virtual OutputType Evaluate(const PointType &point) const =0
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 unsigned int GetNumberOfParameters(void) const
SpatialFunction< double, VSpaceDimension, Point< TCoordRep, VSpaceDimension > > Superclass
virtual ParametersType & GetParameters(void)
Standard exception handling object.
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:51