ITK  4.2.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 >
52 class ITK_EXPORT ShapeSignedDistanceFunction:
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 protected:
105 
107 
109 
110  void PrintSelf(std::ostream & os, Indent indent) const
111  {
112  Superclass::PrintSelf(os, indent);
113 //FIX os << indent << "Parameters: " << m_Parameters << std::endl;
114  }
115 
117 private:
118  ShapeSignedDistanceFunction(const Self &); //purposely not implemented
119  void operator=(const Self &); //purposely not implemented
120 };
121 } // end namespace itk
122 
123 #endif
124