Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@2186 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
- Loading branch information
Arnaud Gelas
committed
Feb 16, 2010
1 parent
3c433b6
commit d008cf1
Showing
4 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 30 additions & 2 deletions
32
trunk/GoFigure2Beta/Examples/GUI/Plugins/MedianFilteringPlugin/medianpluginMain.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,37 @@ | ||
#include "medianplugin.h" | ||
|
||
#include <typeinfo> | ||
#include <QDir> | ||
#include <QPluginLoader> | ||
|
||
int main( int argc, char** argv ) | ||
{ | ||
medianplugin* plugin = new medianplugin; | ||
delete plugin; | ||
QDir PluginDir( "plugins/" ); | ||
|
||
// Here open one image | ||
|
||
foreach( QString fileName, PluginDir.entryList( QDir::Files ) ) | ||
{ | ||
QPluginLoader loader( PluginDir.absoluteFilePath( fileName ) ); | ||
|
||
QObject* plugin = loader.instance(); | ||
|
||
if( plugin ) | ||
{ | ||
medianplugin* temp = dynamic_cast< medianplugin* >( plugin ); | ||
|
||
if( temp ) | ||
{ | ||
std::cout <<"median plugin correctly loaded" <<std::endl; | ||
|
||
// process the image through the plugin | ||
|
||
// simulate the interaction with the interface | ||
|
||
// write the outputs | ||
} | ||
} | ||
} | ||
|
||
return 0; | ||
} |