X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2FInteractiveDeformableMeshSegmentation%2FMainWnd_LoadPlugins.cxx;h=27fbfe2fab30bcaad8ded329f0107fb87856e97b;hb=bece008148f4a08cff5daaa3c9b2824462b94319;hp=8c01ef8e1b26fa212b6e54787da77202c58489b6;hpb=93ddd2fe04d05b28dff31448032fd3af93ffe750;p=cpMesh.git diff --git a/appli/InteractiveDeformableMeshSegmentation/MainWnd_LoadPlugins.cxx b/appli/InteractiveDeformableMeshSegmentation/MainWnd_LoadPlugins.cxx index 8c01ef8..27fbfe2 100644 --- a/appli/InteractiveDeformableMeshSegmentation/MainWnd_LoadPlugins.cxx +++ b/appli/InteractiveDeformableMeshSegmentation/MainWnd_LoadPlugins.cxx @@ -111,126 +111,7 @@ _LoadPlugins( ) ); // Historic objects - - - - /* - this->m_ImageReaderClassName = ""; - this->m_ImageSeriesReaderClassName = ""; - this->m_ImageWriterClassName = ""; - - if( in ) - { - std::string plugin; - std::getline( in, plugin ); - while( !( in.eof( ) ) ) - { - if( this->m_Plugins.Load( plugin ) ) - { - TPluginsInterface::TClassesIterator cIt = - this->m_Plugins.GetClasses( ).begin( ); - TPluginsInterface::TClassesIterator end_cIt = - this->m_Plugins.GetClasses( ).end( ); - for( ; cIt != end_cIt; ++cIt ) - { - std::string c_name = cIt->first; - c_name = c_name.substr( c_name.find_last_of( ":" ) + 1 ); - if( c_name == "ImageReader" ) - { - this->m_ImageReaderClassName = cIt->first; - } - else if( c_name == "ImageSeriesReader" ) - { - this->m_ImageSeriesReaderClassName = cIt->first; - } - else if( c_name == "ImageWriter" ) - { - this->m_ImageWriterClassName = cIt->first; - } - else - { - } // fi - - } // rof - - TFilterPlugins::TClassesIterator cIt = - this->m_Plugins.BeginClasses( ); - for( ; cIt != this->m_Plugins.EndClasses( ); ++cIt ) - { - TFilterObject* filter = - this->m_Plugins.CreateObject( cIt->first ); - if( filter == NULL ) - continue; - std::string cat = filter->GetCategory( ); - std::string catType = cat.substr( cat.find_last_of( ":" ) ); - if( catType == ":BinaryImageToBinaryImageFilter" ) - { - QAction* action = this->m_UI->menuFilterSegmentedImage-> - addAction( QString( cIt->first.c_str( ) ) ); - QObject::connect( - action, SIGNAL( triggered( ) ), - this, SLOT( triggered_aFilterSegmentedImage( ) ) - ); - } - else if( catType == ":ImageToMeshFilter" ) - { - QAction* action = this->m_UI->menuExtractMesh-> - addAction( QString( cIt->first.c_str( ) ) ); - QObject::connect( - action, SIGNAL( triggered( ) ), - this, SLOT( triggered_aSegmentedImageToMesh( ) ) - ); - - } // fi - delete filter; - } // rof - } - else - { - QMessageBox::warning( - this, - tr( "Ignoring plugin" ), - tr( plugin.c_str( ) ) - ); - - } // fi - std::getline( in, plugin ); - - } // elihw - } - else - { - QMessageBox::critical( - this, - tr( "No plugins file loaded!" ), - tr( this->m_PluginsConfigurationFile.c_str( ) ) - ); - - } // fi - in.close( ); - - if( this->m_ImageReaderClassName == "" ) - { - QMessageBox::critical( - this, - tr( "No ImageReader found in plugins!" ), - tr( this->m_PluginsConfigurationFile.c_str( ) ) - ); - - } // fi - - if( this->m_ImageWriterClassName == "" ) - { - QMessageBox::critical( - this, - tr( "No ImageWriter found in plugins!" ), - tr( this->m_PluginsConfigurationFile.c_str( ) ) - ); - - } // fi - this->_UpdateEnabledFlags( ); - */ - } +} // ------------------------------------------------------------------------- bool MainWnd::