00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef _itkShapeSignedDistanceFunction_h
00018
#define _itkShapeSignedDistanceFunction_h
00019
00020
#include "itkSpatialFunction.h"
00021
#include "itkArray.h"
00022
00023
namespace itk
00024 {
00025
00049
template <
typename TCoordRep,
unsigned int VSpaceDimension>
00050 class ITK_EXPORT ShapeSignedDistanceFunction :
00051
public SpatialFunction< double, VSpaceDimension, Point<TCoordRep,VSpaceDimension> >
00052 {
00053
public:
00055 typedef ShapeSignedDistanceFunction
Self;
00056
typedef SpatialFunction<
double, VSpaceDimension,
00057 Point<TCoordRep,VSpaceDimension> >
Superclass;
00058 typedef SmartPointer<Self> Pointer;
00059 typedef SmartPointer<const Self> ConstPointer;
00060
00062
itkTypeMacro(ShapeSignedDistanceFunction,
SpatialFunction);
00063
00065 typedef typename Superclass::OutputType
OutputType;
00066
00068 typedef typename Superclass::InputType
InputType;
00069
00071
itkStaticConstMacro(SpaceDimension,
unsigned int, VSpaceDimension);
00072
00074 typedef TCoordRep
CoordRepType;
00075
00077 typedef InputType PointType;
00078
00080 typedef Array<double> ParametersType;
00081
00083
virtual void SetParameters(
const ParametersType & ) = 0;
00084
virtual const ParametersType& GetParameters(
void) const = 0;
00085 virtual
unsigned int GetNumberOfShapeParameters(
void) const = 0;
00086 virtual
unsigned int GetNumberOfPoseParameters(
void) const = 0;
00087 virtual
unsigned int GetNumberOfParameters(
void)
const
00088
{
return this->GetNumberOfShapeParameters() + this->GetNumberOfPoseParameters(); }
00089
00091
virtual OutputType Evaluate(
const PointType& point )
const = 0;
00092
00095
virtual void Initialize() throw ( ExceptionObject ) {};
00096
00097
protected:
00098
00099 ShapeSignedDistanceFunction()
00100 {
00101
00102 m_Parameters =
ParametersType(1);
00103 m_Parameters.Fill( 0.0 );
00104 };
00105
00106 ~ShapeSignedDistanceFunction(){};
00107
00108
void PrintSelf(std::ostream& os,
Indent indent)
const
00109 {
00110
Superclass::PrintSelf( os, indent );
00111 os << indent <<
"Parameters: " << m_Parameters << std::endl;
00112 }
00113
00114 ParametersType m_Parameters;
00115
00116
private:
00117 ShapeSignedDistanceFunction(
const Self& );
00118
void operator=(
const Self& );
00119
00120 };
00121
00122 }
00123
00124
#endif