]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/MoriRegionGrow.hxx
...
[FrontAlgorithms.git] / lib / fpa / Base / MoriRegionGrow.hxx
index b619bce665c8bed3242332a36e7a96ef104bc5c4..3b7d83949c9cf3262c5f5c1590c433730aecdd2b 100644 (file)
@@ -65,8 +65,9 @@ GenerateData( )
   typedef std::pair< TVertex, unsigned long > _TNode;
   std::queue< _TNode > queues[ 2 ];
   unsigned long frontId = 1;
-  for( TVertex seed: this->GetSeeds( ) )
-    queues[ 0 ].push( _TNode( seed, frontId++ ) );
+  typename TSeedsInterface::TSeeds::const_iterator sIt = this->BeginSeeds( );
+  for( ; sIt != this->EndSeeds( ); ++sIt )
+    queues[ 0 ].push( _TNode( *sIt, frontId++ ) );
   unsigned int cur_queue = 0;
   unsigned int aux_queue = 1;
 
@@ -104,8 +105,10 @@ GenerateData( )
 
       // Add neighborhood
       TVertices neighbors = this->_GetNeighbors( node.first );
-      for( TVertex neigh: neighbors )
+      typename TVertices::const_iterator neighIt = neighbors.begin( );
+      for( ; neighIt != neighbors.end( ); ++neighIt )
       {
+        TVertex neigh = *neighIt;
         if( this->_IsMarked( neigh ) )
         {
           // Invoke stop at collisions