#ifndef __CPM__ALGORITHMS__SIMPLEX__INTERNALFORCEFUNCTION__H__ #define __CPM__ALGORITHMS__SIMPLEX__INTERNALFORCEFUNCTION__H__ #include #include namespace cpm { namespace Algorithms { namespace Simplex { /** */ template< class M > class InternalForceFunction : public cpm::Algorithms::Base::ForceFunction< M > { public: typedef InternalForceFunction Self; typedef cpm::Algorithms::Base::ForceFunction< M > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename Superclass::TMesh TMesh; typedef typename Superclass::TPointId TPointId; typedef typename Superclass::TVector TVector; typedef typename TVector::ValueType TScalar; enum PhiConstraint { C0 = 0, C1, C2, C3 }; public: itkNewMacro( Self ); itkTypeMacro( InternalForceFunction, ForceFunction ); public: virtual TVector Evaluate( const TPointId& pId ) const; virtual void SetMesh( const M* m ); void SetPhiConstraintToC0( ); void SetPhiConstraintToC1( ); void SetPhiConstraintToC2( const unsigned int& neigh_order = 1 ); void SetPhiConstraintToC3( ); protected: InternalForceFunction( ); virtual ~InternalForceFunction( ); TScalar _ComputeMeanPhi( const TPointId& pId ) const; static TScalar _L( const TScalar& delta, const TScalar& d, const TScalar& phi ); private: // Purposely not implemented InternalForceFunction( const Self& ); Self& operator=( const Self& ); protected: PhiConstraint m_PhiConstraint; unsigned int m_NeighborhoodOrder; std::vector< TScalar > m_InitialPhiAngles; }; } // ecapseman } // ecapseman } // ecapseman #include #endif // __CPM__ALGORITHMS__SIMPLEX__INTERNALFORCEFUNCTION__H__ // eof - $RCSfile$