X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FDataStructures%2FImage%2FSkeleton.h;fp=lib%2Ffpa%2FDataStructures%2FImage%2FSkeleton.h;h=6fbb33dd3f336060e5c8d02509c344fe1b74ecea;hb=2047276c8f1a02432fbcc7014722d460d6c1e60f;hp=0000000000000000000000000000000000000000;hpb=3c639e5da479c7216a0a302ffa156ac6762caeed;p=FrontAlgorithms.git diff --git a/lib/fpa/DataStructures/Image/Skeleton.h b/lib/fpa/DataStructures/Image/Skeleton.h new file mode 100644 index 0000000..6fbb33d --- /dev/null +++ b/lib/fpa/DataStructures/Image/Skeleton.h @@ -0,0 +1,70 @@ +// ========================================================================= +// @author Leonardo Florez Valencia +// @email florez-l@javeriana.edu.co +// ========================================================================= + +#ifndef __fpa__DataStructures__Image__Skeleton__h__ +#define __fpa__DataStructures__Image__Skeleton__h__ + +#include +#include +#include + +namespace fpa +{ + namespace DataStructures + { + namespace Image + { + /** + */ + template< unsigned int _VDim > + class Skeleton + : public fpa::DataStructures::Graph< typename fpa::DataStructures::Image::PolyLineParametricPath< _VDim >::TIndex, typename fpa::DataStructures::Image::PolyLineParametricPath< _VDim >::Pointer, typename fpa::DataStructures::Image::PolyLineParametricPath< _VDim >::TIndex, typename fpa::DataStructures::Image::PolyLineParametricPath< _VDim >::TIndex::LexicographicCompare > + { + public: + typedef fpa::DataStructures::Image::PolyLineParametricPath< _VDim > TPath; + typedef typename TPath::TIndex TIndex; + typedef typename TIndex::LexicographicCompare TIndexCompare; + typedef typename TPath::Pointer TPathPointer; + + itkStaticConstMacro( Dimension, unsigned int, _VDim ); + + typedef fpa::DataStructures::Graph< TIndex, TPathPointer, TIndex, TIndexCompare > Superclass; + typedef Skeleton Self; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + public: + itkNewMacro( Self ); + itkTypeMacro( Skeleton, fpa::Image::Graph ); + + public: + void AddBranch( TPath* path ); + const TPath* GetBranch( const TIndex& a, const TIndex& b ) const; + + std::vector< TIndex > GetEndPoints( ) const; + std::vector< TIndex > GetBifurcations( ) const; + + protected: + Skeleton( ); + virtual ~Skeleton( ); + + private: + // Purposely not implemented + Skeleton( const Self& other ); + Self& operator=( const Self& other ); + }; + + } // ecapseman + + } // ecapseman + +} // ecapseman + +#ifndef ITK_MANUAL_INSTANTIATION +# include +#endif // ITK_MANUAL_INSTANTIATION +#endif // __fpa__DataStructures__Image__Skeleton__h__ + +// eof - $RCSfile$