]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/SkeletonWriter.hxx
...
[FrontAlgorithms.git] / lib / fpa / Base / SkeletonWriter.hxx
index e99d9ce5631e537726c09403ad8bdfa70985f628..e060cccfa0b6424f3e8db78b3b7800af0ce18b04 100644 (file)
@@ -69,46 +69,48 @@ void fpa::Base::SkeletonWriter< _TSkeleton >::
 GenerateData( )
 {
   const TSkeleton* sk = this->GetInput( );
-  auto mIt = sk->BeginEdgesRows( );
-  auto rIt = mIt->second.begin( );
-  auto eIt = rIt->second.begin( );
-  auto path = *eIt;
+  typename TMatrix::const_iterator mIt = sk->BeginEdgesRows( );
+  typename TMatrixRow::const_iterator rIt = mIt->second.begin( );
+  typename TEdges::const_iterator eIt = rIt->second.begin( );
+  const TPath* path = *eIt;
 
   // Write base information
   std::stringstream out1, out2;
   out1 << TSkeleton::Dimension << std::endl;
-  auto spa = path->GetSpacing( );
+  typename TPath::TSpacing spa = path->GetSpacing( );
   for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
     out1 << spa[ d ] << " ";
   out1 << std::endl;
-  auto dir = path->GetDirection( );
+  typename TPath::TDirection dir = path->GetDirection( );
   for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
     for( unsigned int e = 0; e < TSkeleton::Dimension; ++e )
       out1 << dir[ d ][ e ] << " ";
   out1 << std::endl;
-  auto ori = path->GetOrigin( );
+  typename TPath::TPoint ori = path->GetOrigin( );
   for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
     out1 << ori[ d ] << " ";
   out1 << std::endl;
 
   // End points
-  auto end_points = sk->GetEndPoints( );
+  std::vector< TVertex > end_points = sk->GetEndPoints( );
   out1 << end_points.size( ) << std::endl;
-  for( auto point : end_points )
+  typename std::vector< TVertex >::const_iterator epIt = end_points.begin( );
+  for( ; epIt != end_points.end( ); ++epIt )
   {
     for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
-      out1 << point[ d ] << " ";
+      out1 << ( *epIt )[ d ] << " ";
     out1 << std::endl;
 
   } // rof
 
   // Bifurcations
-  auto bifurcations = sk->GetBifurcations( );
+  std::vector< TVertex > bifurcations = sk->GetBifurcations( );
   out1 << bifurcations.size( ) << std::endl;
-  for( auto point : bifurcations )
+  typename std::vector< TVertex >::const_iterator bIt = bifurcations.begin( );
+  for( ; bIt != bifurcations.end( ); ++bIt )
   {
     for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
-      out1 << point[ d ] << " ";
+      out1 << ( *bIt )[ d ] << " ";
     out1 << std::endl;
 
   } // rof
@@ -118,19 +120,19 @@ GenerateData( )
   mIt = sk->BeginEdgesRows( );
   for( ; mIt != sk->EndEdgesRows( ); ++mIt )
   {
-    auto rIt = mIt->second.begin( );
+    typename TMatrixRow::const_iterator rIt = mIt->second.begin( );
     for( ; rIt != mIt->second.end( ); ++rIt )
     {
-      auto eIt = rIt->second.begin( );
+      typename TEdges::const_iterator eIt = rIt->second.begin( );
       for( ; eIt != rIt->second.end( ); ++eIt )
       {
-        auto path = *eIt;
+        TPath* path = *eIt;
         pathCount++;
         unsigned int size = path->GetSize( );
         out2 << size << std::endl;
         for( unsigned int i = 0; i < path->GetSize( ); ++i )
         {
-          auto v = path->GetVertex( i );
+          TVertex v = path->GetVertex( i );
           for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
             out2 << v[ d ] << " ";