1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Image__MinimumSpanningTree__h__
7 #define __fpa__Image__MinimumSpanningTree__h__
9 #include <fpa/Base/MinimumSpanningTree.h>
18 template< unsigned int _VDim >
19 class MinimumSpanningTree
20 : public fpa::Base::MinimumSpanningTree< itk::Index< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > >
23 typedef itk::Index< _VDim > TVertex;
24 typedef itk::Image< itk::Offset< _VDim >, _VDim > TBaseImage;
26 typedef MinimumSpanningTree Self;
27 typedef itk::SmartPointer< Self > Pointer;
28 typedef itk::SmartPointer< const Self > ConstPointer;
29 typedef fpa::Base::MinimumSpanningTree< TVertex, TBaseImage > Superclass;
31 typedef typename Superclass::TCollision TCollision;
32 typedef typename Superclass::TCollisionsRow TCollisionsRow;
33 typedef typename Superclass::TCollisions TCollisions;
34 typedef typename Superclass::TVertices TVertices;
39 fpa::Image::MinimumSpanningTree,
40 fpa::Base::MinimumSpanningTree
44 virtual TVertex GetParent( const TVertex& v ) const override
46 return( v + this->GetPixel( v ) );
48 virtual void SetParent( const TVertex& v, const TVertex& p ) override
50 this->SetPixel( v, p - v );
54 MinimumSpanningTree( )
57 virtual ~MinimumSpanningTree( )
61 MinimumSpanningTree( const Self& other );
62 Self& operator=( const Self& other );
69 #endif // __fpa__Image__MinimumSpanningTree__h__