]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/RegionGrowWithMultipleCriteria.hxx
Some tests... Package is unstable right nowgit status!
[FrontAlgorithms.git] / lib / fpa / Base / RegionGrowWithMultipleCriteria.hxx
index 34420b24ad029a8e3164486082e632def436e652..24b3308764b213be9debdd904f92aef89bedb387 100644 (file)
@@ -60,7 +60,11 @@ _QueuePop( )
   _TNode node = this->Superclass::_QueuePop( );
   if( this->_IsQueueEmpty( ) )
   {
-    std::cerr << "ERROR!!!!" << std::endl;
+    // Replace queue
+    this->m_Queue = this->m_AuxiliaryQueue;
+
+    // Move to next function
+    this->m_ActualFunction++;
 
   } // fi
   return( node );
@@ -71,10 +75,15 @@ template< class V, class R, class VV, class VC, class B >
 bool fpa::Base::RegionGrowWithMultipleCriteria< V, R, VV, VC, B >::
 _CheckMembership( const _TNode& n ) const
 {
-  bool ret = ( *( this->m_ActualFunction ) )->Evaluate( n.Vertex );
-  if( !ret )
-    this->m_AuxiliaryQueue.push( n );
-  return( ret );
+  if( this->m_ActualFunction != this->m_Functions.end( ) )
+  {
+    bool ret = ( *( this->m_ActualFunction ) )->Evaluate( n.Vertex );
+    if( !ret )
+      this->m_AuxiliaryQueue.push( n );
+    return( ret );
+  }
+  else
+    return( false );
 }
 
 #endif // __FPA__BASE__REGIONGROWWITHMULTIPLECRITERIA__HXX__