+#ifdef cpPlugins_Interface_QT4
+#include <QFileDialog>
+#endif // cpPlugins_Interface_QT4
+
+// -------------------------------------------------------------------------
+bool cpPlugins::IO::ImageReader::
+ExecConfigurationDialog( QWidget* parent )
+{
+ bool r = false;
+
+#ifdef cpPlugins_Interface_QT4
+
+ QStringList filters;
+ filters
+ << "Image files (*.bmp *.png *.jpg *.jpeg *.dcm *.mhd *.nhdr *.nrrd *.tiff)"
+ << "Any files (*)";
+
+ std::vector< std::string > names;
+ this->m_Parameters->GetStringList( names, "FileNames" );
+ std::string name = ( names.size( ) > 0 )? names[ 0 ]: ".";
+
+ // Show dialog and check if it was accepted
+ QFileDialog dialog( parent );
+ 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( );
+ QStringList::const_iterator qIt = names.begin( );
+ for( ; qIt != names.end( ); ++qIt )
+ this->m_Parameters->AddToStringList(
+ "FileNames", qIt->toStdString( )
+ );
+ this->m_Parameters->SetBool( "VectorType", false );
+ r = true;
+
+ } // fi
+
+#endif // cpPlugins_Interface_QT4
+
+ return( r );
+}
+