interfImageToolsMenu.cxx

Go to the documentation of this file.
00001 #include "interfImageToolsMenu.h"
00002 #include "interfMainPanel.h"
00003 
00004 interfImageToolsMenu::interfImageToolsMenu(wxWindow * parent, int sizex, int sizey,wxEvtHandler* evtHandler, std::string datdir)
00005         : interfMenuBar(parent, sizex, sizey)
00006 {
00007         this->datadir   = datdir;
00008         //contourevent  = (wxContourEventHandler*)evtHandler;
00009 
00010 /*Borrame
00011         infoWin                 = NULL;
00012         configPanel             = NULL;
00013         spreadPanel             = NULL;
00014         segmentPanelITK = NULL;
00015 */
00016 
00017         //eventHandler = evtHandler;
00018 
00019         initButtons(this);
00020 }
00021 
00022 void interfImageToolsMenu::initButtons(wxEvtHandler* evtHandler) {
00023 
00024         std::vector<std::string> path, nom;
00025         std::vector<wxObjectEventFunction> funct;
00026 
00027 /*EED Borrame
00028         path.push_back(datadir + "/Segmentation.png");
00029         nom.push_back("Find shapes by automatic segmentation");
00030         funct.push_back((wxObjectEventFunction) &interfSegmentationMenu:: onSegmentationPressed);
00031 
00032         path.push_back(datadir + "/ITK.png");
00033         nom.push_back("Find shapes by automatic segmentation with ITK");
00034         funct.push_back((wxObjectEventFunction) &interfSegmentationMenu:: onSegmentationPressedITK);
00035 
00036         path.push_back(datadir + "/snake.png");
00037         nom.push_back("Find shapes using border snake interaction");
00038         funct.push_back((wxObjectEventFunction) &interfSegmentationMenu:: onSnakePressed);
00039 */
00040         path.push_back(datadir + "/pignon.png");
00041         nom.push_back("Configuration of the window");
00042         funct.push_back((wxObjectEventFunction) &interfImageToolsMenu:: onConfigurationPressed);
00043 
00044         path.push_back(datadir + "/info.png");
00045         nom.push_back("Information of the contours in the scene");
00046         funct.push_back((wxObjectEventFunction) &interfImageToolsMenu:: onInformationPressed);
00047         
00048         path.push_back(datadir + "/Threshold.png");
00049         nom.push_back("Superpose a 'Red Image' to the selected Image Threshold");
00050         funct.push_back((wxObjectEventFunction)&interfImageToolsMenu::onThreshold);
00051 
00052         path.push_back(datadir + "/Threshold.png");
00053         nom.push_back("Superpose a Color Image");
00054         funct.push_back((wxObjectEventFunction)&interfImageToolsMenu::onColorLayerImage);
00055 
00056         path.push_back(datadir + "/Help.png");
00057         nom.push_back("Show help page with information about the tools");
00058         funct.push_back((wxObjectEventFunction) &interfImageToolsMenu:: onHelpPressed);
00059 
00060 
00061         this->addButtons(path, nom);    
00062         this->setVectorFunction(funct);
00063 
00064         this->connectEvents(evtHandler);
00065            
00066 
00067 }
00068 
00069 interfImageToolsMenu::~interfImageToolsMenu()
00070 {
00071 }
00072 
00080 /*EED Borrame
00081 void  interfSegmentationMenu::onSegmentationPressed(wxCommandEvent& event)
00082 {
00083         interfMainPanel::getInstance()->onSegmentationPressed();
00084 }
00085 
00086 void  interfSegmentationMenu::onSegmentationPressedITK(wxCommandEvent& event)
00087 {
00088         interfMainPanel::getInstance()->onSegmentationPressedITK();    
00089 }
00090 
00091 void  interfSegmentationMenu::onSnakePressed(wxCommandEvent& event)
00092 {
00093         interfMainPanel::getInstance()->onSnakePressed();
00094 }
00095 */
00096 
00097 void  interfImageToolsMenu::onInformationPressed(wxCommandEvent& event)
00098 {
00099         interfMainPanel::getInstance()->onInformationPressed();
00100 }
00101 
00102 void  interfImageToolsMenu::onConfigurationPressed(wxCommandEvent& event)
00103 {
00104         interfMainPanel::getInstance()->onConfigurationPressed();
00105 }
00106 
00107 void interfImageToolsMenu::onThreshold(wxCommandEvent& event)
00108 {
00109         interfMainPanel::getInstance()->onThresholdPressed();
00110 }
00111 
00112 void interfImageToolsMenu::onColorLayerImage(wxCommandEvent& event)
00113 {
00114         interfMainPanel::getInstance()->onColorLayerImagePressed();
00115 }
00116 
00117 void interfImageToolsMenu::onHelpPressed(wxCommandEvent& event)
00118 {
00119   wxLaunchDefaultBrowser(_T("http://www.creatis.insa-lyon.fr/site/fr/EndUserGuide"), 0);
00120 }
00121 
00122 //------------------------------------------------------------------------------------------------------------
00123 

Generated on Wed Jun 27 23:28:32 2012 for creaContours_lib by  doxygen 1.5.7.1