]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/DataStructures/Skeleton.hxx
...
[cpPlugins.git] / lib / cpExtensions / DataStructures / Skeleton.hxx
index 579f425d7ff6a394fe94e2d6a97ce6fef7a6100a..12f463f3796055dd017ac03255623102e5e5839c 100644 (file)
@@ -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 );
 }