X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FDataStructures%2FSkeleton.hxx;fp=lib%2FcpExtensions%2FDataStructures%2FSkeleton.hxx;h=12f463f3796055dd017ac03255623102e5e5839c;hb=8503ed517290328e3770807b09ff27bf55d66571;hp=579f425d7ff6a394fe94e2d6a97ce6fef7a6100a;hpb=260cab51b762d995e771b1f3f6de1667ca4d19d2;p=cpPlugins.git diff --git a/lib/cpExtensions/DataStructures/Skeleton.hxx b/lib/cpExtensions/DataStructures/Skeleton.hxx index 579f425..12f463f 100644 --- a/lib/cpExtensions/DataStructures/Skeleton.hxx +++ b/lib/cpExtensions/DataStructures/Skeleton.hxx @@ -45,6 +45,14 @@ cpExtensions::DataStructures::Skeleton< _VDim >:: GetEndPoints( ) const { std::vector< TIndex > res; + auto mIt = this->BeginEdgesRows( ); + for( ; mIt != this->EndEdgesRows( ); ++mIt ) + { + unsigned long count = mIt->second.size( ); + if( count == 1 ) + res.push_back( mIt->first ); + + } // rof return( res ); } @@ -55,6 +63,14 @@ cpExtensions::DataStructures::Skeleton< _VDim >:: GetBifurcations( ) const { std::vector< TIndex > res; + auto mIt = this->BeginEdgesRows( ); + for( ; mIt != this->EndEdgesRows( ); ++mIt ) + { + unsigned long count = mIt->second.size( ); + if( count > 1 ) + res.push_back( mIt->first ); + + } // rof return( res ); }