}
// -------------------------------------------------------------------------
-std::string fpaPlugins::MinimumSpanningTreeReader::
+void fpaPlugins::MinimumSpanningTreeReader::
_GenerateData( )
{
// Infere MST dimensions
auto fname = this->m_Parameters.GetOpenFileName( "FileName" );
std::ifstream input( fname.c_str( ) );
if( !input )
- return(
+ this->_Error(
std::string( "MinimumSpanningTreeReader: Error opening file \"" ) +
fname +
std::string( "\"" )
input >> dim;
// Real execution
- if ( dim == 2 ) return( this->_GD0< 2 >( fname ) );
- else if( dim == 3 ) return( this->_GD0< 3 >( fname ) );
- else
- return( "MinimumSpanningTreeReader: invalid dimensions." );
+ if ( dim == 2 ) this->_GD0< 2 >( fname );
+ else if( dim == 3 ) this->_GD0< 3 >( fname );
+ else this->_Error( "Invalid dimensions." );
}
// -------------------------------------------------------------------------
template< unsigned int _NDim >
-std::string fpaPlugins::MinimumSpanningTreeReader::
+void fpaPlugins::MinimumSpanningTreeReader::
_GD0( const std::string& fname )
{
typedef fpa::Image::MinimumSpanningTree< _NDim > _TTree;
}
catch( itk::ExceptionObject& err )
{
- return(
- "MinimumSpanningTreeReader: " + std::string( err.GetDescription( ) )
- );
+ this->_Error( err.GetDescription( ) );
} // yrt
this->GetOutputData( "Output" )->SetITK( reader->GetOutput( ) );
- return( "" );
}
// eof - $RCSfile$