// -------------------------------------------------------------------------
cpPlugins::IO::MeshReader::
MeshReader( )
- : Superclass( ),
- m_Reader( NULL )
+ : Superclass( )
{
this->m_ClassName = "cpPlugins::IO::MeshReader";
this->m_ClassCategory = "MeshReader";
cpPlugins::IO::MeshReader::
~MeshReader( )
{
- if( this->m_Reader != NULL )
- this->m_Reader = NULL;
}
// -------------------------------------------------------------------------
Parameters::TString fname =
this->m_Parameters.GetValueAsString( "FileName" );
- if( this->m_Reader != NULL )
- this->m_Reader->Delete( );
-
- vtkPolyDataReader* pdr = vtkPolyDataReader::New( );
- this->m_Reader = pdr;
+ vtkPolyDataReader* pdr = this->_CreateVTK< vtkPolyDataReader >( );
pdr->SetFileName( fname.c_str( ) );
pdr->Update( );
cpPlugins::Interface::Mesh* out =
this->GetOutput< cpPlugins::Interface::Mesh >( 0 );
if( out != NULL )
- out->SetVTKMesh( pdr->GetOutput( ) );
+ out->SetVTK( pdr->GetOutput( ) );
else
return( "MeshReader: output not correctly created." );
return( "" );