]> Creatis software - creaContours.git/commitdiff
85%
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Thu, 6 Nov 2008 20:01:01 +0000 (20:01 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Thu, 6 Nov 2008 20:01:01 +0000 (20:01 +0000)
30 files changed:
lib/Interface_Icons_NDimensions/interfEditMenu.cxx
lib/Interface_Icons_NDimensions/interfIOMenu.cxx
lib/Interface_Icons_NDimensions/interfIOMenu.h
lib/Interface_Icons_NDimensions/interfMainPanel.cxx
lib/Interface_Icons_NDimensions/interfMenuBar.h
lib/Interface_Icons_NDimensions/interfSegmentationMenu.cxx
lib/Interface_Icons_NDimensions/interfToolsMenu.cxx
lib/Interface_Icons_NDimensions/interfToolsSpreadPanel.cxx
lib/Interface_Icons_NDimensions/interfToolsSpreadPanel.h
lib/Interface_ManagerContour_NDimensions/ConceptDataWrap.h
lib/Interface_ManagerContour_NDimensions/PerformingOperation.h
lib/Interface_ManagerContour_NDimensions/__wxContourEventHandler.cxx__
lib/Interface_ManagerContour_NDimensions/wxConceptControl.cxx
lib/Interface_ManagerContour_NDimensions/wxContourEventHandler.cxx
lib/Interface_ManagerContour_NDimensions/wxContourEventHandler.h
lib/Interface_ManagerContour_NDimensions/wxContour_AutomaticFormsToolsPanel.h
lib/Interface_ManagerContour_NDimensions/wxContour_ButtonsBar.cxx
lib/Interface_ManagerContour_NDimensions/wxContour_ControlPanel.h
lib/Interface_ManagerContour_NDimensions/wxContour_DrawToolsPanel.h
lib/Interface_ManagerContour_NDimensions/wxContour_EdtionToolsPanel.h
lib/Interface_ManagerContour_NDimensions/wxContour_Grid.h
lib/Interface_ManagerContour_NDimensions/wxContour_ListViewPanel.h
lib/Interface_ManagerContour_NDimensions/wxContour_MenuBar.cxx
lib/Interface_ManagerContour_NDimensions/wxContour_MenuBar.h
lib/Interface_ManagerContour_NDimensions/wxContour_OperationsToolsPanel.h
lib/Interface_ManagerContour_NDimensions/wxContour_StandardToolsPanel.h
lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx
lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx
lib/kernel_ManagerContour_NDimensions/OutlineModelManager.cxx
lib/kernel_ManagerContour_NDimensions/OutlineModelManager.h

index 75aec01935ae46aa78a5cd3ae624565baf91672f..d566f3e76b268b0fcc6804cd0a768d958757700b 100644 (file)
@@ -33,8 +33,8 @@ void interfEditMenu::initButtons(wxEvtHandler* evtHandler) {
     this->addButtons(path, nom);
        this->setVectorFunction(funct);
 
-       this->setButtonName(0, wxContour_ActionCommandsID::COPY_TOOL);
-       this->setButtonName(1, wxContour_ActionCommandsID::PASTE_TOOL);
+       this->setButtonName(0, wxContour_ActionCommnadsID::COPY_TOOL);
+       this->setButtonName(1, wxContour_ActionCommnadsID::PASTE_TOOL);
        this->setButtonName(2, '-');
        this->setButtonName(3, '-');
 
index ddf20f993059ce07b9688649b5a584a45314c6d6..4884a6ac9e80b2d0b9a796554be8c66aef073c5c 100644 (file)
@@ -24,8 +24,8 @@ void interfIOMenu::initButtons(wxEvtHandler* evtHandler) {
        this->addButtons(path, nom);
        this->setVectorFunction(funct);
 
-       this->setButtonName(0, wxContour_ActionCommandsID::OPEN_TOOL);
-       this->setButtonName(1, wxContour_ActionCommandsID::SAVE_TOOL);
+       this->setButtonName(0, wxContour_ActionCommnadsID::OPEN_TOOL);
+       this->setButtonName(1, wxContour_ActionCommnadsID::SAVE_TOOL);
 
        this->connectEvents(evtHandler);
 
index ce3bd5c6d001e37e327845e1c357e38cb893e853..a9910e08f287a966069d758c742efe58ffa8318e 100644 (file)
@@ -13,11 +13,11 @@ public:
 
     virtual void initButtons(wxEvtHandler* evtHandler) ;
 
-       void interfIOMenu :: onActionButtonPressed( wxCommandEvent& event );
+       void onActionButtonPressed( wxCommandEvent& event );
 
 private:
        //wxEvtHandler* eventHandler;
        
 };
 
-#endif
\ No newline at end of file
+#endif
index 720c24e3e878e814a1acee3e63e7d6e11751d64a..e4fe6a5d4dd73f20e7029c57fa3556d8110d5f47 100644 (file)
@@ -24,12 +24,12 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        PANEL4 = "Tools";  
        PANEL5 = "Segmentation";
 
-       splitterwindow = new wxSplitterWindow(this,-1, wxDefaultPosition, wxSize(sizex, sizey), wxSP_3DSASH, wxString(""));
+       splitterwindow = new wxSplitterWindow(this,-1, wxDefaultPosition, wxSize(sizex, sizey), wxSP_3DSASH, wxString(_T("")));
        
        sizey = sizey/8;
        currentWindow = NULL;
 
-       wxPanel* toolpanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(""));
+       wxPanel* toolpanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
 
        wxFlexGridSizer* flexsizer = new wxFlexGridSizer(6,2,1,1);      
        toolpanel->SetSizer(flexsizer, true);
@@ -48,12 +48,12 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        wxButton* b5 = getButton(toolpanel);
        b5->SetClientData(&PANEL5);
 
-       wxPanel* mentex = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(""));
-       wxPanel* mentex1 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(""));
-       wxPanel* mentex2 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(""));
-       wxPanel* mentex3 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(""));
-       wxPanel* mentex4 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(""));
-       wxPanel* mentex5 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(""));
+       wxPanel* mentex = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
+       wxPanel* mentex1 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
+       wxPanel* mentex2 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
+       wxPanel* mentex3 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
+       wxPanel* mentex4 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
+       wxPanel* mentex5 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
        
        menubar = new interfNewContourMenu(mentex, sizex, sizey, evtHandler, datadir);          
        menubar1 = new interfIOMenu(mentex1, sizex, sizey, evtHandler, datadir);        
@@ -90,7 +90,7 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        toolpanel->Update();
        toolpanel->Layout();
 
-       infoPanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(""));
+       infoPanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T("")));
        wxFlexGridSizer* infosizer = new wxFlexGridSizer(1,1,2,2);      
        infoPanel->SetSizer(infosizer, true);
        infoPanel->SetAutoLayout( true );       
