#ifndef __fpa__Base__SeedsInterface__hxx__
#define __fpa__Base__SeedsInterface__hxx__
+// -------------------------------------------------------------------------
+template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
+typename
+fpa::Base::SeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
+TSeeds&
+fpa::Base::SeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
+GetSeeds( )
+{
+ return( this->m_Seeds );
+}
+
// -------------------------------------------------------------------------
template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
const typename
);
public:
- virtual TVertex GetParent( const TVertex& v ) const override
- {
- return( v + this->GetPixel( v ) );
- }
- virtual void SetParent( const TVertex& v, const TVertex& p ) override
- {
- this->SetPixel( v, p - v );
- }
-
- void GetPath(
+ virtual TVertex GetParent( const TVertex& v ) const override;
+ virtual void SetParent( const TVertex& v, const TVertex& p ) override;
+
+ void GetPolyLineParametricPath(
typename TPolyLineParametricPath::Pointer& path,
const TVertex& a
) const;
- void GetPath(
+ void GetPolyLineParametricPath(
typename TPolyLineParametricPath::Pointer& path,
const TVertex& a, const TVertex& b
) const;
protected:
- MinimumSpanningTree( )
- : Superclass( )
- { }
- virtual ~MinimumSpanningTree( )
- { }
+ MinimumSpanningTree( );
+ virtual ~MinimumSpanningTree( );
private:
MinimumSpanningTree( const Self& other );
--- /dev/null
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+
+#ifndef __fpa__Image__MinimumSpanningTree__hxx__
+#define __fpa__Image__MinimumSpanningTree__hxx__
+
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+typename fpa::Image::MinimumSpanningTree< _VDim >::
+TVertex fpa::Image::MinimumSpanningTree< _VDim >::
+GetParent( const TVertex& v ) const
+{
+ return( v + this->GetPixel( v ) );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+void fpa::Image::MinimumSpanningTree< _VDim >::
+SetParent( const TVertex& v, const TVertex& p )
+{
+ this->SetPixel( v, p - v );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+void fpa::Image::MinimumSpanningTree< _VDim >::
+GetPolyLineParametricPath(
+ typename TPolyLineParametricPath::Pointer& path,
+ const TVertex& a
+ ) const
+{
+ TVertices v = this->GetPath( a );
+ path = TPolyLineParametricPath::New( );
+ path->SetReferenceImage( this );
+ typename TVertices::const_iterator vIt = v.begin( );
+ for( ; vIt != v.end( ); ++vIt )
+ path->AddVertex( *vIt );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+void fpa::Image::MinimumSpanningTree< _VDim >::
+GetPolyLineParametricPath(
+ typename TPolyLineParametricPath::Pointer& path,
+ const TVertex& a, const TVertex& b
+ ) const
+{
+ TVertices v = this->GetPath( a, b );
+ path = TPolyLineParametricPath::New( );
+ path->SetReferenceImage( this );
+ typename TVertices::const_iterator vIt = v.begin( );
+ for( ; vIt != v.end( ); ++vIt )
+ path->AddVertex( *vIt );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+fpa::Image::MinimumSpanningTree< _VDim >::
+MinimumSpanningTree( )
+ : Superclass( )
+{
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+fpa::Image::MinimumSpanningTree< _VDim >::
+~MinimumSpanningTree( )
+{
+}
+
+#endif // __fpa__Image__MinimumSpanningTree__hxx__
+
+// eof - $RCSfile$