#include <vtkPolyData.h>
#include <vtkPolyDataReader.h>
+/* TODO
#ifdef cpPlugins_Interface_QT4
#include <QFileDialog>
#endif // cpPlugins_Interface_QT4
// -------------------------------------------------------------------------
-bool cpPlugins::IO::MeshReader::
+cpPlugins::IO::MeshReader::
+DialogResult cpPlugins::IO::MeshReader::
ExecConfigurationDialog( QWidget* parent )
{
- bool r = false;
+ DialogResult r = Self::DialogResult_Cancel;
#ifdef cpPlugins_Interface_QT4
this->m_Parameters->SetSelectedChoice( "PixelType", "float" );
this->m_Parameters->SetUint( "Dimension", 3 );
- r = true;
+ r = Self::DialogResult_NoModal;
} // fi
return( r );
}
+*/
// -------------------------------------------------------------------------
cpPlugins::IO::MeshReader::
MeshReader( )
: Superclass( )
{
- this->SetNumberOfOutputs( 1 );
- this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 );
+ this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
std::vector< TParameters::TString > valid_types;
valid_types.push_back( "float" );
valid_types.push_back( "double" );
- this->m_Parameters->ConfigureAsString( "FileName", "" );
+ this->m_Parameters->ConfigureAsOpenFileName( "FileName" );
this->m_Parameters->ConfigureAsChoices( "PixelType", valid_types );
- this->m_Parameters->ConfigureAsUint( "Dimension", 3 );
+ this->m_Parameters->ConfigureAsUint( "Dimension" );
+
+ this->m_Parameters->SetUint( "Dimension", 3 );
}
// -------------------------------------------------------------------------
_GD1( )
{
// Get filename
- std::string fname = this->m_Parameters->GetString( "FileName" );
+ std::string fname = this->m_Parameters->GetOpenFileName( "FileName" );
vtkPolyDataReader* pdr = this->_CreateVTK< vtkPolyDataReader >( );
pdr->SetFileName( fname.c_str( ) );
pdr->Update( );
cpPlugins::Interface::Mesh* out =
- this->GetOutput< cpPlugins::Interface::Mesh >( 0 );
+ this->GetOutput< cpPlugins::Interface::Mesh >( "Output" );
if( out != NULL )
out->SetVTK( pdr->GetOutput( ) );
else