@@ -238,7 +238,7 @@ interfMainPanel* interfMainPanel::getInstance(){
 wxPanel* interfMainPanel::initializeToolsPanel(wxWindow* parent, int sizex, int sizey, wxEvtHandler * evtHandler){
 
 
-       wxPanel* panel = new wxPanel(parent, -1, wxDefaultPosition, wxSize(sizex, sizey), wxBORDER_SUNKEN, wxString("Spread"));
+       wxPanel* panel = new wxPanel(parent, -1, wxDefaultPosition, wxSize(sizex, sizey), wxBORDER_SUNKEN, wxString(_T("Spread")));
 
        wxFlexGridSizer* flexsizer = new wxFlexGridSizer(2,1,2,2)       ;
        panel->SetSizer(flexsizer, true);
@@ -283,34 +283,34 @@ void interfMainPanel::onActionButtonPressed1( wxCommandEvent& event ){
        int sizechange=0;
 
 
-       if(dstring==PANEL){
+       if(dstring.compare(PANEL)==0){
                dmenu = menubar;
                text = statictext;
-       }else if( dstring==PANEL1){
+       }else if(dstring.compare(PANEL1)==0 ){
                dmenu = menubar1;       
                text = statictext1;
-       }else if(dstring==PANEL2){
+       }else if(dstring.compare(PANEL2)==0){
                dmenu = menubar2;
                text = statictext2;
-       }else if(dstring==PANEL3){
+       }else if(dstring.compare(PANEL3)==0){
                dmenu = menubar3;
                text = statictext3;
-       }else if(dstring==PANEL4){
+       }else if(dstring.compare(PANEL4)==0){
                dmenu = menubar4;
                text = statictext4;
-       }else if(dstring==PANEL5){
+       }else if(dstring.compare(PANEL5)==0){
                dmenu = menubar5;
                text = statictext5;
        }
 
-       if(b->GetLabel() == "+" ){
+       if(wxStrcmp(b->GetLabel(),_T("+"))==0 ){
                dmenu->Show(true);
                sizechange = 1;
-               b->SetLabel("-");
+               b->SetLabel(_T("-"));
        }else{
                dmenu->Show(false);             
                sizechange = -1;
-               b->SetLabel("+");
+               b->SetLabel(_T("+"));
        }       
        
        sizechange *= dmenu->GetSize().GetHeight();
@@ -321,13 +321,13 @@ void interfMainPanel::onActionButtonPressed1( wxCommandEvent& event ){
 }
 
 wxStaticText* interfMainPanel::getText(wxWindow* parent, std::string nom){
-       return new wxStaticText(parent, -1, wxString(nom), wxDefaultPosition, 
-                                                       wxDefaultSize, wxALIGN_CENTRE, wxString(nom));
+       return new wxStaticText(parent, -1, wxString(nom.c_str(),wxConvUTF8), wxDefaultPosition, 
+                                                       wxDefaultSize, wxALIGN_CENTRE, wxString(nom.c_str(),wxConvUTF8));
 }
 
 wxButton* interfMainPanel::getButton(wxWindow* parent){
-       wxButton* b = new wxButton(parent, -1, wxString("-"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
-                                                               wxDefaultValidator, wxString("-"));     
+       wxButton* b = new wxButton(parent, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
+                                                               wxDefaultValidator, wxString(_T("-"))); 
        return b;
 }
 
index 53b11f726cfed685c5337130f2b4e6e51162de82..f9879dab2cf4671c4c8f4b903d8fa60470e69053 100644 (file)
@@ -55,11 +55,8 @@ public:
                
                for(int i = 0; i < vnom.size(); i++){
                        //sizex = vectbutton[i]->GetSize().GetWidth();
-                       //const std::string n = vnom[i];
-                       wxString newstring1(vnom[i].c_str() , wxConvUTF8);
-                       //vectbutton[i]->SetToolTip(wxString(n));
-                       vectbutton[i]->SetToolTip(newstring1);
-                       
+                       std::string n = vnom[i];
+                       vectbutton[i]->SetToolTip(wxString(n.c_str(),wxConvUTF8));
                        //wxStaticText* statictext = getText(n, sizex, 15);
                        //flexsizer->Add(statictext, wxEXPAND |wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTRE_HORIZONTAL|wxSHAPED);
                }
@@ -76,13 +73,12 @@ public:
        virtual wxBitmapButton* getButton(std::string imgpath, int sizex, int sizey){
                vectimgpath.push_back(imgpath);
                                
-               wxString newstring1( imgpath.c_str() , wxConvUTF8);
-               //wxBitmap* bitmap = new wxBitmap(imgpath,  wxBITMAP_TYPE_PNG);
-                wxBitmap* bitmap = new wxBitmap(newstring1,  wxBITMAP_TYPE_PNG);
                
+               wxBitmap* bitmap = new wxBitmap(wxString(imgpath.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
+
                //wxSize(sizex,sizey)
                wxBitmapButton* bitmapbutton = new wxBitmapButton(this, -1, *bitmap, wxDefaultPosition, wxDefaultSize,
-                                                                                       wxBU_AUTODRAW, wxDefaultValidator, _T(""));
+                                                                                       wxBU_AUTODRAW, wxDefaultValidator, wxString(_T("")));
 
                vectbutton.push_back(bitmapbutton);
                return bitmapbutton;
@@ -97,10 +93,8 @@ public:
        **/
        virtual wxStaticText* getText(std::string nom, int sizex, int sizey){
                vectnom.push_back(nom);
-               wxString newstring1(nom.c_str() , wxConvUTF8);
-               return new wxStaticText(this, -1, newstring1 /*wxString(nom)*/, wxDefaultPosition, 
-                                                               //wxSize(sizex,sizey), wxALIGN_CENTRE, wxString(nom));
-                                                               wxSize(sizex,sizey), wxALIGN_CENTRE, newstring1);
+               return new wxStaticText(this, -1, wxString(nom.c_str(),wxConvUTF8), wxDefaultPosition, 
+                                                               wxSize(sizex,sizey), wxALIGN_CENTRE, wxString(nom.c_str(),wxConvUTF8));
        }
     /**
        **      Sets the vector funcion, this vector must contain a function for each button created
@@ -143,7 +137,8 @@ public:
        **/
        virtual void setButtonName(int i, const char c){
                if(i < vectbutton.size()){
-                       vectbutton[i]->SetName(c);
+                       std::string ac = c+"";
+                       vectbutton[i]->SetName(wxString(ac.c_str(),wxConvUTF8));
                }
        }
 
index fb5e8eae932d81bdd7ad35aa9259541cdf9ac8b4..8ae1df67c48eb73bdcee2a949ff6d7c4d5209db5 100644 (file)
@@ -56,7 +56,7 @@ interfSegmentationMenu::~interfSegmentationMenu()
 
 void  interfSegmentationMenu::onSegmentationPressed(wxCommandEvent& event){
     if(segmentPanel == NULL){
-               segmentPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(""));
+               segmentPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
                        
 
                wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
@@ -67,8 +67,8 @@ void  interfSegmentationMenu::onSegmentationPressed(wxCommandEvent& event){
                wxPanel* panel = contourevent->getSegmentationPanel(segmentPanel);
        
 
-               wxStaticText* stattext = new wxStaticText(segmentPanel, -1, wxString("   Automatic Segmentation   "), wxDefaultPosition,
-                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(""));
+               wxStaticText* stattext = new wxStaticText(segmentPanel, -1, wxString(_T("   Automatic Segmentation   ")), wxDefaultPosition,
+                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
 
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
                flexsizer->Add(panel, wxEXPAND);
@@ -89,7 +89,7 @@ void interfSegmentationMenu::hideAxis(){
 
 void  interfSegmentationMenu::onSegmentationPressedITK(wxCommandEvent& event){
     if(segmentPanelITK == NULL){
-               segmentPanelITK = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(""));
+               segmentPanelITK = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
                        
 
                wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
@@ -100,8 +100,8 @@ void  interfSegmentationMenu::onSegmentationPressedITK(wxCommandEvent& event){
                wxPanel* panel = contourevent->getSegmentationPanelITK(segmentPanelITK);
        
 
-               wxStaticText* stattext = new wxStaticText(segmentPanelITK, -1, wxString("   Automatic ITK Segmentation   "), wxDefaultPosition,
-                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(""));
+               wxStaticText* stattext = new wxStaticText(segmentPanelITK, -1, wxString(_T("   Automatic ITK Segmentation   ")), wxDefaultPosition,
+                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
 
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
                flexsizer->Add(panel, wxEXPAND);
index d92b5a5737e154b36b3cf9e6d9d97834543d1b9f..6ee87b34489920bf35e6cb9261019460f6b05b05 100644 (file)
@@ -42,7 +42,7 @@ void interfToolsMenu::initButtons(wxEvtHandler* evtHandler) {
        this->addButtons(path, nom);    
        this->setVectorFunction(funct);
 
-       this->setButtonName(0, wxContour_ActionCommandsID::CHANGE_TOOL);
+       this->setButtonName(0, wxContour_ActionCommnadsID::CHANGE_TOOL);
 
        this->connectEvents(evtHandler);
           
@@ -68,7 +68,7 @@ void  interfToolsMenu::onSpreadPressed(wxCommandEvent& event){
 
        if(spreadPanel==NULL){
 
-               spreadPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(""));
+               spreadPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
                wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
                spreadPanel->SetSizer(flexsizer, true);
                spreadPanel->SetAutoLayout( true );     
@@ -77,8 +77,8 @@ void  interfToolsMenu::onSpreadPressed(wxCommandEvent& event){
                wxPanel* panel = contourevent->getSpreadPanel(spreadPanel);
        
 
-               wxStaticText* stattext = new wxStaticText(spreadPanel, -1, wxString("   Automatic Spread   "), wxDefaultPosition,
-                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(""));
+               wxStaticText* stattext = new wxStaticText(spreadPanel, -1, wxString(_T("   Automatic Spread   ")), wxDefaultPosition,
+                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
 
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
                flexsizer->Add(panel, wxEXPAND);
@@ -122,7 +122,7 @@ void  interfToolsMenu::onInformationPressed(wxCommandEvent& event){
 void  interfToolsMenu::onConfigurationPressed(wxCommandEvent& event){
 
        if(configPanel == NULL){
-               configPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(""));
+               configPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxString(_T("")));
                wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);    
                configPanel->SetSizer(flexsizer, true);
                configPanel->SetAutoLayout( true );     
@@ -130,8 +130,8 @@ void  interfToolsMenu::onConfigurationPressed(wxCommandEvent& event){
                
                wxPanel* panel = contourevent->getConfigurationPanel(configPanel);
 
-               wxStaticText* stattext = new wxStaticText(configPanel, -1, wxString("   Interface Configuration   "), wxDefaultPosition,
-                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(""));
+               wxStaticText* stattext = new wxStaticText(configPanel, -1, wxString(_T("   Interface Configuration   ")), wxDefaultPosition,
+                       wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
 
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
 
index 20d6c8cda2beda7bb7ebcc8b7eaf493aaee5874b..f00b780b3ae35dd87efecbc21b4a74586ec57922 100644 (file)
@@ -31,7 +31,7 @@ interfToolsSpreadPanel::~interfToolsSpreadPanel()
 }
 
 wxPanel* interfToolsSpreadPanel::initializeRadioBox(){
-       wxPanel* panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, _T(""));
+       wxPanel* panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
        wxString lstOptions[3];
        lstOptions[0]=_T("A");
        lstOptions[1]=_T("B");
@@ -44,20 +44,20 @@ wxPanel* interfToolsSpreadPanel::initializeRadioBox(){
 wxPanel* interfToolsSpreadPanel::initializeButton(std::string path, std::string nom){
                        
 
-       wxPanel* panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, _T(""));
+       wxPanel* panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
 
        wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1,2,2,2);      
        panel->SetSizer(flexsizer, true);
        panel->SetAutoLayout( true );
        
-       wxBitmap* bitmap = new wxBitmap(path, wxBITMAP_TYPE_PNG);
+       wxBitmap* bitmap = new wxBitmap(wxString(path.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
 
        wxBitmapButton* bitmapbutton = new wxBitmapButton(panel, -1, *bitmap, wxDefaultPosition, wxDefaultSize,
-                                                                               wxBU_AUTODRAW, wxDefaultValidator, _T(""));
+                                                                               wxBU_AUTODRAW, wxDefaultValidator, wxString(_T("")));
 
        
-       wxStaticText* statictext = new wxStaticText(panel, -1, wxString(nom), wxDefaultPosition, 
-                                                               wxDefaultSize, wxALIGN_CENTRE, wxString(nom));
+       wxStaticText* statictext = new wxStaticText(panel, -1, wxString(nom.c_str(),wxConvUTF8), wxDefaultPosition, 
+                                                               wxDefaultSize, wxALIGN_CENTRE, wxString(nom.c_str(),wxConvUTF8));
 
        
        flexsizer->Add(bitmapbutton, wxFIXED_MINSIZE);
@@ -70,9 +70,9 @@ wxPanel* interfToolsSpreadPanel::initializeButton(std::string path, std::string
 
 wxPanel* interfToolsSpreadPanel::initializeAddRemoveContour(){
        
-       wxPanel* panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE |wxVSCROLL , _T(""));
+       wxPanel* panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE |wxVSCROLL , wxString(_T("")));
 
-       scrollwin = new wxScrolledWindow(panel, -1, wxDefaultPosition, wxSize(80,50), wxVSCROLL, _T(""));
+       scrollwin = new wxScrolledWindow(panel, -1, wxDefaultPosition, wxSize(80,50), wxVSCROLL, wxString(_T("")));
 
        checkboxsizer = new wxFlexGridSizer(0,1,2,2);   
 
@@ -88,8 +88,8 @@ wxPanel* interfToolsSpreadPanel::initializeAddRemoveContour(){
 void interfToolsSpreadPanel::addContourCheckBox(std::string id){
 
 
-       wxCheckBox* check = new wxCheckBox(scrollwin, -1, wxString(id), wxDefaultPosition, wxDefaultSize, 0,
-                                                       wxDefaultValidator, wxString(id));
+       wxCheckBox* check = new wxCheckBox(scrollwin, -1, wxString(id.c_str(),wxConvUTF8), wxDefaultPosition, wxDefaultSize, 0,
+                                                       wxDefaultValidator, wxString(id.c_str(),wxConvUTF8));
 
        checkvect.push_back(id);
 
index afd5ca1eed5edbe9120aaab00ee85e66fca8157a..a0ffdb76d4221f944b486e331e124048df146587 100644 (file)
@@ -71,6 +71,4 @@ private:
 
 };
 
-#endif
+#endif
\ No newline at end of file
index c2ad82b38cfd35f9d909b526419a7eee506fb8bf..40fd49df04b3d43c7c2b0accee5aabdc74184291 100644 (file)
@@ -92,6 +92,4 @@ private:
 
 
 };
-#endif // __ConceptDataWrap_HEADER_FILE__
+#endif // __ConceptDataWrap_HEADER_FILE__
\ No newline at end of file
index 7f423110842f145017f8c76fbb29d40290f5fba3..565350b6f26f7ba7e25b01fa43c1e816b7927908 100644 (file)
@@ -83,6 +83,4 @@ private:
        char _endCommand;
 
 };
-#endif // __PerformingOperation_HEADER_FILE__
+#endif // __PerformingOperation_HEADER_FILE__
\ No newline at end of file
index 0a2ad3bc8c943eae716e651df392ca25ee2c6d7e..a78be789d7753f4053e8dcd6a0cae7553a24965b 100644 (file)
@@ -84,7 +84,7 @@ digraph example_0 {
 // Includes
 //------------------------------------------------------------------------------------------------------------
 
-#include "wxContour_ActionCommandsID.h"
+#include "wxContour_ActionCommnadsID.h"
 #include "NameWrapper.h"
 #include "ConceptDataWrap.h"
 #include "OutlineGroup.h"
@@ -1791,7 +1791,7 @@ myfile.close();
                std::vector<int> tempVector;
                _instantPanel->getInstant( tempVector );
         _performingOperation->reset();
-               _performingOperation->setStartCommand( (char)wxContour_ActionCommandsID::COPY_TOOL );
+               _performingOperation->setStartCommand( (char)wxContour_ActionCommnadsID::COPY_TOOL );
                _performingOperation->setStartOperationInstantVector( tempVector );
                _performingOperation->setKeyNamesOperationElems( keyNamesVector );
 
@@ -1800,7 +1800,7 @@ myfile.close();
        void wxContourEventHandler :: onPasteOutlines( )
        {
                char theStartCommand = _performingOperation->getStartCommand();
-               if (  theStartCommand == wxContour_ActionCommandsID::COPY_TOOL )
+               if (  theStartCommand == wxContour_ActionCommnadsID::COPY_TOOL )
                {
                        std::vector<int> tempVector;
                        _instantPanel->getInstant( tempVector );
@@ -2638,35 +2638,35 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event)
        {
                std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
                int elementsSelected = currentSelection.size();
-               if( toolCommand == (wxContour_ActionCommandsID::CREATE_TOOL) )
+               if( toolCommand == (wxContour_ActionCommnadsID::CREATE_TOOL) )
                {
                        onCreateContourFrame();
                }
-               if( toolCommand == (wxContour_ActionCommandsID::CREATE_CONTOUR_KEY) )
+               if( toolCommand == (wxContour_ActionCommnadsID::CREATE_CONTOUR_KEY) )
                {
                        createContour();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::DELETE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::DELETE_TOOL )
                {
                        onDeleteFrame( );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::DELETE_KEY )
+               else if( toolCommand == wxContour_ActionCommnadsID::DELETE_KEY )
                {
                        deleteContours( currentSelection );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SAVE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SAVE_TOOL )
                {
                        saveFileWithContours(  );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SAVE_KEY )
+               else if( toolCommand == wxContour_ActionCommnadsID::SAVE_KEY )
                {
                        saveFileWithContoursAutomatique(  );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::OPEN_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::OPEN_TOOL )
                {
                        openFileWithContours(  );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::CHANGE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::CHANGE_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
@@ -2674,69 +2674,69 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event)
                        }
 
                }
-               else if( toolCommand == wxContour_ActionCommandsID::HIDE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::HIDE_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onHideOutlines( currentSelection );
                        }                       
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SHOW_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SHOW_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onShowOutlines( currentSelection );
                        }
                }
-               else if( toolCommand == wxContour_ActionCommandsID::COPY_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::COPY_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onCopyOutlines( currentSelection );
                        }
                }
-               else if( toolCommand == wxContour_ActionCommandsID::PASTE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::PASTE_TOOL )
                {
                        onPasteOutlines(  );                    
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SPREAD_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SPREAD_TOOL )
                {
                                onSpread();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::AUTOMATIQUESEGMENTATION_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::AUTOMATIQUESEGMENTATION_TOOL )
                {
                        onAutomatiqueSegmentation(  );                  
                }
 
-               else if( toolCommand == wxContour_ActionCommandsID::SELECT_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SELECT_TOOL )
                {
                        onSelectOutlines( currentSelection );
                        
                }
-               else if( toolCommand == wxContour_ActionCommandsID::EDIT_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::EDIT_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onEditOutlines( currentSelection );
                        }
                }
-               else if( toolCommand == wxContour_ActionCommandsID::UNDO_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::UNDO_TOOL )
                {
                        onUNDO();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::REDO_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::REDO_TOOL )
                {
                        onREDO();
                }               
-               else if( toolCommand == wxContour_ActionCommandsID::INFORMATIONCONTOUR_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::INFORMATIONCONTOUR_TOOL )
                {
                        onInformationContourFrame();
                }               
-               else if( toolCommand == wxContour_ActionCommandsID::INTERFACECONFIGURATION_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::INTERFACECONFIGURATION_TOOL )
                {
                        onInterfaceConfigurationFrame();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::TEST_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::TEST_TOOL )
                {
                        onInterfaceTestFrame();
                }               
index 833c04731c50577106b7ddc1d11d81ab61a1cb10..47c1c7e923de0f70e13e86560e10e79a104e036c 100644 (file)
@@ -232,10 +232,18 @@ DEFINE_EVENT_TYPE( wxEVT_CONCEPT_RELEASE )
        //------------------------------------------------------------------------------------------------------------
        wxCheckBox * wxConceptControl :: createCheckBoxAndAddToSizer(wxSizer *sizer, std::string label, wxWindowID id,int groupID)
        {
-               char buffer[33];
-               //itoa( groupID, buffer, 10); // No ANSI C!
-               sprintf(buffer, "%d", groupID);
-               wxCheckBox *checkbox = new wxCheckBox( this, -1, wxString(  label.c_str(), wxConvUTF8), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxString( buffer, wxConvUTF8) );
+               //char buffer[33];
+               //itoa( groupID, buffer, 10);
+
+               std::string buffer;
+               for(int k = groupID; k == 0; k++){
+                       char temp = k % 10 + 48;
+                       k = k / 10;
+                       buffer = temp + buffer; 
+               }
+
+               //wxCheckBox *checkbox = new wxCheckBox( this, -1, wxString(  label.c_str(), wxConvUTF8), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxString( buffer, wxConvUTF8) );
+               wxCheckBox *checkbox = new wxCheckBox( this, -1, wxString(  label.c_str(), wxConvUTF8), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxString( buffer.c_str(), wxConvUTF8) );
                sizer->Add(checkbox, 0, wxLEFT | wxRIGHT, 5);
                sizer->Add(0, 2, 0, wxGROW); 
                checkBoxes.push_back( checkbox );
index ace7008429f3afb300c918ad02c90dc04b527e5c..e53cf8723ecf1c0548232427983564e4c091fe6b 100644 (file)
@@ -1,6 +1,6 @@
 
 
-/*  Diagrama de Secuencia de cambiar un instante
+/*  Diagrama de Secuaencia de cambiar un instante
 wxContourEventHandler :: changeInstant()
        OutlineModelManager :: ->setInstant( _actualInstant );
                OutlineModelManager :: updateToActualInstant()
@@ -84,7 +84,7 @@ digraph example_0 {
 // Includes
 //------------------------------------------------------------------------------------------------------------
 
-#include "wxContour_ActionCommandsID.h"
+#include "wxContour_ActionCommnadsID.h"
 #include "NameWrapper.h"
 #include "ConceptDataWrap.h"
 #include "OutlineGroup.h"
@@ -103,7 +103,6 @@ digraph example_0 {
 #include <vtkImageMapToWindowLevelColors.h>
 
 
-
 //------------------------------------------------------------------------------------------------------------
 //------------------------------------------------------------------------------------------------------------
 //------------------------------------------------------------------------------------------------------------
@@ -119,9 +118,9 @@ PanelBullEyeOptions::PanelBullEyeOptions (wxWindow * parent, wxSize size) :
 
 
        wxString lstOptions[2];
-       lstOptions[0]=_T("General options");
-       lstOptions[1]=_T("Detail options");
-       _radioboxBullEyeGenOpt  = new wxRadioBox(panel, -1, _T("General/Detail options"), wxDefaultPosition, wxSize(200,45), 2 , lstOptions,  2, wxRA_SPECIFY_COLS);
+       lstOptions[0]= wxString("General options",wxConvUTF8);
+       lstOptions[1]= wxString("Detail options",wxConvUTF8);
+       _radioboxBullEyeGenOpt  = new wxRadioBox(panel, -1, wxString("General/Detail options",wxConvUTF8), wxDefaultPosition, wxSize(200,45), 2 , lstOptions,  2, wxRA_SPECIFY_COLS);
        _radioboxBullEyeGenOpt->SetSelection(0);
 
        _spinctrlBullEyeNumOfCrowns = new wxSpinCtrl( panel , -1,_T("B"),wxDefaultPosition, wxSize(40,20) );
@@ -369,10 +368,7 @@ double PanelBullEyeOptions::GetAngDeltaOfCrownSection(int nCrown)
                inundo = 0;
                inredo = 0;
                stundoredo = "data/temp";
-               char buff[3000]; // hope it's enough!
-               sprintf(buff, "mkdir %s;",stundoredo.c_str());
-               system(buff); 
-               //mkdir(stundoredo.c_str());
+               mkdir(stundoredo.c_str(),755);
                stundoredo += "/cont";
        }
        //------------------------------------------------------------------------------------------------------------
@@ -521,7 +517,7 @@ double PanelBullEyeOptions::GetAngDeltaOfCrownSection(int nCrown)
 
        void wxContourEventHandler::onSpreadReset( wxCommandEvent& event )
        {
-               _wxtextctrlSpread->SetValue(_T(""));
+               _wxtextctrlSpread->SetValue(wxString("",wxConvUTF8));
                _contourPropagation->resetAppend();
        }
 
@@ -545,13 +541,16 @@ double PanelBullEyeOptions::GetAngDeltaOfCrownSection(int nCrown)
 
                        _contourPropagation->appendContour(&vecX , &vecY , &vecZ);
                        wxString newstring;
-                       newstring.Printf(_T("%s %d -"),
-                                        _wxtextctrlSpread->GetValue().c_str(),
-                                        actualSlice );
+                       //newstring.Printf("%s %d -",_wxtextctrlSpread->GetValue(), actualSlice );
+                       newstring.append(wxString(_wxtextctrlSpread->GetValue(),wxConvUTF8));
+                       newstring.append(wxString(" ",wxConvUTF8));
+                       newstring.append(wxString(intToString(actualSlice).c_str(),wxConvUTF8));
                        _wxtextctrlSpread->SetValue(newstring);
                } // if 
        }
 
+       
+
        //------------------------------------------------------------------------------------------------------------
        void wxContourEventHandler::onSpreadGo( wxCommandEvent& event )
        {
@@ -589,7 +588,11 @@ double PanelBullEyeOptions::GetAngDeltaOfCrownSection(int nCrown)
                for ( z=(int)minZ ; z<=(int)maxZ ; z++ )
                {
                        porcent = 100.0* (z-minZ)/totalZ;
-                       tmpString.Printf( _T(" %d %c            %d/%d            %d"), (int)porcent , 37 , (int)(z-minZ+1), (int)totalZ,z );
+                       int numero = (int)(z-minZ+1)/(int)totalZ;
+                       std::string stringtemp = "  "+intToString(porcent)+"%            "+intToString(numero)+"            "+intToString(z);
+                       tmpString.Append(wxString(stringtemp.c_str(),wxConvUTF8));
+
+                       //tmpString.Printf("  %d %c            %d/%d            %d", (int)porcent , 37 , (int)(z-minZ+1), (int)totalZ,z );
                        _staticTextSpread->SetLabel(tmpString);
 
                        if (_contourPropagation->ifSliceKeyContourExist(z)==false)
@@ -632,7 +635,7 @@ double PanelBullEyeOptions::GetAngDeltaOfCrownSection(int nCrown)
                                } // if addedModel
                        }// ifSliceKeyContourExist
                } // for z
-               _staticTextSpread->SetLabel(_T("   "));
+               _staticTextSpread->SetLabel(wxString("   ",wxConvUTF8));
                //RefreshInterface();
 
 
@@ -703,7 +706,7 @@ double PanelBullEyeOptions::GetAngDeltaOfCrownSection(int nCrown)
 
                _contourPropagation                     = new ContourPropagation();
 
-               wxPanel *panel                          = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, /*wxString("")*/  _T("") );
+               wxPanel *panel                                                  = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, wxString("",wxConvUTF8));
 
                wxButton *spreadResetBtn        = new wxButton(panel,-1,_T("Reset"),wxDefaultPosition, wxDefaultSize );
                wxButton *spreadAddBtn          = new wxButton(panel,-1,_T("Add"),wxDefaultPosition, wxDefaultSize);
@@ -712,13 +715,13 @@ double PanelBullEyeOptions::GetAngDeltaOfCrownSection(int nCrown)
                lstOptions[0]=_T("A");
                lstOptions[1]=_T("B");
                lstOptions[2]=_T("C");
-               _spreadMethodRadiobox           = new wxRadioBox(panel, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxDefaultSize, 3 , lstOptions,  3, wxRA_SPECIFY_COLS);
+               _spreadMethodRadiobox                                           = new wxRadioBox(panel, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxDefaultSize, 3 , lstOptions,  3, wxRA_SPECIFY_COLS);
                _spreadMethodRadiobox->SetSelection(2);
 
                wxButton *spreadGoBtn           = new wxButton(panel,-1,_T("Go"),wxDefaultPosition, wxDefaultSize);
                _staticTextSpread                       = new wxStaticText(panel,-1,_T("    "));
 
-               _wxtextctrlSpread           = new wxTextCtrl(panel,-1, _T("") ,wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+               _wxtextctrlSpread           = new wxTextCtrl(panel,-1, _T(""),wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
 
                
                Connect( spreadResetBtn->GetId(),       wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContourEventHandler::onSpreadReset ); 
@@ -1051,7 +1054,7 @@ myfile.close();
                lstOptions[0]=_T("A");
                lstOptions[1]=_T("B");
                lstOptions[2]=_T("C");
-               methodRadiobox                                  = new wxRadioBox(panel, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxSize(200,45), 3 , lstOptions,  3, wxRA_SPECIFY_COLS);
+               methodRadiobox                                          = new wxRadioBox(panel, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxSize(200,45), 3 , lstOptions,  3, wxRA_SPECIFY_COLS);
                methodRadiobox->SetSelection(2);
                _staticTextSegmentation                         = new wxStaticText(panel,-1,_T("    "));
 
@@ -1109,7 +1112,7 @@ myfile.close();
                        wxButton *spreadResetBtn        = new wxButton(panel,-1,_T("Reset"),wxDefaultPosition, wxSize(80,35) );
                        wxButton *spreadAddBtn          = new wxButton(panel,-1,_T("Add"),wxDefaultPosition, wxSize(80,35));
                        wxButton *spreadGoBtn           = new wxButton(panel,-1,_T("GoA"),wxDefaultPosition, wxSize(80,35));
-                       _wxtextctrlTest                 = new wxTextCtrl(panel,-1, _T(""),wxDefaultPosition, wxSize(200,150), wxTE_MULTILINE );
+                       _wxtextctrlTest                         = new wxTextCtrl(panel,-1, _T(""),wxDefaultPosition, wxSize(200,150), wxTE_MULTILINE );
 
                        _TestFrame->SetEventHandler( this );
                        Connect( spreadResetBtn->GetId(),       wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContourEventHandler::onTestReset ); 
@@ -1162,15 +1165,12 @@ myfile.close();
                        } // for
 
                        _contourPropagation->appendContour(&vecX , &vecY , &vecZ);
-                       wxString newstring1( _wxtextctrlTest->GetValue().c_str() , wxConvUTF8);
-                       wxString newstring2;
-                       newstring2.Printf(_T(" %d -"), actualSlice );
-                       
                        wxString newstring;
-                       newstring = newstring1+newstring2;
-                       
-                       //newstring.Printf("%s %d -",_wxtextctrlTest->GetValue(), actualSlice );
-                       
+                       newstring.append(_wxtextctrlTest->GetValue());
+                       newstring.append(_T(" "));
+                       newstring.append(wxString(intToString(actualSlice).c_str(),wxConvUTF8));                        
+                       //newstring.Printf(_T("%s %d -"),,  );
+                       newstring.append(_T(" -"));
                        _wxtextctrlTest->SetValue(newstring);
                } // if 
        }
@@ -1256,6 +1256,7 @@ myfile.close();
        //------------------------------------------------------------------------------------------------------------
        void wxContourEventHandler::FillGridWithContoursInformation()
        {
+               wxString tempString;
                _grid->ClearGrid();
                _grid->SetColLabelValue(0, _T("A") );
                _grid->SetColLabelValue(1, _T("B") );
@@ -1276,19 +1277,14 @@ myfile.close();
                        std::vector<ContourThing**> lstContourThings = this->_modelManager->getOutlinesAtInstant( &instant );
 
                        sizeLstContourThings = lstContourThings.size();
-                       wxString tempString;
-                       tempString.Printf(_T("%d - %d"),
-                                         z, 
-                                         sizeLstContourThings);
-
+                       tempString.Printf(_T("%d - %d"),z, sizeLstContourThings);
                        _grid->SetRowLabelValue(z, tempString );
 
                        for (ii=0 ; ii<sizeLstContourThings ; ii++)
                        {
                                ContourThing **contourthing = lstContourThings[ii];
-                               //wxString tempString =  (*contourthing)->getName()  ;  // Doesn't compile. See Creatis Wiki !
-                               const wxString tempString2((*contourthing)->getName().c_str(),wxConvUTF8 );
-                               _grid->SetCellValue( z, ii, tempString2 );
+                               tempString = wxString((*contourthing)->getName().c_str(),wxConvUTF8) ;
+                               _grid->SetCellValue( z, ii, tempString );
                        }
                }
 
@@ -1536,7 +1532,9 @@ myfile.close();
                {
 
                        porcent = 100.0* (z-minZ)/totalZ;
-                       tmpString.Printf(_T("Saving Values  %d %c            %d/%d             %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
+                       
+                       tmpString.Printf(_T("Saving Values"));
+                       tmpString.Printf(_T("  %d %c            %d/%d             %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
                        _staticTextInformation->SetLabel(tmpString);
 
 
@@ -1588,7 +1586,14 @@ myfile.close();
                                                                                                                        &pLstValuePosZ);
 
                                wxString filename;
-                               filename.Printf(_T("%s\\%s-slice%d-cont%d.txt"),directory.c_str(),namefile.c_str(),z,iContourGroup);
+                               filename.Printf(_T("%s"),directory.c_str());
+                               filename.Printf(_T("\\"));
+                               filename.Printf(_T("%s"),namefile.c_str());
+                               filename.Printf(_T("-slice"));
+                               filename.Printf(_T("%d"),z);
+                               filename.Printf(_T("-cont"));
+                               filename.Printf(_T("%d"),iContourGroup);
+                               filename.Printf(_T(".txt"));
                                FILE *pFile=fopen((const char *)filename.mb_str(),"w+");
                                fprintf(pFile,"value \t x \t y \t z\n"  );
                                int iLstValue,sizeLstValue=pLstValue.size();
@@ -1646,7 +1651,8 @@ myfile.close();
                {
 
                        porcent = 100.0* (z-minZ)/totalZ;
-                       tmpString.Printf(_T("Saving Values  %d %c            %d/%d             %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
+                       tmpString.Printf(_T("Saving Values"));
+                       tmpString.Printf(_T("%d %c            %d/%d             %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
                        _staticTextInformation->SetLabel(tmpString);
 
                        //Extraction data from contours of each slice
@@ -1700,7 +1706,11 @@ myfile.close();
 
 
                wxString filename;
-               filename.Printf(_T("%s\\%s-Value.mhd"),directory.c_str(),namefile.c_str(),z);
+               //filename.Printf(_T("%s\\%s-Value.mhd",directory.c_str(),namefile.c_str(),z);
+               filename.Printf(_T("%s"),directory.c_str());
+               filename.Printf(_T("\\"));
+               filename.Printf(_T("%s"),namefile.c_str());
+               filename.Printf(_T("-Value.mhd"));
 
 // Image Value
                vtkMetaImageWriter *writerValueImage = vtkMetaImageWriter::New( );
@@ -1710,7 +1720,11 @@ myfile.close();
                writerValueImage->Write( );
 
 // Image Mask
-               filename.Printf(_T("%s\\%s-Mask.mhd"),directory.c_str(),namefile.c_str(),z);
+               //              filename.Printf("%s\\%s-Mask.mhd",directory.c_str(),namefile.c_str(),z);
+               filename.Printf(_T("%s"),directory.c_str());
+               filename.Printf(_T("\\"));
+               filename.Printf(_T("%s"),namefile.c_str());
+               filename.Printf(_T("-Mask.mhd"));
                vtkMetaImageWriter *writerMaskImage = vtkMetaImageWriter::New( );
                writerMaskImage->SetInput( contourextractdata->GetVtkImageMaskResult() );
                writerMaskImage->SetFileName( (const char *)filename.mb_str() );
@@ -1755,7 +1769,7 @@ myfile.close();
                        int iTitle,sizeTitle = (maxX / _numberOfVariablesStatistics);
                        for ( iTitle=0; iTitle<sizeTitle ; iTitle++)
                        {
-                               fprintf(pFile,"-- \t %d-Size \t SizeRange \t Min \t Max \t Ave \t StDv \t" , iTitle, tmpString.c_str() );
+                               fprintf(pFile,"-- \t %d-Size \t SizeRange \t Min \t Max \t Ave \t StDv \t" , iTitle,tmpString.char_str() );
                        }
                        fprintf(pFile,"\n" );
 
@@ -2084,7 +2098,7 @@ myfile.close();
                std::vector<int> tempVector;
                _instantPanel->getInstant( tempVector );
         _performingOperation->reset();
-               _performingOperation->setStartCommand( (char)wxContour_ActionCommandsID::COPY_TOOL );
+               _performingOperation->setStartCommand( (char)wxContour_ActionCommnadsID::COPY_TOOL );
                _performingOperation->setStartOperationInstantVector( tempVector );
                _performingOperation->setKeyNamesOperationElems( keyNamesVector );
 
@@ -2093,7 +2107,7 @@ myfile.close();
        void wxContourEventHandler :: onPasteOutlines( )
        {
                char theStartCommand = _performingOperation->getStartCommand();
-               if (  theStartCommand == wxContour_ActionCommandsID::COPY_TOOL )
+               if (  theStartCommand == wxContour_ActionCommnadsID::COPY_TOOL )
                {
                        //JCP 20-10-08 Undo redo implementation
                        saveState();
@@ -2179,7 +2193,7 @@ myfile.close();
        }
 
        //------------------------------------------------------------------------------------------------------------
-       void wxContourEventHandler :: deleteContours( std::vector<std::string> & keyNamesVector )
+       void wxContourEventHandler :: deleteContours( std::vector<std::string>  keyNamesVector )
        {
                int i,size=keyNamesVector.size();
                for (i=0;i<size;i++)
@@ -2740,13 +2754,8 @@ myfile.close();
                //JCP 20-10-08 Undo redo implementation
                saveState();
                //JCP 20-10-08 Undo redo implementation
-               //deleteContours( _sceneManager->GetlstContoursNameActualSlice() );
-               
-               ///\TODO : find something less stupid!
-               
-        std::vector<std::string> oops;
-               oops =  _sceneManager->GetlstContoursNameActualSlice();
-               deleteContours( oops );
+               deleteContours( (std::vector<std::string>)_sceneManager->GetlstContoursNameActualSlice() );
+
                
        }
 
@@ -3035,8 +3044,8 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event)
 
                return panel;*/
 
-               wxPanel *panel          = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, _T(""));
-               _withOfContourLine      = new wxSlider(panel, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+               wxPanel *panel                                                  = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, wxString(_T("")));
+               _withOfContourLine                                              = new wxSlider(panel, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
 
                double range[2];
                this->_sceneManager->GetImageDataRange(range);
@@ -3122,35 +3131,35 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event)
        {
                std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
                int elementsSelected = currentSelection.size();
-               if( toolCommand == (wxContour_ActionCommandsID::CREATE_TOOL) )
+               if( toolCommand == (wxContour_ActionCommnadsID::CREATE_TOOL) )
                {
                        onCreateContourFrame();
                }
-               if( toolCommand == (wxContour_ActionCommandsID::CREATE_CONTOUR_KEY) )
+               if( toolCommand == (wxContour_ActionCommnadsID::CREATE_CONTOUR_KEY) )
                {
                        createContour();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::DELETE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::DELETE_TOOL )
                {
                        onDeleteFrame( );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::DELETE_KEY )
+               else if( toolCommand == wxContour_ActionCommnadsID::DELETE_KEY )
                {
                        deleteContours( currentSelection );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SAVE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SAVE_TOOL )
                {
                        saveFileWithContours(  );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SAVE_KEY )
+               else if( toolCommand == wxContour_ActionCommnadsID::SAVE_KEY )
                {
                        saveFileWithContoursAutomatique(  );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::OPEN_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::OPEN_TOOL )
                {
                        openFileWithContours(  );
                }
-               else if( toolCommand == wxContour_ActionCommandsID::CHANGE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::CHANGE_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
@@ -3158,69 +3167,69 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event)
                        }
 
                }
-               else if( toolCommand == wxContour_ActionCommandsID::HIDE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::HIDE_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onHideOutlines( currentSelection );
                        }                       
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SHOW_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SHOW_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onShowOutlines( currentSelection );
                        }
                }
-               else if( toolCommand == wxContour_ActionCommandsID::COPY_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::COPY_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onCopyOutlines( currentSelection );
                        }
                }
-               else if( toolCommand == wxContour_ActionCommandsID::PASTE_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::PASTE_TOOL )
                {
                        onPasteOutlines(  );                    
                }
-               else if( toolCommand == wxContour_ActionCommandsID::SPREAD_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SPREAD_TOOL )
                {
                                onSpread();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::AUTOMATIQUESEGMENTATION_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::AUTOMATIQUESEGMENTATION_TOOL )
                {
                        onAutomatiqueSegmentation(  );                  
                }
 
-               else if( toolCommand == wxContour_ActionCommandsID::SELECT_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::SELECT_TOOL )
                {
                        onSelectOutlines( currentSelection );
                        
                }
-               else if( toolCommand == wxContour_ActionCommandsID::EDIT_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::EDIT_TOOL )
                {
                        if ( elementsSelected >= 1 )
                        {
                                onEditOutlines( currentSelection );
                        }
                }
-               else if( toolCommand == wxContour_ActionCommandsID::UNDO_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::UNDO_TOOL )
                {
                        onUNDO();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::REDO_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::REDO_TOOL )
                {
                        onREDO();
                }               
-               else if( toolCommand == wxContour_ActionCommandsID::INFORMATIONCONTOUR_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::INFORMATIONCONTOUR_TOOL )
                {
                        onInformationContourFrame();
                }               
-               else if( toolCommand == wxContour_ActionCommandsID::INTERFACECONFIGURATION_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::INTERFACECONFIGURATION_TOOL )
                {
                        onInterfaceConfigurationFrame();
                }
-               else if( toolCommand == wxContour_ActionCommandsID::TEST_TOOL )
+               else if( toolCommand == wxContour_ActionCommnadsID::TEST_TOOL )
                {
                        onInterfaceTestFrame();
                }               
@@ -3290,11 +3299,12 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event)
                        
                inredo = 0;
 
-               char str[9000];
+               //char str[9000];
                //itoa(inundo, str, 10);
-               sprintf(str, "%d", inundo);
+               std::string str = intToString(inundo);
 
-               std::string temp = stundoredo + *str + ".roi";
+
+               std::string temp = stundoredo + str + ".roi";
                saveFileWithContours(temp);
 
                inundo++;
@@ -3330,12 +3340,12 @@ void wxContourEventHandler :: onREDO()
                        inredo--;
                        inundo++;
 
-            char str[9000];
+                       //char str[9000];
                        //itoa(inundo, str, 10);
-                       sprintf(str, "%d", inundo);
+                       std::string str = intToString(inundo);
 
             
-                       std::string temp = stundoredo + *str + ".roi";
+                       std::string temp = stundoredo + str + ".roi";
                
                        loadState(temp);
 
@@ -3347,25 +3357,25 @@ void wxContourEventHandler :: onREDO()
        void wxContourEventHandler :: onUNDO()
        {
                if(inundo>0){
-                  char str[9000];
                        if(inredo==0){
 
-                               
+                               //char str[9000];
                                //itoa(inundo, str, 10);
-                               sprintf(str, "%d",inundo); 
+                               std::string str = intToString(inundo);
 
-                               std::string temp = stundoredo + *str + ".roi";
+                               std::string temp = stundoredo + str + ".roi";
                                saveFileWithContours(temp);                             
 
                        }
                        inredo++;
                        inundo--;
 
-                       
+                       //char str[9000];
                        //itoa(inundo, str, 10);
-                        sprintf(str, "%d",inundo);
+                       std::string str = intToString(inundo);
+
             
-                       std::string temp = stundoredo + *str + ".roi";
+                       std::string temp = stundoredo + str + ".roi";
                
                        loadState(temp);
                }
@@ -3534,7 +3544,8 @@ void wxContourEventHandler :: onREDO()
                {
 
                        porcent = 100.0* (z-minZ)/totalZ;
-                       tmpString.Printf(_T("Saving Values  %d %c            %d/%d             %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
+                       tmpString.Printf(_T("Saving Values"));
+                       tmpString.Printf(_T("  %d %c            %d/%d             %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ ,z);
                        _staticTextInformation->SetLabel(tmpString);
 
                        //Extraction data from contours of each slice
@@ -3606,7 +3617,7 @@ void wxContourEventHandler :: onREDO()
                lstOptions[0]=_T("A");
                lstOptions[1]=_T("B");
                lstOptions[2]=_T("C");
-               methodRadiobox                          = new wxRadioBox(panel, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxSize(200,45), 3 , lstOptions,  3, wxRA_SPECIFY_COLS);
+               methodRadiobox                                          = new wxRadioBox(panel, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxSize(200,45), 3 , lstOptions,  3, wxRA_SPECIFY_COLS);
                methodRadiobox->SetSelection(2);
                _staticTextSegmentation                         = new wxStaticText(panel,-1,_T("    "));
 
@@ -3689,9 +3700,9 @@ void wxContourEventHandler :: onREDO()
                                vecZ[i] = actualSlice;
                        } // for
 
-                       wxDialog* dialog = new wxDialog(parent, -1, _T("Snake"));
+                       wxDialog* dialog = new wxDialog(parent, -1, wxString(_T("Snake")));
                        wxPanel* panel = new wxPanel(dialog,-1); 
-                       wxStaticText* sttext = new wxStaticText(panel, -1, _T("Panel para snake"));
+                       wxStaticText* sttext = new wxStaticText(panel, -1, wxString(_T("Panel para snake")));
                        dialog->ShowModal();
                } // if 
 
@@ -3703,4 +3714,14 @@ void wxContourEventHandler :: onREDO()
                        _InformationContourFrame->Show(false);
                }               
        }
+
+       std::string wxContourEventHandler::intToString(int num){
+               std::string result;
+               for(int k = num; k == 0; k++){
+                       char temp = k % 10 + 48;
+                       k = k / 10;
+                       result = temp + result; 
+               }
+               return result;
+       }
 //JCP 21 - 10 - 09
index 61b122a1363484cdb96dc65acd01951d2c31f2b3..401b41c9169768c096f876151051430a9e28a535 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <wx/grid.h>
 
+#include <sstream>
 //------------------------------------------------------------------------------------------------------------
 // Includes
 //------------------------------------------------------------------------------------------------------------
@@ -32,7 +33,7 @@
 #include "wxContour_StandardToolsPanel.h"
 #include "wxContour_EdtionToolsPanel.h"
 #include "wxContour_ListViewPanel.h"
-#include "wxContour_ActionCommandsID.h"
+#include "wxContour_ActionCommnadsID.h"
 #include "PerformingOperation.h"
 
 #include "ContourThing.h"
@@ -133,7 +134,7 @@ class wxContourEventHandler : public wxEvtHandler {
        void createCopyContourOf( std::string anExistingKName, std::vector<int> &instantNoTouchData, bool append = false );
        void createContour( int typeContour=1 );
        void deleteContour( std::string theKeyName );
-       void deleteContours( std::vector<std::string> & keyNamesVector );       
+       void deleteContours( std::vector<std::string>  keyNamesVector );        
        void deleteAllContours(  );     
        void openContours( FILE *pFile, bool staticContour );
        void openFileWithContours();
@@ -350,5 +351,7 @@ private:
 
        void                                            saveState();
        void                                            loadState(std::string filename);
+
+       std::string intToString(int num);
 };
 #endif // __wxContourEventHandler_HEADER_FILE__
index 6d3814bcad3a5f03491761e782c97c879e4bae4e..b07ec2db270f3a61cefc6da631bb18ad0208aeeb 100644 (file)
@@ -80,6 +80,4 @@ private:
        
 
 };
-#endif // __wxContour_AutomaticFormsToolsPanel_HEADER_FILE__
+#endif // __wxContour_AutomaticFormsToolsPanel_HEADER_FILE__
\ No newline at end of file
index 5e98af661c3a22ad090c13434c39079373e3c286..d4c49792e4d24fed7df49c3a2a2f49b0c3f1cf88 100644 (file)
@@ -13,7 +13,7 @@
 //------------------------------------------------------------------------------------------------------------
 // Includes
 //------------------------------------------------------------------------------------------------------------
-#include "wxContour_ActionCommandsID.h"
+#include "wxContour_ActionCommnadsID.h"
 
 #include "wx/toolbar.h"
 #include "wx/log.h"
@@ -21,7 +21,7 @@
 #include "wx/filedlg.h"
 #include "wx/spinctrl.h"
 #include "wx/srchctrl.h"
-
+#include <wx/wx.h>
 //------------------------------------------------------------------------------------------------------------
 // Generated events declaration and definition
 //------------------------------------------------------------------------------------------------------------
        :wxPanel( parent, id)//, pos, size, style, name)
        {
                //SetToolBitmapSize(wxSize(16,16));
-       
-       
-       wxString string_create(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::CREATE_TOOL] , wxConvUTF8);
-               
-        _createContour_Button = new wxButton( this, 
-          -1, 
-          _T("+ New Contour"), 
-          wxDefaultPosition, 
-          wxDefaultSize, 
-          0, 
-          wxDefaultValidator, 
-          string_create );
-       
+       std::string as = (char)wxContour_ActionCommnadsID::CREATE_TOOL +"";
+        _createContour_Button = new wxButton( this, -1, _T("+ New Contour"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxString(as.c_str(),wxConvUTF8));
 //             _createContour_Button->SetToolTip(_T("CTRL-N"));
                Connect( _createContour_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-
-       wxString string_delete(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::DELETE_TOOL] , wxConvUTF8);
-               _delete_Button = new wxButton( this, -1, _T("+ Delete"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, string_delete );
+               as = (char)wxContour_ActionCommnadsID::DELETE_TOOL +"";
+               _delete_Button = new wxButton( this, -1, _T("+ Delete"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
                _delete_Button->SetToolTip(_T("BACK SPACE or DELETE key"));
                Connect( _delete_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
 /*             
-               _hideContour_Button = new wxButton( this, -1, "Hide Contour", wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::HIDE_TOOL );
+               _hideContour_Button = new wxButton( this, -1, "Hide Contour", wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommnadsID::HIDE_TOOL );
                Connect( _hideContour_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-               _show_Button = new wxButton( this, -1, _T("Show"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::SHOW_TOOL );
+               _show_Button = new wxButton( this, -1, _T("Show"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommnadsID::SHOW_TOOL );
                Connect( _show_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 */
-       wxString string_copy(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::COPY_TOOL] , wxConvUTF8);
-
-               _copy_Button = new wxButton( this, -1, _T("Copy"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, string_copy );
+               as = (char)wxContour_ActionCommnadsID::COPY_TOOL +"";
+               _copy_Button = new wxButton( this, -1, _T("Copy"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
                _copy_Button->SetToolTip(_T("CTRL-C"));
-               Connect( _copy_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed );
-               
-       wxString string_paste(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::PASTE_TOOL] , wxConvUTF8);              
+               Connect( _copy_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-               _paste_Button = new wxButton( this, -1, _T("Paste"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, string_paste );
+               as = (char)wxContour_ActionCommnadsID::PASTE_TOOL +"";
+               _paste_Button = new wxButton( this, -1, _T("Paste"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
                _paste_Button->SetToolTip(_T("CTRL-V"));
                Connect( _paste_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-       wxString string_change(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::CHANGE_TOOL] , wxConvUTF8);
-               _change_Button = new wxButton( this, -1, _T("    <-->  "), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, string_change );
+               as = (char)wxContour_ActionCommnadsID::CHANGE_TOOL +"";
+               _change_Button = new wxButton( this, -1, _T("    <-->  "), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
                _change_Button->SetToolTip(_T("CTRL-K"));
                Connect( _change_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-       wxString string_save(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::SAVE_TOOL] , wxConvUTF8);
-               _save_Button = new wxButton( this, -1, _T("Save"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, string_save );
+               as = (char)wxContour_ActionCommnadsID::SAVE_TOOL +"";
+               _save_Button = new wxButton( this, -1, _T("Save"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
                _save_Button->SetToolTip(_T("CTRL-S"));
-               Connect( _save_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed );
-               
-               
-       wxString string_open(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::OPEN_TOOL] , wxConvUTF8);
-               _open_Button = new wxButton( this, -1, _T("Open"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, string_open );
+               Connect( _save_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
+
+               as = (char)wxContour_ActionCommnadsID::OPEN_TOOL +"";
+               _open_Button = new wxButton( this, -1, _T("Open"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
                _open_Button->SetToolTip(_T("CTRL-O"));
                Connect( _open_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-       wxString string_spread(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::SPREAD_TOOL] , wxConvUTF8);
-               _spread_Button = new wxButton( this, -1, _T("+ Spread"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, string_spread );
+               as = (char)wxContour_ActionCommnadsID::SPREAD_TOOL +"";
+               _spread_Button = new wxButton( this, -1, _T("+ Spread"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
 //             _spread_Button->SetToolTip(_T("CTRL-XXXXXXX"));
                Connect( _spread_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-       wxString string_automatiqueSegmentation(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::AUTOMATIQUESEGMENTATION_TOOL] , wxConvUTF8);
-               _automatiqueSegmentation_Button = new wxButton( this, -1, _T("+ Segmentation"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, string_automatiqueSegmentation );
+               as = (char)wxContour_ActionCommnadsID::AUTOMATIQUESEGMENTATION_TOOL +"";
+               _automatiqueSegmentation_Button = new wxButton( this, -1, _T("+ Segmentation"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
 //             _automatiqueSegmentation_Button->SetToolTip(_T("CTRL-XXXXXXX"));
                Connect( _automatiqueSegmentation_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-       wxString string_informationcontour(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::INFORMATIONCONTOUR_TOOL] , wxConvUTF8);
-               _informationContour_Button = new wxButton( this, -1, _T("+ Information"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, string_informationcontour );
+               as = (char)wxContour_ActionCommnadsID::INFORMATIONCONTOUR_TOOL +"";
+               _informationContour_Button = new wxButton( this, -1, _T("+ Information"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
 //             _informationContour_Button->SetToolTip(_T("CTRL-XXXXXXX"));
                Connect( _informationContour_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-       wxString string_interfaceconfiguration(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::INTERFACECONFIGURATION_TOOL] , wxConvUTF8);
-               _interfaceConfiguration_Button = new wxButton( this, -1, _T("+ Configuration"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, string_interfaceconfiguration );
+               as = (char)wxContour_ActionCommnadsID::INTERFACECONFIGURATION_TOOL +"";
+               _interfaceConfiguration_Button = new wxButton( this, -1, _T("+ Configuration"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
 //             _informationContour_Button->SetToolTip(_T("CTRL-XXXXXXX"));
                Connect( _interfaceConfiguration_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-       wxString string_test(wxContour_ActionCommandsID::TOOL_CODES[wxContour_ActionCommandsID::TEST_TOOL] , wxConvUTF8);
+
 //Test button Methods A-B-C in  Juan Carlos Prieto 22-09-08
-               _interfaceTest_Button = new wxButton( this, -1, _T("+ Test"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, string_test );
+               as = (char)wxContour_ActionCommnadsID::TEST_TOOL +"";
+               _interfaceTest_Button = new wxButton( this, -1, _T("+ Test"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
 //             _informationContour_Button->SetToolTip(_T("CTRL-XXXXXXX"));
                Connect( _interfaceTest_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
 
 /*
-               _spread_Button = new wxButton( this, -1, _T("Spread"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::SPREAD_TOOL );
+               _spread_Button = new wxButton( this, -1, _T("Spread"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommnadsID::SPREAD_TOOL );
                Connect( _spread_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
-               _select_Button = new wxButton( this, -1, _T("Select"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::SELECT_TOOL );
+               _select_Button = new wxButton( this, -1, _T("Select"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommnadsID::SELECT_TOOL );
                Connect( _select_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-               _edit_Button = new wxButton( this, -1, _T("Edit"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::EDIT_TOOL );
+               _edit_Button = new wxButton( this, -1, _T("Edit"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommnadsID::EDIT_TOOL );
                Connect( _edit_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-               _undo_Button = new wxButton( this, -1, _T("Undo"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::UNDO_TOOL );
+               _undo_Button = new wxButton( this, -1, _T("Undo"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommnadsID::UNDO_TOOL );
                Connect( _undo_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 
-               _redo_Button = new wxButton( this, -1, _T("Redo"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::REDO_TOOL );
+               _redo_Button = new wxButton( this, -1, _T("Redo"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommnadsID::REDO_TOOL );
                Connect( _redo_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
 */
                wxFlexGridSizer * panelSizer = new wxFlexGridSizer(9);
index 128ce18b6c73f35570e5c9bef1dabe6c26440dcf..e68a623d4446bacf4d30f411100b0241a54589bc 100644 (file)
@@ -86,6 +86,4 @@ private:
        wxContour_ListViewPanel * instantContours;
 
 };
-#endif // __wxContour_ControlPanel_HEADER_FILE__
+#endif // __wxContour_ControlPanel_HEADER_FILE__
\ No newline at end of file
index 75e15beda6f8f18c02209dc0941e6b538ebd6076..5abcfdd3733581aadd612862d9a427647dcde214 100644 (file)
@@ -78,6 +78,4 @@ private:
        
 
 };
-#endif // __wxContour_DrawToolsPanel_HEADER_FILE__
+#endif // __wxContour_DrawToolsPanel_HEADER_FILE__
\ No newline at end of file
index 3701f9f257403e81fb55295e9ad0fada950840ae..986bae3092154aa93e2413a3717e1985dc8431e5 100644 (file)
@@ -78,6 +78,4 @@ private:
        
 
 };
-#endif // __wxContour_EdtionToolsPanel_HEADER_FILE__
+#endif // __wxContour_EdtionToolsPanel_HEADER_FILE__
\ No newline at end of file
index 129867043c609a062bbbf4fca74dd4d3d87ddc2e..c87c24f6be8243b62858d0d46758c7924e16bd60 100644 (file)
@@ -78,6 +78,4 @@ private:
        
 
 };
-#endif // __wxContour_Grid_HEADER_FILE__
+#endif // __wxContour_Grid_HEADER_FILE__
\ No newline at end of file
index c81456b5a16bb02b023311fd3d3d6262d71cd868..5dd98e8be611c16669b93027dfb48459b0e666a3 100644 (file)
@@ -127,6 +127,4 @@ private:
        wxListItemAttr itemsStyle;
 
 };
-#endif // __wxContour_ListViewPanel_HEADER_FILE__
+#endif // __wxContour_ListViewPanel_HEADER_FILE__
\ No newline at end of file
index 9b9d21f182416055b554a05190229de4b9dc23d4..305fdee4b68652aa7c8f5d34a65cd5d4372dd526 100644 (file)
@@ -58,9 +58,4 @@
        // Attributtes
        //------------------------------------------------------------------------------------------------------------
        
-  
-   
-        
-        
-       
 
index d387c80817bc8b78115eac8b8275a99560463ac1..8540218aa6921e90983cc2c89828f4bc7f2e0a27 100644 (file)
@@ -78,6 +78,4 @@ private:
        
 
 };
-#endif // __wxContour_MenuBar_HEADER_FILE__
-  
-  
+#endif // __wxContour_MenuBar_HEADER_FILE__
\ No newline at end of file
index f5156b2420356ff8d7fb6ba978043eed0828f809..047b210dc09726395d09a6467b2c74545ace96a1 100644 (file)
@@ -78,6 +78,4 @@ private:
        
 
 };
-#endif // __wxContour_OperationsToolsPanel_HEADER_FILE__
+#endif // __wxContour_OperationsToolsPanel_HEADER_FILE__
\ No newline at end of file
index 15772597f8763c2f17827a1e6cd8e31840d223e7..86fe4d91ad8611ba72740b1192ae44c819bc4490 100644 (file)
@@ -78,6 +78,4 @@ private:
        
 
 };
-#endif // __wxContour_StandardToolsPanel_HEADER_FILE__
+#endif // __wxContour_StandardToolsPanel_HEADER_FILE__
\ No newline at end of file
index 3184c942ac9dbcbc994e441c860f94685f6d0ae2..96e77abc2e5096ed547fa829149059fdbd8b8fa1 100644 (file)
@@ -442,6 +442,4 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE )
                }
 
                return isChecked;
-       }
-        
-        
+       }
\ No newline at end of file
index c765d330a68f4fcaac7da7258c8ca735f394aac0..dbebb4eccebef8dc1a8742d21580fa26334381e1 100644 (file)
@@ -13,7 +13,7 @@
 //------------------------------------------------------------------------------------------------------------
 // Includes
 //------------------------------------------------------------------------------------------------------------
-#include "wxContour_ActionCommandsID.h"
+#include "wxContour_ActionCommnadsID.h"
 
 //------------------------------------------------------------------------------------------------------------
 // Generated events declaration and definition
@@ -332,7 +332,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                        setControlActiveStateOf( _workingGroup, false );
                        _workingGroup->clear();
                }
-        std::map <std::string, ContourWrap_ViewControl *>::iterator iter; //  = NULL; 
+        std::map <std::string, ContourWrap_ViewControl *>::iterator iter; 
 
 //EED Borrame
 // FILE *ff = fopen("c:/temp/wxVtkBaseView_SceneManagerStadistics.txt","a+");
@@ -674,27 +674,27 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
 
                        if ( _lastKeyCode == 3 && ctrlKey ) //'C' || 'c' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::COPY_TOOL);
+                               toolCommand = &(wxContour_ActionCommnadsID::COPY_TOOL);
                        }
                        else if(  _lastKeyCode == 22 && ctrlKey ) //'V' || 'v' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::PASTE_TOOL);
+                               toolCommand = &(wxContour_ActionCommnadsID::PASTE_TOOL);
                        }
                        else if(  _lastKeyCode == 8 || (_lastKeyCode==127) ) // Delete 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::DELETE_KEY);
+                               toolCommand = &(wxContour_ActionCommnadsID::DELETE_KEY);
                        }
                        else if(  _lastKeyCode == 14 && ctrlKey ) //'N' || 'n' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::CREATE_CONTOUR_KEY);
+                               toolCommand = &(wxContour_ActionCommnadsID::CREATE_CONTOUR_KEY);
                        }
                        else if(  _lastKeyCode == 15 && ctrlKey ) //'O' || 'o' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::OPEN_TOOL);
+                               toolCommand = &(wxContour_ActionCommnadsID::OPEN_TOOL);
                        }
                        else if(  _lastKeyCode == 19 && ctrlKey ) //'S' || 's' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::SAVE_KEY);
+                               toolCommand = &(wxContour_ActionCommnadsID::SAVE_KEY);
                        }
 
                        if ( toolCommand!=NULL )
@@ -1092,8 +1092,11 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
        {
                FILE *ff = fopen("c:/temp/wxVtkBaseView_SceneManagerStadistics.txt","a+");
                long int start = clock();
-               //double sg = (double)(start) / (double)CLK_TCK;  // CLK_TCK not ANSI C.
-               double sg = (double)(start) / (double)CLOCKS_PER_SEC;
+#if(WIN32)
+               double sg = (double)(start) / (double)CLK_TCK;
+#else
+               double sg = (double)(start) / CLOCKS_PER_SEC;
+#endif
                int tmpPx,tmpPy;
                wxVTKRenderWindowInteractor *wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( tmpPx , tmpPy );
index 2c7d7033df0acd23ce3246e736f79bb6bbe88be8..3271dbcc65584df58099e4a4ad74d55129bd62ad 100644 (file)
        bool OutlineModelManager :: addOutlinesGroup( std::string theOutlineName, OutlineGroup * theGroup )
        {
         outlineGroups.insert(std::pair <std::string, OutlineGroup *> ( theOutlineName, theGroup ));                            
-               std::map<std::string, OutlineGroup *> :: iterator iter = NULL;
+//             std::map<std::string, OutlineGroup *> :: iterator iter = NULL;
+               std::map<std::string, OutlineGroup *> :: iterator iter;
                iter = outlineGroups.find( theOutlineName );
                bool ifAdded = iter->first.compare( theOutlineName ) == 0;
                return ifAdded;
index a2ccf8de970c7a2ef061253ab4017a6cc63dd0e6..c08e357a3cd3d0da254b078260d82af78bfa593f 100644 (file)
@@ -297,7 +297,6 @@ public:
        * Gets all instants outlines
        * @return The instants set 
        */
-       
        std::vector<Instant *> getOutlineInstants();
 
        /*