creaContours_lib
interfToolsMenu.cxx
Go to the documentation of this file.
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 # pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
15 #
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
20 # liability.
21 #
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25 
26 #include "interfToolsMenu.h"
27 #include "interfMainPanel.h"
28 
29 interfToolsMenu::interfToolsMenu(wxWindow * parent, int sizex, int sizey,wxEvtHandler* evtHandler, std::string datdir)
30  : interfMenuBar(parent, sizex, sizey)
31 {
32  this->datadir = datdir;
33  //contourevent = (wxContourEventHandler*)evtHandler;
34  //infoWin = NULL;
35 
36 /*EED Borrame
37  configPanel = NULL;
38  segmentPanel = NULL;
39  spreadPanel = NULL;
40  segmentPanelITK = NULL;
41 
42 // eventHandler = evtHandler;
43 */
44 
45  initButtons(this);
46 }
47 
48 void interfToolsMenu::initButtons(wxEvtHandler* evtHandler) {
49 
50  std::vector<std::string> path, nom;
51  std::vector<wxObjectEventFunction> funct;
52 
53  path.push_back(datadir + "/Spread.png");
54  nom.push_back("The selected contour will spread through all slides");
55  funct.push_back((wxObjectEventFunction) &interfToolsMenu:: onRigidPressed);
56 
57  path.push_back(datadir + "/Spread1.png");
58  nom.push_back("Select more than one contour and find the contours between them");
59  funct.push_back((wxObjectEventFunction) &interfToolsMenu:: onSpreadPressed);
60 
61  path.push_back(datadir + "/Mirror.png");
62  nom.push_back("Create an Axis and select a contour to mirror it accordingly");
63  funct.push_back((wxObjectEventFunction) &interfToolsMenu:: onMirrorPressed);
64 
65 //CMRU 17-08-09 ------------------------------------------------------------------
66  path.push_back(datadir + "/Letter.PNG");
67  nom.push_back("Insert a Label");
68  funct.push_back((wxObjectEventFunction)&interfToolsMenu::onPrintLabel);
69 //-------------------------------------------------------------------------------
70 
71 
72  this->addButtons(path, nom);
73  this->setVectorFunction(funct);
74 
75  //this->setButtonName(0, wxContour_ActionCommandsID::CHANGE_TOOL);
76 
77  this->connectEvents(evtHandler);
78 
79 
80 }
81 
83 {
84 }
85 
92 void interfToolsMenu::onRigidPressed(wxCommandEvent& event)
93 {
95 }
96 
97 void interfToolsMenu::onSpreadPressed(wxCommandEvent& event)
98 {
100 }
101 
102 void interfToolsMenu::onMirrorPressed(wxCommandEvent& event)
103 {
105 }
106 
107 void interfToolsMenu::onPrintLabel(wxCommandEvent& event)
108 {
110 }
111