]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/PolyDataReader.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / PolyDataReader.cxx
diff --git a/lib/cpPlugins/Plugins/PolyDataReader.cxx b/lib/cpPlugins/Plugins/PolyDataReader.cxx
deleted file mode 100644 (file)
index 95576ac..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#include <cpPlugins/Plugins/PolyDataReader.h>
-#include <cpPlugins/Interface/PolyData.h>
-
-#include <vtkErrorCode.h>
-#include <vtkPolyDataReader.h>
-
-// -------------------------------------------------------------------------
-std::string cpPlugins::Plugins::PolyDataReader::
-GetClassName( ) const
-{
-  return( "cpPlugins::Plugins::PolyDataReader" );
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Plugins::PolyDataReader::
-PolyDataReader( )
-  : Superclass( )
-{
-  this->SetNumberOfOutputs( 1 );
-  this->_MakeOutput< cpPlugins::Interface::PolyData >( 0 );
-
-  using namespace cpPlugins::Interface;
-  this->m_DefaultParameters.Configure( Parameters::String, "FileName" );
-  this->m_Parameters = this->m_DefaultParameters;
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Plugins::PolyDataReader::
-~PolyDataReader( )
-{
-}
-
-// -------------------------------------------------------------------------
-std::string cpPlugins::Plugins::PolyDataReader::
-_GenerateData( )
-{
-  // Get filename
-  using namespace cpPlugins::Interface;
-  Parameters::TString fname =
-    this->m_Parameters.GetValueAsString( "FileName" );
-
-  // Create a possible reader
-  vtkPolyDataReader* reader =
-    dynamic_cast< vtkPolyDataReader* >( this->m_Reader.GetPointer( ) );
-  if( reader == NULL )
-  {
-    this->m_Reader = vtkSmartPointer< vtkPolyDataReader >::New( );
-    reader =
-      dynamic_cast< vtkPolyDataReader* >( this->m_Reader.GetPointer( ) );
-
-  } // fi
-  reader->SetFileName( fname.c_str( ) );
-  reader->Update( );
-  unsigned long error = reader->GetErrorCode( );
-  if( error == vtkErrorCode::NoError )
-  {
-    if( this->m_Outputs[ 0 ].IsNotNull( ) )
-    {
-      cpPlugins::Interface::PolyData* pdata =
-        dynamic_cast< cpPlugins::Interface::PolyData* >(
-          this->m_Outputs[ 0 ].GetPointer( )
-          );
-      if( pdata != NULL )
-        pdata->SetRealDataObject( reader->GetOutput( ) );
-
-    } // fi
-    return( "" );
-  }
-  else
-    return( vtkErrorCode::GetStringFromErrorCode( error ) );
-}
-
-// eof - $RCSfile$