#include "ImageMPR.h"
#include "ui_ImageMPR.h"
+#include <QMessageBox>
+
// -------------------------------------------------------------------------
#define ImageMPR_ConnectAction( ACTION ) \
QObject::connect( \
ImageMPR( QWidget* parent )
: QMainWindow( parent ),
m_UI( new Ui::ImageMPR ),
- m_ImageLoaded( "" ),
- m_Flooding( false )
+ m_Plugins( new TPlugins ),
+ m_MainImage( NULL )
{
this->m_UI->setupUi( this );
+ this->m_Plugins->SetWidget( this );
// Connect actions
ImageMPR_ConnectAction( OpenImage );
ImageMPR_ConnectAction( ShowPlugins );
// Try to load default plugins
- this->m_UI->MPR->LoadPlugins( );
- this->m_UI->MPR->AssociatePluginsToMenu(
+ this->m_Plugins->LoadPluginsConfigurationFile( "Plugins.cfg" );
+ this->m_Plugins->AssociatePluginsToMenu(
this->m_UI->MenuFilters, this, SLOT( _execPlugin( ) )
);
}
~ImageMPR( )
{
delete this->m_UI;
+ delete this->m_Plugins;
}
// -------------------------------------------------------------------------
void ImageMPR::
_aOpenImage( )
{
- if( this->m_ImageLoaded != "" )
+ if( this->m_MainImage.IsNotNull( ) )
this->m_UI->MPR->ClearAll( );
- this->m_ImageLoaded = this->m_UI->MPR->LoadImage( );
+ if( this->m_Plugins->ReadImage( this->m_MainImage, true ) )
+ {
+ vtkImageData* vimage = this->m_MainImage->GetVTK< vtkImageData >( );
+ if( vimage == NULL )
+ QMessageBox::critical(
+ this,
+ QMessageBox::tr( "Error showing image." ),
+ QMessageBox::tr(
+ "Image was read, but no valid VTK conversion was found."
+ )
+ );
+ else
+ this->m_UI->MPR->ShowImage( vimage );
+
+ } // fi
}
// -------------------------------------------------------------------------
void ImageMPR::
_aOpenDICOMSeries( )
{
- if( this->m_ImageLoaded != "" )
+ if( this->m_MainImage.IsNotNull( ) )
this->m_UI->MPR->ClearAll( );
- this->m_ImageLoaded = this->m_UI->MPR->LoadDicomSeries( );
+ if( this->m_Plugins->ReadDicomSeries( this->m_MainImage ) )
+ {
+ vtkImageData* vimage = this->m_MainImage->GetVTK< vtkImageData >( );
+ if( vimage == NULL )
+ QMessageBox::critical(
+ this,
+ QMessageBox::tr( "Error showing image." ),
+ QMessageBox::tr(
+ "Image was read, but no valid VTK conversion was found."
+ )
+ );
+ else
+ this->m_UI->MPR->ShowImage( vimage );
+
+ } // fi
}
// -------------------------------------------------------------------------
void ImageMPR::
_aOpenSegmentation( )
{
- if( this->m_ImageLoaded != "" )
+ /*
+ if( this->m_ImageLoaded != "" )
this->m_ImageLoaded = this->m_UI->MPR->LoadImage( );
+ */
}
// -------------------------------------------------------------------------
void ImageMPR::
_aSaveImage( )
{
+ if( this->m_MainImage.IsNotNull( ) )
+ this->m_Plugins->WriteImage( this->m_MainImage, true );
}
// -------------------------------------------------------------------------
void ImageMPR::
_aLoadPlugins( )
{
- this->m_UI->MPR->DialogLoadPlugins( );
- this->m_UI->MPR->AssociatePluginsToMenu(
+ this->m_Plugins->DialogLoadPlugins( );
+ this->m_Plugins->AssociatePluginsToMenu(
this->m_UI->MenuFilters, this, SLOT( _execPlugin( ) )
);
}
QAction* action = dynamic_cast< QAction* >( this->sender( ) );
if( action == NULL )
return;
+ QMenu* menu = dynamic_cast< QMenu* >( action->parentWidget( ) );
+ if( menu == NULL )
+ return;
+ std::string cate = menu->title( ).toStdString( );
std::string name = action->text( ).toStdString( );
+ std::string err = "";
- if( name == "cpPlugins::BasicFilters::FloodFillImageFilter" )
+ TPlugins::TProcessObject::Pointer filter;
+ if( this->m_Plugins->CreateFilter( filter, name ) )
{
- this->m_Flooding = true;
+ if( cate == "ImageToMeshFilter" )
+ {
+ if( filter->ExecConfigurationDialog( this ) )
+ {
+ filter->SetInput( "Input", this->m_MainImage );
+ this->_Block( );
+ err = filter->Update( );
+ this->_Unblock( );
+ TPlugins::TMesh::Pointer mesh =
+ filter->GetOutput< TPlugins::TMesh >( "Input" );
+ mesh->Print( std::cout );
+
+ } // fi
+
+ } // fi
}
else
- {
- this->m_Flooding = false;
- this->m_UI->MPR->ExecuteFilter(
- name, this->m_ImageLoaded, "SegmentedImage"
+ QMessageBox::critical(
+ this,
+ tr( "Error creating filter" ),
+ tr( "No valid filter defined." )
);
- } // fi
-
+ /*
+ if( name == "cpPlugins::BasicFilters::FloodFillImageFilter" )
+ {
+ this->m_Flooding = true;
+ }
+ else
+ {
+ this->m_Flooding = false;
+ this->m_UI->MPR->ExecuteFilter(
+ name, this->m_ImageLoaded, "SegmentedImage"
+ );
+
+ } // fi
+ */
+
// Configure filter
/*
TPluginFilter::Pointer filter =
#include <vector>
// Qt stuff
+#include <QApplication>
#include <QMainWindow>
// vtk stuff
#include <cpExtensions/Visualization/MPRObjects.h>
// Plugins interface
-#include <cpPlugins/Interface/Interface.h>
-#include <cpPlugins/Interface/ProcessObject.h>
-#include <cpPlugins/Interface/Image.h>
-#include <cpPlugins/Interface/ImplicitFunction.h>
-#include <cpPlugins/Interface/Mesh.h>
-#include <vtkMetaImageWriter.h>
-#include <vtkMetaImageReader.h>
-
+#include <cpPlugins/Interface/Plugins.h>
// -------------------------------------------------------------------------
namespace Ui
typedef QMainWindow Superclass;
typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
+ typedef cpPlugins::Interface::Plugins TPlugins;
// Plugins types
/*
explicit ImageMPR( QWidget* parent = 0 );
virtual ~ImageMPR( );
+protected:
+ inline void _Block( )
+ {
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+ this->setEnabled( false );
+ }
+ inline void _Unblock( )
+ {
+ QApplication::restoreOverrideCursor( );
+ this->setEnabled( true );
+ }
+
/*
protected:
bool _LoadPlugins( const std::string& filename );
private:
Ui::ImageMPR* m_UI;
+ TPlugins* m_Plugins;
- // Some state flags
- std::string m_ImageLoaded;
- bool m_Flooding;
+ // Objects
+ TPlugins::TImage::Pointer m_MainImage;
+ std::vector< TPlugins::TMesh::Pointer > m_Meshes;
// Plugins objects
/*
#ifdef cpPlugins_Interface_QT4
-#ifdef _WIN32
-# define PLUGIN_PREFIX ""
-# define PLUGIN_EXT "dll"
-# define PLUGIN_REGEX "Plugins file (*.dll);;All files (*)"
-#else // Linux
-# define PLUGIN_PREFIX "lib"
-# define PLUGIN_EXT "so"
-# define PLUGIN_REGEX "Plugins file (*.so);;All files (*)"
-#endif // _WIN32
-
-#include <fstream>
-#include <sstream>
-
-#include <QFileDialog>
-#include <QMessageBox>
-
// -------------------------------------------------------------------------
cpPlugins::Interface::BaseMPRWindow::
BaseMPRWindow( QWidget* parent )
- : cpExtensions::QT::QuadSplitter( parent ),
- m_LastLoadedPlugin( "." )
+ : cpExtensions::QT::QuadSplitter( parent )
{
// Configure splitter
this->m_XVTK = new QVTKWidget( this );
cpPlugins::Interface::BaseMPRWindow::
~BaseMPRWindow( )
{
- if( this->m_WVTK != NULL )
- delete this->m_WVTK;
- if( this->m_ZVTK != NULL )
- delete this->m_ZVTK;
- if( this->m_YVTK != NULL )
- delete this->m_YVTK;
- if( this->m_XVTK != NULL )
- delete this->m_XVTK;
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::Interface::BaseMPRWindow::
-DialogLoadPlugins( )
-{
- // Show dialog and check if it was accepted
- QFileDialog dialog( this );
- dialog.setFileMode( QFileDialog::ExistingFile );
- dialog.setDirectory( this->m_LastLoadedPlugin.c_str( ) );
- dialog.setNameFilter( tr( PLUGIN_REGEX ) );
- dialog.setDefaultSuffix( tr( PLUGIN_EXT ) );
- if( !( dialog.exec( ) ) )
- return;
-
- std::string fname = dialog.selectedFiles( ).at( 0 ).toStdString( );
- if( !( this->LoadPlugins( fname ) ) )
- QMessageBox::critical(
- this, tr( "Ignoring plugin" ), tr( fname.c_str( ) )
- );
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::Interface::BaseMPRWindow::
-AssociatePluginsToMenu( QMenu* menu, QObject* obj, const char* slot )
-{
- std::map< std::string, std::set< std::string > >::const_iterator i;
- std::set< std::string >::const_iterator j;
-
- menu->clear( );
- for( i = this->m_Filters.begin( ); i != this->m_Filters.end( ); i++ )
- {
- QMenu* newMenu = menu->addMenu( i->first.c_str( ) );
- for( j = i->second.begin( ); j != i->second.end( ); ++j )
- {
- QAction* a = newMenu->addAction( j->c_str( ) );
- QObject::connect( a, SIGNAL( triggered( ) ), obj, slot );
-
- } // rof
-
- } // rof
+ if( this->m_WVTK != NULL ) delete this->m_WVTK;
+ if( this->m_ZVTK != NULL ) delete this->m_ZVTK;
+ if( this->m_YVTK != NULL ) delete this->m_YVTK;
+ if( this->m_XVTK != NULL ) delete this->m_XVTK;
}
// -------------------------------------------------------------------------
bool cpPlugins::Interface::BaseMPRWindow::
-LoadPlugins( const std::string& fname )
+ShowImage( vtkImageData* image )
{
- this->Block( );
-
- // Is it already loaded?
- if( this->m_LoadedPlugins.find( fname ) != this->m_LoadedPlugins.end( ) )
- {
- this->Unblock( );
- return( true );
-
- } // fi
-
- // Was it succesfully loaded?
- if( !( this->m_Interface.Load( fname ) ) )
- {
- this->Unblock( );
- return( false );
-
- } // fi
-
- // Update a simple track
- this->m_LoadedPlugins.insert( fname );
- this->m_LastLoadedPlugin = fname;
- this->_UpdatePlugins( );
-
- this->Unblock( );
- return( true );
+ bool r = ( image != NULL );
+ if( r )
+ this->m_MPRObjects->AddImage( image );
+ return( r );
}
// -------------------------------------------------------------------------
-void cpPlugins::Interface::BaseMPRWindow::
-LoadPlugins( )
+bool cpPlugins::Interface::BaseMPRWindow::
+ShowImage( vtkImageData* image, double r, double g, double b )
{
- // Load file into a char buffer
- std::ifstream in(
- "Plugins.cfg", std::ios::in | std::ios::binary | std::ios::ate
- );
- if( !in.is_open( ) )
- return;
- std::streampos size = in.tellg( );
- char* buffer = new char[ size ];
- in.seekg( 0, std::ios::beg );
- in.read( buffer, size );
- in.close( );
-
- // Read stream
- std::stringstream in_stream( buffer );
- while( in_stream )
- {
- char line[ 2048 ];
- in_stream.getline( line, 2048 );
- this->LoadPlugins( line );
-
- } // elihw
-
- // Finish
- delete buffer;
+ return( false );
}
// -------------------------------------------------------------------------
-std::string cpPlugins::Interface::BaseMPRWindow::
-LoadImage( )
+bool cpPlugins::Interface::BaseMPRWindow::
+ShowMesh( vtkPolyData* mesh )
{
- std::string msg = "";
- std::string ret = "";
- if( this->m_ImageReader.IsNull( ) )
- msg = "No valid image reader. Please load a valid plugin file.";
-
- if( this->m_ImageReader->ExecConfigurationDialog( this ) )
- {
- this->Block( );
- msg = this->m_ImageReader->Update( );
- if( msg == "" )
- {
- TImage::Pointer image =
- this->m_ImageReader->GetOutput< TImage >( "Output" );
- if( this->m_Images.size( ) == 0 )
- ret = image->GetName( );
- else
- ret = "Segmentation";
- this->m_Images[ ret ] = image;
- this->m_ImageReader->DisconnectOutputs( );
- this->m_ImageReader->GetParameters( )->ClearStringList( "FileNames" );
- vtkImageData* vtk_id = image->GetVTK< vtkImageData >( );
- if( vtk_id != NULL )
- {
- this->m_MPRObjects->AddImage( vtk_id );
- /*
- MementoState(m_state, this->m_Image);
- this->m_state++;
- */
- }
- else
- msg = "Read image does not have a valid VTK converter.";
- }
- else
- ret = "";
-
- } // fi
-
- // Show errors and return
- this->Unblock( );
- if( msg != "" )
- QMessageBox::critical(
- this, tr( "Error reading image." ), tr( msg.c_str( ) )
- );
- return( ret );
+ return( false );
}
// -------------------------------------------------------------------------
-std::string cpPlugins::Interface::BaseMPRWindow::
-LoadDicomSeries( )
-{
- std::string msg = "";
- std::string ret = "";
- if( this->m_DicomSeriesReader.IsNull( ) )
- msg = "No valid DICOM series reader. Please load a valid plugin file.";
-
- if( this->m_DicomSeriesReader->ExecConfigurationDialog( this ) )
+/*
+ void cpPlugins::Interface::BaseMPRWindow::
+ AddImage( const std::string& name, TImage* image )
{
- this->Block( );
- msg = this->m_DicomSeriesReader->Update( );
- if( msg == "" )
- {
- TImage::Pointer image =
- this->m_DicomSeriesReader->GetOutput< TImage >( "Output" );
- if( this->m_Images.size( ) == 0 )
- ret = image->GetName( );
- else
- ret = "Segmentation";
- this->m_Images[ ret ] = image;
- this->m_DicomSeriesReader->DisconnectOutputs( );
- this->m_DicomSeriesReader->GetParameters( )->
- ClearStringList( "FileNames" );
- vtkImageData* vtk_id = image->GetVTK< vtkImageData >( );
- if( vtk_id != NULL )
- {
- this->m_MPRObjects->AddImage( vtk_id );
- /*
- MementoState(m_state, this->m_Image);
- this->m_state++;
- */
- }
- else
- msg = "Read dicom series does not have a valid VTK converter.";
- }
- else
- ret = "";
-
- } // fi
-
- // Show errors and return
- this->Unblock( );
- if( msg != "" )
- QMessageBox::critical(
- this, tr( "Error reading dicom series." ), tr( msg.c_str( ) )
- );
- return( ret );
-}
+ this->m_Images[ name ] = image;
+ vtkImageData* vtk_id =
+ this->m_Images[ name ]->GetVTK< vtkImageData >( );
+ if( vtk_id != NULL )
+ this->m_MPRObjects->AddImage( vtk_id );
+ }
+*/
// -------------------------------------------------------------------------
-std::string cpPlugins::Interface::BaseMPRWindow::
-LoadMesh( )
+double cpPlugins::Interface::BaseMPRWindow::
+GetWindow( ) const
{
- return( "" );
+ return( this->m_MPRObjects->GetWindow( ) );
}
// -------------------------------------------------------------------------
-void cpPlugins::Interface::BaseMPRWindow::
-ExecuteFilter(
- const std::string& name,
- const std::string& input_id,
- const std::string& output_id
- )
+double cpPlugins::Interface::BaseMPRWindow::
+GetLevel( ) const
{
- TProcessObject::Pointer filter =
- this->m_Interface.CreateProcessObject( name );
- std::string category = filter->GetClassCategory( );
- if( category == "ImageToBinaryImageFilter" )
- {
- TImages::iterator iIt = this->m_Images.find( input_id );
- if( iIt != this->m_Images.end( ) )
- {
- filter->SetInput( "Input", this->m_Images[ input_id ] );
- bool dlg_ok = filter->ExecConfigurationDialog( NULL );
- if( !dlg_ok )
- return;
-
- std::string err = filter->Update( );
- if( err == "" )
- {
- this->m_Images[ "Segmentation" ] =
- filter->GetOutput< TImage >( "Output" );
- filter->DisconnectOutputs( );
-
- vtkImageData* vtk_id =
- this->m_Images[ "Segmentation" ]->GetVTK< vtkImageData >( );
- if( vtk_id != NULL )
- this->m_MPRObjects->AddImage( vtk_id );
- }
- else
- QMessageBox::critical(
- this, tr( "Error with plugin" ), tr( err.c_str( ) )
- );
-
- } // fi
-
- } // fi
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::Interface::BaseMPRWindow::
-AddImage( const std::string& name, TImage* image )
-{
- this->m_Images[ name ] = image;
- vtkImageData* vtk_id =
- this->m_Images[ name ]->GetVTK< vtkImageData >( );
- if( vtk_id != NULL )
- this->m_MPRObjects->AddImage( vtk_id );
+ return( this->m_MPRObjects->GetLevel( ) );
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::BaseMPRWindow::
ClearAll( )
{
- this->m_MPRObjects->ClearAll( );
- this->m_Images.clear( );
- this->m_Meshes.clear( );
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::Interface::BaseMPRWindow::
-_UpdatePlugins( )
-{
- typedef TInterface::TClasses _C;
-
- this->m_Filters.clear( );
- _C& classes = this->m_Interface.GetClasses( );
- for( _C::const_iterator i = classes.begin( ); i != classes.end( ); ++i )
- {
- TProcessObject::Pointer o =
- this->m_Interface.CreateProcessObject( i->first );
- std::string name = o->GetClassName( );
- std::string category = o->GetClassCategory( );
- if( category == "ImageReader" )
- this->m_ImageReader = o;
- else if( category == "ImageWriter" )
- this->m_ImageWriter = o;
- else if( category == "MeshReader" )
- this->m_MeshReader = o;
- else if( category == "MeshWriter" )
- this->m_MeshWriter = o;
- else if( category == "DicomSeriesReader" )
- this->m_DicomSeriesReader = o;
- else
- this->m_Filters[ category ].insert( name );
-
- /*
- if( category == "ImageReader" )
- this->m_ImageReaderClass = name;
- else if( category == "ImageWriter" )
- this->m_ImageWriterClass = name;
- else if( category == "MeshReader" )
- this->m_MeshReaderClass = name;
- else if( category == "MeshWriter" )
- this->m_MeshWriterClass = name;
- else if( category == "MeshToMeshFilter" )
- {
- if( name.find_last_of( "Cutter" ) != std::string::npos )
- this->m_MeshCutterClass = name;
- }
- else if( category == "ImageToImageFilter" )
- {
- QAction* action =
- this->m_UI->MenuImageToImage->addAction( QString( name.c_str( ) ) );
- QObject::connect(
- action, SIGNAL( triggered( ) ),
- this, SLOT( _triggered_actionImageToImage( ) )
- );
- }
- else if( category == "ImageToMeshFilter" )
- {
- QAction* action =
- this->m_UI->MenuImageToMesh->addAction( QString( name.c_str( ) ) );
- QObject::connect(
- action, SIGNAL( triggered( ) ),
- this, SLOT( _triggered_actionImageToMesh( ) )
- );
-
- } // fi
- */
-
- } // rof
+ /*
+ this->m_MPRObjects->ClearAll( );
+ this->m_Images.clear( );
+ this->m_Meshes.clear( );
+ */
}
#endif // cpPlugins_Interface_QT4
#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#include <cpPlugins/Interface/Config.h>
-#error ACA VOY
-
#ifdef cpPlugins_Interface_QT4
-#include <map>
-#include <set>
-#include <string>
-
#include <QApplication>
#include <QMenu>
#include <QVTKWidget.h>
#include <vtkSmartPointer.h>
-
#include <cpExtensions/QT/QuadSplitter.h>
#include <cpExtensions/Visualization/MPRObjects.h>
-#include <cpPlugins/Interface/Interface.h>
-#include <cpPlugins/Interface/ProcessObject.h>
-#include <cpPlugins/Interface/Image.h>
-#include <cpPlugins/Interface/Mesh.h>
namespace cpPlugins
{
Q_OBJECT;
public:
- typedef cpPlugins::Interface::Interface TInterface;
- typedef cpPlugins::Interface::ProcessObject TProcessObject;
- typedef cpPlugins::Interface::DataObject TDataObject;
- typedef cpPlugins::Interface::Image TImage;
- typedef cpPlugins::Interface::Mesh TMesh;
-
typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
typedef TMPRObjects::TBaseStyle TBaseStyle;
typedef TMPRObjects::TKeyCommand TKeyCommand;
typedef TMPRObjects::TVoidCommand TVoidCommand;
- typedef std::set< std::string > TOrderedStringContainer;
- typedef std::map< std::string, std::set< std::string > > TFilters;
-
public:
explicit BaseMPRWindow( QWidget* parent = 0 );
virtual ~BaseMPRWindow( );
- void DialogLoadPlugins( );
- void AssociatePluginsToMenu(
- QMenu* menu, QObject* obj, const char* slot
- );
-
- inline void Block( )
- {
- QApplication::setOverrideCursor( Qt::WaitCursor );
- this->setEnabled( false );
- }
- inline void Unblock( )
- {
- QApplication::restoreOverrideCursor( );
- this->setEnabled( true );
- }
-
- bool LoadPlugins( const std::string& fname );
- void LoadPlugins( );
-
- // Data IO
- std::string ReadImage( TImage::Pointer& image );
- std::string ReadDicomSeries( TImage::Pointer& image );
- std::string ReadMesh( TMesh::Pointer& mesh );
-
- std::string WriteImage( TImage* image );
- std::string WriteMesh( TMesh* mesh );
-
- /* TODO
- void ExecuteFilter(
- const std::string& name,
- const std::string& input_id,
- const std::string& output_id
- );
- */
-
- // Filter acces
- bool CreateFilter(
- TProcessObject::Pointer& filter, const std::string& name
- )
- {
- return( this->m_Interface.CreateProcessObject( name ) );
- }
-
-
// Somme visualization accessors
- bool ShowImage( TImage* image, bool is_primal = true );
- bool ShowMesh( TMesh* mesh );
- double GetWindow( ) const
- {
- return( this->m_MPRObjects->GetWindow( ) );
- }
- double GetLevel( ) const
- {
- return( this->m_MPRObjects->GetLevel( ) );
- }
-
- /* TODO
- void ClearAll( );
- */
-
- protected:
- void _UpdatePlugins( );
+ bool ShowImage( vtkImageData* image );
+ bool ShowImage( vtkImageData* image, double r, double g, double b );
+ bool ShowMesh( vtkPolyData* mesh );
+ double GetWindow( ) const;
+ double GetLevel( ) const;
+ void ClearAll( );
protected:
vtkSmartPointer< TMPRObjects > m_MPRObjects;
QVTKWidget* m_YVTK;
QVTKWidget* m_ZVTK;
QVTKWidget* m_WVTK;
-
- TInterface m_Interface;
- TOrderedStringContainer m_LoadedPlugins;
- std::string m_LastLoadedPlugin;
-
- TProcessObject::Pointer m_ImageReader;
- TProcessObject::Pointer m_ImageWriter;
- TProcessObject::Pointer m_MeshReader;
- TProcessObject::Pointer m_MeshWriter;
- TProcessObject::Pointer m_DicomSeriesReader;
- TFilters m_Filters;
};
} // ecapseman
QObject::connect( bb, SIGNAL( rejected( ) ), this, SLOT( reject( ) ) );
this->m_ToolsLayout->addWidget( bb );
- return( this->QDialog::exec( ) );
+ int ret = this->QDialog::exec( );
+ this->syncParameters( );
+ return( ret );
}
// -------------------------------------------------------------------------
--- /dev/null
+#include <cpPlugins/Interface/Plugins.h>
+#include <cpPlugins/Interface/Config.h>
+
+#include <fstream>
+#include <sstream>
+
+#ifdef cpPlugins_Interface_QT4
+
+#include <QApplication>
+#include <QFileDialog>
+#include <QMenu>
+#include <QMessageBox>
+#include <QWidget>
+
+#ifdef _WIN32
+# define PLUGIN_PREFIX ""
+# define PLUGIN_EXT "dll"
+# define PLUGIN_REGEX "Plugins file (*.dll);;All files (*)"
+#else // Linux
+# define PLUGIN_PREFIX "lib"
+# define PLUGIN_EXT "so"
+# define PLUGIN_REGEX "Plugins file (*.so);;All files (*)"
+#endif // _WIN32
+
+#endif // cpPlugins_Interface_QT4
+
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Plugins::
+Plugins( QWidget* widget )
+ : m_Widget( widget ),
+ m_LastLoadedPlugin( "." )
+{
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Plugins::
+~Plugins( )
+{
+ this->m_Interface.UnloadAll( );
+}
+
+// -------------------------------------------------------------------------
+QWidget* cpPlugins::Interface::Plugins::
+GetWidget( )
+{
+ return( this->m_Widget );
+}
+
+// -------------------------------------------------------------------------
+const QWidget* cpPlugins::Interface::Plugins::
+GetWidget( ) const
+{
+ return( this->m_Widget );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Plugins::
+SetWidget( QWidget* widget )
+{
+ this->m_Widget = widget;
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Plugins::
+BlockWidget( )
+{
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ {
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+ this->m_Widget->setEnabled( false );
+
+ } // fi
+#endif // cpPlugins_Interface_QT4
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Plugins::
+UnblockWidget( )
+{
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ {
+ QApplication::restoreOverrideCursor( );
+ this->m_Widget->setEnabled( true );
+
+ } // fi
+#endif // cpPlugins_Interface_QT4
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Plugins::
+DialogLoadPlugins( )
+{
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ {
+ QFileDialog dialog( this->m_Widget );
+ dialog.setFileMode( QFileDialog::ExistingFile );
+ dialog.setDirectory( this->m_LastLoadedPlugin.c_str( ) );
+ dialog.setNameFilter( QFileDialog::tr( PLUGIN_REGEX ) );
+ dialog.setDefaultSuffix( QFileDialog::tr( PLUGIN_EXT ) );
+ if( !( dialog.exec( ) ) )
+ return;
+
+ std::string fname = dialog.selectedFiles( ).at( 0 ).toStdString( );
+ if( !( this->LoadPlugins( fname ) ) )
+ QMessageBox::critical(
+ this->m_Widget,
+ QMessageBox::tr( "Ignoring plugin" ),
+ QMessageBox::tr( fname.c_str( ) )
+ );
+
+ } // fi
+#endif // cpPlugins_Interface_QT4
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Plugins::
+AssociatePluginsToMenu( QMenu* menu, QObject* obj, const char* slot )
+{
+#ifdef cpPlugins_Interface_QT4
+ std::map< std::string, std::set< std::string > >::const_iterator i;
+ std::set< std::string >::const_iterator j;
+
+ menu->clear( );
+ for( i = this->m_Filters.begin( ); i != this->m_Filters.end( ); i++ )
+ {
+ QMenu* newMenu = menu->addMenu( i->first.c_str( ) );
+ for( j = i->second.begin( ); j != i->second.end( ); ++j )
+ {
+ QAction* a = newMenu->addAction( j->c_str( ) );
+ QObject::connect( a, SIGNAL( triggered( ) ), obj, slot );
+
+ } // rof
+
+ } // rof
+#endif // cpPlugins_Interface_QT4
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+LoadPlugins( const std::string& fname )
+{
+ this->BlockWidget( );
+
+ // Is it already loaded?
+ bool ret = true;
+ if( this->m_LoadedPlugins.find( fname ) == this->m_LoadedPlugins.end( ) )
+ {
+ // Was it succesfully loaded?
+ ret = this->m_Interface.Load( fname );
+
+ // Update a simple track
+ if( ret )
+ {
+ this->m_LoadedPlugins.insert( fname );
+ this->m_LastLoadedPlugin = fname;
+ this->_Update( );
+
+ } // fi
+
+ } // fi
+
+ this->UnblockWidget( );
+ return( ret );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+LoadPluginsConfigurationFile( const std::string& fname )
+{
+ // Load file into a char buffer
+ std::ifstream in(
+ fname.c_str( ), std::ios::in | std::ios::binary | std::ios::ate
+ );
+ if( !in.is_open( ) )
+ return( false );
+
+ std::streampos size = in.tellg( );
+ char* buffer = new char[ size ];
+ in.seekg( 0, std::ios::beg );
+ in.read( buffer, size );
+ in.close( );
+
+ // Read stream
+ std::stringstream in_stream( buffer );
+ char line[ 4096 ];
+ while( in_stream )
+ {
+ in_stream.getline( line, 4096 );
+ this->LoadPlugins( line );
+
+ } // elihw
+ delete buffer;
+
+ return( true );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetImageReaderParameters( )
+{
+ return( this->m_ImageReader->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetMeshReaderParameters( )
+{
+ return( this->m_MeshReader->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetImageWriterParameters( )
+{
+ return( this->m_ImageWriter->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetMeshWriterParameters( )
+{
+ return( this->m_MeshWriter->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetImageReaderParameters( ) const
+{
+ return( this->m_ImageReader->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetMeshReaderParameters( ) const
+{
+ return( this->m_MeshReader->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetImageWriterParameters( ) const
+{
+ return( this->m_ImageWriter->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::Interface::Plugins::
+TParameters* cpPlugins::Interface::Plugins::
+GetMeshWriterParameters( ) const
+{
+ return( this->m_MeshWriter->GetParameters( ) );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+ReadImage( TImage::Pointer& image, bool exec_qt )
+{
+ std::string ret = "";
+ if( this->m_ImageReader.IsNull( ) )
+ ret = "Plugins: No valid image reader. Please load a valid plugin.";
+
+ if( ret == "" )
+ {
+ bool execute = true;
+ if( exec_qt )
+ execute = this->m_ImageReader->ExecConfigurationDialog( this->m_Widget );
+ if( execute )
+ {
+ this->BlockWidget( );
+ ret = this->m_ImageReader->Update( );
+ this->UnblockWidget( );
+ if( ret == "" )
+ {
+ image = this->m_ImageReader->GetOutput< TImage >( "Output" );
+ this->m_ImageReader->DisconnectOutputs( );
+ this->m_ImageReader->GetParameters( )->ClearStringList( "FileNames" );
+ }
+ else
+ image = NULL;
+
+ } // fi
+
+ } // fi
+
+ // Show an error message and return
+ if( ret != "" )
+ {
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ QMessageBox::critical(
+ this->m_Widget,
+ QMessageBox::tr( "Error reading image." ),
+ QMessageBox::tr( ret.c_str( ) )
+ );
+#endif // cpPlugins_Interface_QT4
+ return( false );
+ }
+ else
+ return( true );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+ReadDicomSeries( TImage::Pointer& image )
+{
+ std::string ret = "";
+ if( this->m_DicomSeriesReader.IsNull( ) )
+ ret = "Plugins: No valid dicom series reader. Please load a valid plugin.";
+
+ if( ret == "" )
+ {
+ if( this->m_DicomSeriesReader->ExecConfigurationDialog( this->m_Widget ) )
+ {
+ this->BlockWidget( );
+ ret = this->m_DicomSeriesReader->Update( );
+ this->UnblockWidget( );
+ if( ret == "" )
+ {
+ image = this->m_DicomSeriesReader->GetOutput< TImage >( "Output" );
+ this->m_DicomSeriesReader->DisconnectOutputs( );
+ this->m_DicomSeriesReader->GetParameters( )->
+ ClearStringList( "FileNames" );
+ }
+ else
+ image = NULL;
+
+ } // fi
+
+ } // fi
+
+ // Show an error message and return
+ if( ret != "" )
+ {
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ QMessageBox::critical(
+ this->m_Widget,
+ QMessageBox::tr( "Error reading dicom series." ),
+ QMessageBox::tr( ret.c_str( ) )
+ );
+#endif // cpPlugins_Interface_QT4
+ return( false );
+ }
+ else
+ return( true );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+ReadMesh( TMesh::Pointer& mesh, bool exec_qt )
+{
+ std::string ret = "";
+ if( this->m_MeshReader.IsNull( ) )
+ ret = "Plugins: No valid mesh reader. Please load a valid plugin.";
+
+ if( ret == "" )
+ {
+ bool execute = true;
+ if( exec_qt )
+ execute = this->m_MeshReader->ExecConfigurationDialog( this->m_Widget );
+ if( execute )
+ {
+ this->BlockWidget( );
+ ret = this->m_MeshReader->Update( );
+ this->UnblockWidget( );
+ if( ret == "" )
+ {
+ mesh = this->m_MeshReader->GetOutput< TMesh >( "Output" );
+ this->m_MeshReader->DisconnectOutputs( );
+ }
+ else
+ mesh = NULL;
+
+ } // fi
+
+ } // fi
+
+ // Show an error message and return
+ if( ret != "" )
+ {
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ QMessageBox::critical(
+ this->m_Widget,
+ QMessageBox::tr( "Error reading image." ),
+ QMessageBox::tr( ret.c_str( ) )
+ );
+#endif // cpPlugins_Interface_QT4
+ return( false );
+ }
+ else
+ return( true );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+WriteImage( TImage* image, bool exec_qt )
+{
+ std::string ret = "";
+ if( this->m_ImageWriter.IsNull( ) )
+ ret = "Plugins: No valid image writer. Please load a valid plugin.";
+
+ if( ret == "" )
+ {
+ bool execute = true;
+ if( exec_qt )
+ execute = this->m_ImageWriter->ExecConfigurationDialog( this->m_Widget );
+ if( execute )
+ {
+ this->m_ImageWriter->SetInput( "Input", image );
+ this->BlockWidget( );
+ ret = this->m_ImageWriter->Update( );
+ this->UnblockWidget( );
+
+ } // fi
+
+ } // fi
+
+ // Show an error message and return
+ if( ret != "" )
+ {
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ QMessageBox::critical(
+ this->m_Widget,
+ QMessageBox::tr( "Error reading image." ),
+ QMessageBox::tr( ret.c_str( ) )
+ );
+#endif // cpPlugins_Interface_QT4
+ return( false );
+ }
+ else
+ return( true );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+WriteMesh( TMesh* mesh, bool exec_qt )
+{
+ std::string ret = "";
+ if( this->m_MeshWriter.IsNull( ) )
+ ret = "Plugins: No valid mesh writer. Please load a valid plugin.";
+
+ if( ret == "" )
+ {
+ bool execute = true;
+ if( exec_qt )
+ execute = this->m_MeshReader->ExecConfigurationDialog( this->m_Widget );
+ if( execute )
+ {
+ this->m_MeshWriter->SetInput( 0, mesh );
+ this->BlockWidget( );
+ ret = this->m_MeshWriter->Update( );
+ this->UnblockWidget( );
+
+ } // fi
+
+ } // fi
+
+ // Show an error message and return
+ if( ret != "" )
+ {
+#ifdef cpPlugins_Interface_QT4
+ if( this->m_Widget != NULL )
+ QMessageBox::critical(
+ this->m_Widget,
+ QMessageBox::tr( "Error reading image." ),
+ QMessageBox::tr( ret.c_str( ) )
+ );
+#endif // cpPlugins_Interface_QT4
+ return( false );
+ }
+ else
+ return( true );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Plugins::
+CreateFilter( TProcessObject::Pointer& filter, const std::string& name )
+{
+ filter = this->m_Interface.CreateProcessObject( name );
+ return( filter.IsNotNull( ) );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Plugins::
+_Update( )
+{
+ typedef TInterface::TClasses _C;
+
+ this->m_Filters.clear( );
+ _C& classes = this->m_Interface.GetClasses( );
+ for( _C::const_iterator i = classes.begin( ); i != classes.end( ); ++i )
+ {
+ TProcessObject::Pointer o =
+ this->m_Interface.CreateProcessObject( i->first );
+ std::string name = o->GetClassName( );
+ std::string category = o->GetClassCategory( );
+ if( category == "ImageReader" )
+ this->m_ImageReader = o;
+ else if( category == "ImageWriter" )
+ this->m_ImageWriter = o;
+ else if( category == "MeshReader" )
+ this->m_MeshReader = o;
+ else if( category == "MeshWriter" )
+ this->m_MeshWriter = o;
+ else if( category == "DicomSeriesReader" )
+ this->m_DicomSeriesReader = o;
+ else
+ this->m_Filters[ category ].insert( name );
+
+ } // rof
+}
+
+// eof - $RCSfile$
--- /dev/null
+#ifndef __CPPLUGINS__INTERFACE__PLUGINS__H__
+#define __CPPLUGINS__INTERFACE__PLUGINS__H__
+
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
+
+#include <map>
+#include <set>
+#include <string>
+
+#include <cpPlugins/Interface/Interface.h>
+#include <cpPlugins/Interface/ProcessObject.h>
+#include <cpPlugins/Interface/Image.h>
+#include <cpPlugins/Interface/Mesh.h>
+
+class QObject;
+class QMenu;
+class QWidget;
+
+namespace cpPlugins
+{
+ namespace Interface
+ {
+ /**
+ */
+ class cpPlugins_Interface_EXPORT Plugins
+ {
+ public:
+ typedef cpPlugins::Interface::Interface TInterface;
+ typedef cpPlugins::Interface::ProcessObject TProcessObject;
+ typedef cpPlugins::Interface::DataObject TDataObject;
+ typedef cpPlugins::Interface::Image TImage;
+ typedef cpPlugins::Interface::Mesh TMesh;
+ typedef TProcessObject::TParameters TParameters;
+
+ typedef std::set< std::string > TOrderedStringContainer;
+ typedef std::map< std::string, std::set< std::string > > TFilters;
+
+ public:
+ Plugins( QWidget* widget = NULL );
+ virtual ~Plugins( );
+
+ QWidget* GetWidget( );
+ const QWidget* GetWidget( ) const;
+ void SetWidget( QWidget* widget );
+ void BlockWidget( );
+ void UnblockWidget( );
+ void DialogLoadPlugins( );
+ void AssociatePluginsToMenu(
+ QMenu* menu, QObject* obj, const char* slot
+ );
+
+ bool LoadPlugins( const std::string& fname );
+ bool LoadPluginsConfigurationFile( const std::string& fname );
+
+ TParameters* GetImageReaderParameters( );
+ TParameters* GetMeshReaderParameters( );
+ TParameters* GetImageWriterParameters( );
+ TParameters* GetMeshWriterParameters( );
+
+ const TParameters* GetImageReaderParameters( ) const;
+ const TParameters* GetMeshReaderParameters( ) const;
+ const TParameters* GetImageWriterParameters( ) const;
+ const TParameters* GetMeshWriterParameters( ) const;
+
+ // Data IO
+ bool ReadImage( TImage::Pointer& image, bool exec_qt = false );
+ bool ReadDicomSeries( TImage::Pointer& image );
+ bool ReadMesh( TMesh::Pointer& mesh, bool exec_qt = false );
+
+ bool WriteImage( TImage* image, bool exec_qt = false );
+ bool WriteMesh( TMesh* mesh, bool exec_qt = false );
+
+ // Filter acces
+ bool CreateFilter(
+ TProcessObject::Pointer& filter, const std::string& name
+ );
+
+ protected:
+ void _Update( );
+
+ protected:
+ QWidget* m_Widget;
+
+ TInterface m_Interface;
+ TOrderedStringContainer m_LoadedPlugins;
+ std::string m_LastLoadedPlugin;
+
+ TProcessObject::Pointer m_ImageReader;
+ TProcessObject::Pointer m_ImageWriter;
+ TProcessObject::Pointer m_MeshReader;
+ TProcessObject::Pointer m_MeshWriter;
+ TProcessObject::Pointer m_DicomSeriesReader;
+ TFilters m_Filters;
+ };
+
+ } // ecapseman
+
+} // ecapseman
+
+#endif // __CPPLUGINS__INTERFACE__PLUGINS__H__
+
+// eof - $RCSfile$
} // fi
- std::cout << "ok" << std::endl;
if( !( this->m_ParametersDialog->IsModal( ) ) )
{
this->m_ParametersDialog->show( );
}
else
r = ( this->m_ParametersDialog->exec( ) == 1 );
+
/*
r = cpPlugins::Interface::ParametersQtDialog(
this->m_Parameters,
mc->ComputeNormalsOff( );
mc->SetInputData( vtk_image );
for( unsigned int i = 0; i < values.size( ); ++i )
+ {
+ std::cout << i << " " << values[ i ] << std::endl;
mc->SetValue( i, values[ i ] );
+ }
mc->Update( );
pd = mc->GetOutput( );
}
#include <sstream>
#include <vector>
+#include <QApplication>
#include <QDialogButtonBox>
#include <QDir>
#include <QFileDialog>
return( false );
// Prepare dialog
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+ if( parent != NULL )
+ parent->setEnabled( false );
+
QDialog* tree_dialog = new QDialog( parent );
QTreeWidget* tree_widget = new QTreeWidget( tree_dialog );
QList< QTreeWidgetItem* > tree_items;
);
toolsLayout->addWidget( bb );
+ QApplication::restoreOverrideCursor( );
+ if( parent != NULL )
+ parent->setEnabled( true );
+
if( tree_dialog->exec( ) == 0 )
return( false );
QTreeWidgetItem* item_parent = item->parent( );
if( item_parent != NULL )
{
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+ if( parent != NULL )
+ parent->setEnabled( false );
+
std::string serie_dir = item_parent->text( 0 ).toStdString( );
std::string serie_id = item->text( 0 ).toStdString( );
serie_id = serie_id.substr( serie_id.find_first_of( " " ) + 1 );
r = true;
+ QApplication::restoreOverrideCursor( );
+ if( parent != NULL )
+ parent->setEnabled( true );
+
} // fi
} // fi
dialog.setFileMode( QFileDialog::ExistingFiles );
dialog.setDirectory( QFileDialog::tr( name.c_str( ) ) );
dialog.setNameFilters( filters );
+ dialog.setAcceptMode( QFileDialog::AcceptOpen );
if( dialog.exec( ) )
{
QStringList names = dialog.selectedFiles( );
#include <itkImageFileWriter.h>
+#ifdef cpPlugins_Interface_QT4
+#include <QFileDialog>
+#endif // cpPlugins_Interface_QT4
+
+// -------------------------------------------------------------------------
+bool cpPlugins::IO::ImageWriter::
+ExecConfigurationDialog( QWidget* parent )
+{
+ bool r = false;
+
+#ifdef cpPlugins_Interface_QT4
+
+ std::string name = this->m_Parameters->GetString( "FileName" );
+ if( name == "" )
+ name = "save.mhd";
+
+ // Show dialog and check if it was accepted
+ QString qname =
+ QFileDialog::getSaveFileName(
+ parent,
+ QFileDialog::tr( "Save File" ),
+ QFileDialog::tr( name.c_str( ) ),
+ QFileDialog::tr( "Image files (*.bmp *.png *.jpg *.jpeg *.dcm *.mhd *.nhdr *.nrrd *.tiff);;Any file (*)")
+ );
+ name = qname.toStdString( );
+ if( name != "" )
+ {
+ this->m_Parameters->SetString( "FileName", name );
+ r = true;
+
+ } // fi
+
+#endif // cpPlugins_Interface_QT4
+
+ return( r );
+}
+
// -------------------------------------------------------------------------
cpPlugins::IO::ImageWriter::
ImageWriter( )
cpPlugins::IO::ImageWriter, "ImageWriter"
);
+ public:
+ virtual bool ExecConfigurationDialog( QWidget* parent );
+
protected:
ImageWriter( );
virtual ~ImageWriter( );
#include <vtkPolyData.h>
#include <vtkPolyDataWriter.h>
+#ifdef cpPlugins_Interface_QT4
+#include <QFileDialog>
+#endif // cpPlugins_Interface_QT4
+
+// -------------------------------------------------------------------------
+bool cpPlugins::IO::MeshWriter::
+ExecConfigurationDialog( QWidget* parent )
+{
+ bool r = false;
+
+#ifdef cpPlugins_Interface_QT4
+
+ std::string name = this->m_Parameters->GetString( "FileName" );
+ if( name == "" )
+ name = "save.vtk";
+
+ // Show dialog and check if it was accepted
+ QString qname =
+ QFileDialog::getSaveFileName(
+ parent,
+ QFileDialog::tr( "Save File" ),
+ QFileDialog::tr( name.c_str( ) ),
+ QFileDialog::tr( "Mesh files (*.vtk *.stl *.obj);;Any file (*)")
+ );
+ name = qname.toStdString( );
+ if( name != "" )
+ {
+ this->m_Parameters->SetString( "FileName", name );
+ r = true;
+
+ } // fi
+
+#endif // cpPlugins_Interface_QT4
+
+ return( r );
+}
+
// -------------------------------------------------------------------------
cpPlugins::IO::MeshWriter::
MeshWriter( )
cpPlugins::IO::MeshWriter, "MeshWriter"
);
+ public:
+ virtual bool ExecConfigurationDialog( QWidget* parent );
+
protected:
MeshWriter( );
virtual ~MeshWriter( );