]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/IO/MatrixValuesContainerReader.hxx
...
[FrontAlgorithms.git] / lib / fpa / IO / MatrixValuesContainerReader.hxx
diff --git a/lib/fpa/IO/MatrixValuesContainerReader.hxx b/lib/fpa/IO/MatrixValuesContainerReader.hxx
deleted file mode 100644 (file)
index 902462b..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef __FPA__IO__MATRIXVALUESCONTAINERREADER__HXX__
-#define __FPA__IO__MATRIXVALUESCONTAINERREADER__HXX__
-
-#include <fstream>
-
-// -------------------------------------------------------------------------
-template< class T >
-T* fpa::IO::MatrixValuesContainerReader< T >::
-GetOutput( )
-{
-  return( itkDynamicCastInDebugMode< T* >( this->GetPrimaryOutput( ) ) );
-}
-
-// -------------------------------------------------------------------------
-template< class T >
-void fpa::IO::MatrixValuesContainerReader< T >::
-Update( )
-{
-  this->GenerateData( );
-}
-
-// -------------------------------------------------------------------------
-template< class T >
-fpa::IO::MatrixValuesContainerReader< T >::
-MatrixValuesContainerReader( )
-  : Superclass( ),
-    m_FileName( "" )
-{
-  this->itk::ProcessObject::SetNumberOfRequiredOutputs( 1 );
-  this->itk::ProcessObject::SetNthOutput( 0, T::New( ) );
-}
-
-// -------------------------------------------------------------------------
-template< class T >
-fpa::IO::MatrixValuesContainerReader< T >::
-~MatrixValuesContainerReader( )
-{
-}
-
-// -------------------------------------------------------------------------
-template< class T >
-void fpa::IO::MatrixValuesContainerReader< T >::
-GenerateData( )
-{
-  T* output = this->GetOutput( );
-  output->Clear( );
-
-  std::ifstream in( this->m_FileName.c_str( ) );
-  if( !in )
-  {
-    itkExceptionMacro(
-      << "Error opening file to read a minimum spanning tree: \""
-      << this->m_FileName
-      << "\""
-      );
-    return;
-
-  } // fi
-
-  unsigned int dim;
-  unsigned long nTuples;
-  in >> dim >> nTuples;
-  this->m_NumberOfLabels = 0;
-  for( unsigned long tId = 0; tId < nTuples; ++tId )
-  {
-    unsigned long nCouples;
-    in >> nCouples;
-    typename T::TIndex v0;
-    for( unsigned int d = 0; d < dim; ++d )
-    {
-      long val;
-      in >> val;
-      if( d < T::TIndex::Dimension )
-        v0[ d ] = val;
-    
-    } // rof
-
-    for( unsigned long cId = 0; cId < nCouples; ++cId )
-    {
-      typename T::TIndex v1;
-      for( unsigned int d = 0; d < dim; ++d )
-      {
-        long val;
-        in >> val;
-        if( d < T::TIndex::Dimension )
-          v1[ d ] = val;
-    
-      } // rof
-      typename T::TValue val;
-      in >> val;
-      output->SetValue( v0, v1, val );
-      if( val > this->m_NumberOfLabels )
-        this->m_NumberOfLabels = val;
-
-    } // rof
-
-  } // rof
-  in.close( );
-}
-
-#endif // __FPA__IO__MATRIXVALUESCONTAINERREADER__HXX__
-
-// eof - $RCSfile$