1 #ifndef __FPA__IO__UNIQUEVALUESCONTAINERREADER__HXX__
2 #define __FPA__IO__UNIQUEVALUESCONTAINERREADER__HXX__
6 // -------------------------------------------------------------------------
8 T* fpa::IO::UniqueValuesContainerReader< T >::
11 return( itkDynamicCastInDebugMode< T* >( this->GetPrimaryOutput( ) ) );
14 // -------------------------------------------------------------------------
16 void fpa::IO::UniqueValuesContainerReader< T >::
19 this->GenerateData( );
22 // -------------------------------------------------------------------------
24 fpa::IO::UniqueValuesContainerReader< T >::
25 UniqueValuesContainerReader( )
29 this->itk::ProcessObject::SetNumberOfRequiredOutputs( 1 );
30 this->itk::ProcessObject::SetNthOutput( 0, T::New( ) );
33 // -------------------------------------------------------------------------
35 fpa::IO::UniqueValuesContainerReader< T >::
36 ~UniqueValuesContainerReader( )
40 // -------------------------------------------------------------------------
42 void fpa::IO::UniqueValuesContainerReader< T >::
45 T* output = this->GetOutput( );
48 std::ifstream in( this->m_FileName.c_str( ) );
52 << "Error opening file to read a minimum spanning tree: \""
61 unsigned long nVertices;
62 in >> dim >> nVertices;
63 for( unsigned long vId = 0; vId < nVertices; ++vId )
66 for( unsigned int d = 0; d < dim; ++d )
70 if( d < T::TValue::Dimension )
80 #endif // __FPA__IO__UNIQUEVALUESCONTAINERREADER__HXX__