]> Creatis software - creaContours.git/commitdiff
*** empty log message ***
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 28 Jan 2009 09:38:05 +0000 (09:38 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 28 Jan 2009 09:38:05 +0000 (09:38 +0000)
appli/wxContourGUIExample/wxContourGUIExample.cxx
lib/Interface_Icons_NDimensions/interfEditMenu.cxx
lib/Interface_Icons_NDimensions/interfIOMenu.cxx
lib/Interface_Icons_NDimensions/interfMainPanel.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h
lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx
lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx
lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h

index 87ace3927871d229105a7da8c3324d3a7342d9af..9849c424834c19e768a347039e3e57682311a8d8 100644 (file)
@@ -233,7 +233,7 @@ JCP 17-10-2008*/
 
        }else if (w.GetReturnCode() == wxID_CANCEL){
           vtkMetaImageReader *reader = vtkMetaImageReader::New();
-          reader->SetFileName( "data/hola.mhd" );
+          reader->SetFileName( "D:/CAT08/Datos/Imagenes/image06.mhd"); //"data/hola.mhd" );
           reader->Update();
           images.push_back(reader->GetOutput());
        }else{        
index 9f94b67ec7d5d6d74d2bd6549f970fd825b3f1c5..878041200491b39f420e54f69775b3102c553b78 100644 (file)
@@ -15,19 +15,19 @@ void interfEditMenu::initButtons(wxEvtHandler* evtHandler) {
        std::vector<wxObjectEventFunction> funct;
 
        path.push_back(datadir + "/copy.png");
-       nom.push_back("Copy the selected contour");
+       nom.push_back("Copy the selected contour  ctrl + c");
        funct.push_back((wxObjectEventFunction) &interfEditMenu:: onCopy);
 
        path.push_back(datadir + "/paste.png");
-       nom.push_back("Paste the copied contour");
+       nom.push_back("Paste the copied contour  ctrl + v");
        funct.push_back((wxObjectEventFunction) &interfEditMenu:: onPaste);
 
        path.push_back(datadir + "/undo.png");
-       nom.push_back("Undo");
+       nom.push_back("Undo  ctrl + z");
        funct.push_back((wxObjectEventFunction) &interfEditMenu:: onUndo);
 
        path.push_back(datadir + "/redo.png");
-       nom.push_back("Redo");
+       nom.push_back("Redo  ctrl + y");
        funct.push_back((wxObjectEventFunction) &interfEditMenu:: onRedo);
 
     this->addButtons(path, nom);
index a93a828677201f013ac43f6e8f84f1103b7edb0e..00a74c9eb39d2a7d50431b31777f963ec7b815af 100644 (file)
@@ -15,11 +15,11 @@ void interfIOMenu::initButtons(wxEvtHandler* evtHandler) {
        std::vector<wxObjectEventFunction> funct;
 
        path.push_back(datadir + "/Open.png");
-       nom.push_back("Open a previously saved file that contains contours information");
+       nom.push_back("Open a previously saved file that contains contours information  ctrl + o");
        funct.push_back((wxObjectEventFunction) &interfIOMenu:: onLoad);
 
        path.push_back(datadir + "/Save.png");
-       nom.push_back("Save all contours created");
+       nom.push_back("Save all contours created ctrl + s");
        funct.push_back((wxObjectEventFunction) &interfIOMenu:: onSave);
 
        this->addButtons(path, nom);
index 5467ccdfe4bd1c8b310d6de77a6738608a4a09a4..1ad6cb422b7ae2f87e48920c3dc1b84cf5c74d59 100644 (file)
@@ -611,7 +611,7 @@ void interfMainPanel::onInformationPressed(){
                infoWin->SetAutoLayout( true );
                infoWin->Layout();
 
-               infoWin->Show();                
+               infoWin->Show();
 
        }else {
 
index d2cbf44baad53e81bf2512ed2d9bdc8b011b9228..969ac05f0a3b145fe04addfcfcd85502e306971e 100644 (file)
@@ -43,21 +43,21 @@ char wxContourMainFrame::COPY = 'C';
                _theViewPanel                           = NULL;
 //             _modelManager                           = NULL;
                _instantPanel                           = NULL;
-               _buttonsBar                                     = NULL;
-               _gridPanel                                      = NULL; 
-               _drawToolsPanel                         = NULL;
-               _operationsToolsPanel           = NULL;
-               _autoFormsPanel                         = NULL; 
-               _standardToolsPanel                     = NULL;
-               _editionToolsPanel                      = NULL;
-               _listViewPanel                          = NULL;
-               _sceneManager                           = NULL;
+//             _buttonsBar                                     = NULL;
+//             _gridPanel                                      = NULL; 
+//             _drawToolsPanel                         = NULL;
+//             _operationsToolsPanel           = NULL;
+               //_autoFormsPanel                               = NULL; 
+//             _standardToolsPanel                     = NULL;
+//             _editionToolsPanel                      = NULL;
+//             _listViewPanel                          = NULL;
+//             _sceneManager                           = NULL;
                //_actualInstant                                = NULL;
                _numberOfVariablesStatistics = 6+1;
 
                // set up default notebook style
-               m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
-               m_notebook_theme = 0;   
+//             m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
+//             m_notebook_theme = 0;   
                //wxContour_ActionCommandsID a;
 
        }
@@ -70,15 +70,15 @@ wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const w
                _theViewPanel                           = NULL;
 //             _modelManager                           = NULL;
                _instantPanel                           = NULL;
-               _buttonsBar                                     = NULL;
-               _gridPanel                                      = NULL; 
-               _drawToolsPanel                         = NULL;
-               _operationsToolsPanel           = NULL;
-               _autoFormsPanel                         = NULL; 
-               _standardToolsPanel                     = NULL;
-               _editionToolsPanel                      = NULL;
-               _listViewPanel                          = NULL;
-               _sceneManager                           = NULL;
+//             _buttonsBar                                     = NULL;
+//             _gridPanel                                      = NULL; 
+//             _drawToolsPanel                         = NULL;
+//             _operationsToolsPanel           = NULL;
+//             _autoFormsPanel                         = NULL; 
+//             _standardToolsPanel                     = NULL;
+//             _editionToolsPanel                      = NULL;
+//             _listViewPanel                          = NULL;
+//             _sceneManager                           = NULL;
                //_actualInstant                                = NULL;
 
                // set up default notebook style
@@ -220,7 +220,7 @@ wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const w
 
                m_mgr.AddPane(theNoteBook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false));
                m_mgr.Update();
-               configured &= _buttonsBar!=NULL;
+/*             configured &= _buttonsBar!=NULL;
                if( _buttonsBar!=NULL )
                {                       
                        m_mgr.AddPane(_buttonsBar, wxAuiPaneInfo().
@@ -228,7 +228,7 @@ wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const w
                                        ToolbarPane().Top().
                                        LeftDockable(  ).RightDockable( false ).CloseButton(false));
                        m_mgr.Update();
-               }
+               }*/
                //CreateStatusBar();
                         
                SetMinSize(wxSize(300,300));
@@ -252,45 +252,45 @@ wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const w
                _instantPanel = theInstantChooserPanel; 
        }
 
-       void wxContourMainFrame :: setButtonsBar(  wxContour_ButtonsBar * theButtonsBar )
-       {
-               _buttonsBar = theButtonsBar;
-       }
+//     void wxContourMainFrame :: setButtonsBar(  wxContour_ButtonsBar * theButtonsBar )
+//     {
+//             _buttonsBar = theButtonsBar;
+//     }
 
-       void wxContourMainFrame :: setGrid(  wxContour_Grid * theGridPanel )
-       {
-               _gridPanel = theGridPanel;
-       }
+//     void wxContourMainFrame :: setGrid(  wxContour_Grid * theGridPanel )
+//     {
+//             _gridPanel = theGridPanel;
+//     }
 
-       void wxContourMainFrame :: setDrawToolsPanel(  wxContour_DrawToolsPanel * theDrawToolsPanel )
-       {
-               _drawToolsPanel = theDrawToolsPanel;
-       }
+//     void wxContourMainFrame :: setDrawToolsPanel(  wxContour_DrawToolsPanel * theDrawToolsPanel )
+//     {
+//             _drawToolsPanel = theDrawToolsPanel;
+//     }
 
-       void wxContourMainFrame :: setOperationsToolsPanel(  wxContour_OperationsToolsPanel * theOperationsToolsPanel )
-       {       
-               _operationsToolsPanel = theOperationsToolsPanel;
-       }
+//     void wxContourMainFrame :: setOperationsToolsPanel(  wxContour_OperationsToolsPanel * theOperationsToolsPanel )
+//     {       
+//             _operationsToolsPanel = theOperationsToolsPanel;
+//     }
 
-       void wxContourMainFrame :: setAutomaticFormsPanel(  wxContour_AutomaticFormsToolsPanel * theAutoFormsPanel )
-       {
-               _autoFormsPanel = theAutoFormsPanel;
-       }
+//     void wxContourMainFrame :: setAutomaticFormsPanel(  wxContour_AutomaticFormsToolsPanel * theAutoFormsPanel )
+//     {
+//             _autoFormsPanel = theAutoFormsPanel;
+//     }
 
-       void wxContourMainFrame :: setStandardToolsPanel(  wxContour_StandardToolsPanel * theStandardToolsPanel )
-       {
-               _standardToolsPanel= theStandardToolsPanel;
-       }
+//     void wxContourMainFrame :: setStandardToolsPanel(  wxContour_StandardToolsPanel * theStandardToolsPanel )
+//     {
+//             _standardToolsPanel= theStandardToolsPanel;
+//     }
 
-       void wxContourMainFrame :: setEditionToolsPanel(  wxContour_EdtionToolsPanel * theEditionToolsPanel )
-       {
-               _editionToolsPanel =  theEditionToolsPanel;
-       }
+//     void wxContourMainFrame :: setEditionToolsPanel(  wxContour_EdtionToolsPanel * theEditionToolsPanel )
+//     {
+//             _editionToolsPanel =  theEditionToolsPanel;
+//     }
 
-       void wxContourMainFrame :: setListViewPanel(  wxContour_ListViewPanel * theListViewPanel )
-       {
-               _listViewPanel = theListViewPanel;
-       }
+//     void wxContourMainFrame :: setListViewPanel(  wxContour_ListViewPanel * theListViewPanel )
+//     {
+//             _listViewPanel = theListViewPanel;
+//     }
 
 
 
@@ -612,6 +612,7 @@ void wxContourMainFrame::updateInstantImageData(){
        vtkImageData* img = kernelManager->getImageAtInstant(inst);
        if(img!=NULL){
                _theViewPanel->changeImage(img);
+               showAxis(false);
        }else{
                int z = _instantPanel->getConceptDataOf("Axe Depth")->getActualValue();
                _theViewPanel->setImageSlice(z);
@@ -732,6 +733,7 @@ void wxContourMainFrame::onSave(){
        if (dialog.ShowModal() == wxID_OK)
        {
                std::string fileNameContourROI = (const char *)(dialog.GetPath().mb_str());
+               kernelManager->setCurrentFileName(fileNameContourROI);
                saveFileWithContours( fileNameContourROI );
        }
 }
@@ -1734,3 +1736,12 @@ void wxContourMainFrame::onSnakePressed(){
        } // if 
 
 }
+
+void wxContourMainFrame::saveFileWithContoursAutomatique(){
+       std::string filename = kernelManager->getCurrentFileName();
+       if(filename.compare("")!=0){
+               saveFileWithContours(filename);
+       }else{
+               onSave();
+       }
+}
\ No newline at end of file
index 50a923f57617e374d6abc233c90aa39ecef1d8bc..c3dcaf7d98dc28898b748f90978b6d2056181a7e 100644 (file)
 #include "wx/aui/aui.h"
 
 #include "interfMainPanel.h"
+#include "KernelManagerContour.h"
 
-#include "wxVtkBaseView_SceneManager.h"
+//#include "wxVtkBaseView_SceneManager.h"
 #include "wxInstantChooserPanel.h"
 #include "wxContourViewPanel.h"
 
-#include "KernelManagerContour.h"
-
-#include "ContourWorkspace.h"
-#include "ContourExtractData.h"
-
-
 
 
+//#include "ContourWorkspace.h"
+#include "ContourExtractData.h"
 #include "PerformingOperation.h"
 
 
 //#include "ImageSectionThing.h"
 //#include "InstantMembersNameList.h"
 //#include "OutlineGroup.h"
-#include "SomeEnvironment.h"
-#include "ContourWorkspace.h"
-#include "ContourWrap_ViewControl.h"
-#include "Instant.h"
-#include "PerformingOperation.h"
+//#include "SomeEnvironment.h"
+//#include "ContourWorkspace.h"
+//#include "ContourWrap_ViewControl.h"
+//#include "Instant.h"
+//#include "PerformingOperation.h"
 
-#include "ContourThing.h"
+//#include "ContourThing.h"
 
 //#include "OutlineModelManager.h"
 
-#include "wxContour_ButtonsBar.h"
-#include "wxContour_ControlPanel.h"
+//#include "wxContour_ButtonsBar.h"
+//#include "wxContour_ControlPanel.h"
 
-#include "wxContour_Grid.h"
-#include "wxContour_DrawToolsPanel.h"
-#include "wxContour_OperationsToolsPanel.h"
-#include "wxContour_AutomaticFormsToolsPanel.h"
-#include "wxContour_StandardToolsPanel.h"
-#include "wxContour_EdtionToolsPanel.h"
-#include "wxContour_ListViewPanel.h"
+//#include "wxContour_Grid.h"
+//#include "wxContour_DrawToolsPanel.h"
+//#include "wxContour_OperationsToolsPanel.h"
+//#include "wxContour_AutomaticFormsToolsPanel.h"
+//#include "wxContour_StandardToolsPanel.h"
+//#include "wxContour_EdtionToolsPanel.h"
+//#include "wxContour_ListViewPanel.h"
 
 
 
@@ -75,7 +72,7 @@
 #include "vtkImageReslice.h"
 #include "vtkMetaImageWriter.h"
 #include "vtkImageData.h"
-#include "vtkMetaImageReader.h"
+//#include "vtkMetaImageReader.h"
 
 //------------------------------------------------------------------------------------------------------------
 // Events declaration
@@ -124,21 +121,21 @@ class wxContourMainFrame : public wxPanel {
 
        void setInstantChooserPanel(  wxInstantChooserPanel * theInstantChooserPanel );
 
-       void setButtonsBar(  wxContour_ButtonsBar * theButtonsBar );
+//     void setButtonsBar(  wxContour_ButtonsBar * theButtonsBar );
 
-       void setGrid(  wxContour_Grid * theGridPanel );
+//     void setGrid(  wxContour_Grid * theGridPanel );
 
-       void setDrawToolsPanel(  wxContour_DrawToolsPanel * theDrawToolsPanel );
+//     void setDrawToolsPanel(  wxContour_DrawToolsPanel * theDrawToolsPanel );
 
-       void setOperationsToolsPanel(  wxContour_OperationsToolsPanel * theDrawToolsPanel );
+//     void setOperationsToolsPanel(  wxContour_OperationsToolsPanel * theDrawToolsPanel );
 
-       void setAutomaticFormsPanel(  wxContour_AutomaticFormsToolsPanel * theAutoFormsPanel );
+//     void setAutomaticFormsPanel(  wxContour_AutomaticFormsToolsPanel * theAutoFormsPanel );
 
-       void setStandardToolsPanel(  wxContour_StandardToolsPanel * theStandardToolsPanel );
+//     void setStandardToolsPanel(  wxContour_StandardToolsPanel * theStandardToolsPanel );
 
-       void setEditionToolsPanel(  wxContour_EdtionToolsPanel * theEditionToolsPanel );
+//     void setEditionToolsPanel(  wxContour_EdtionToolsPanel * theEditionToolsPanel );
 
-       void setListViewPanel(  wxContour_ListViewPanel * theListViewPanel );
+//     void setListViewPanel(  wxContour_ListViewPanel * theListViewPanel );
 
 
        ////------------------------------------------------------------------------------------------------------------
@@ -259,6 +256,8 @@ class wxContourMainFrame : public wxPanel {
        void onChangeInstantInstantPanel(std::string name,int value, int minshow, int maxshow);
 
        void onSnakePressed();
+
+       void saveFileWithContoursAutomatique();
 private:
        //------------------------------------------------------------------------------------------------------------
        //  Private methods
@@ -274,6 +273,8 @@ private:
 
        wxContourViewPanel* _theViewPanel;
 
+       wxInstantChooserPanel * _instantPanel;
+
 
        wxAuiManager m_mgr;
     /*
@@ -286,25 +287,25 @@ private:
 
        //OutlineModelManager * _modelManager;
 
-       wxInstantChooserPanel * _instantPanel;
+       
 
-       wxContour_ButtonsBar * _buttonsBar;
+       //wxContour_ButtonsBar * _buttonsBar;
 
-       wxContour_Grid *  _gridPanel;
+       //wxContour_Grid *  _gridPanel;
 
-       wxContour_DrawToolsPanel * _drawToolsPanel;
+       //wxContour_DrawToolsPanel * _drawToolsPanel;
 
-       wxContour_OperationsToolsPanel * _operationsToolsPanel;
+       //wxContour_OperationsToolsPanel * _operationsToolsPanel;
 
-       wxContour_AutomaticFormsToolsPanel * _autoFormsPanel; 
+       //wxContour_AutomaticFormsToolsPanel * _autoFormsPanel; 
 
-       wxContour_StandardToolsPanel *_standardToolsPanel;
+       //wxContour_StandardToolsPanel *_standardToolsPanel;
 
-       wxContour_EdtionToolsPanel * _editionToolsPanel;
+       //wxContour_EdtionToolsPanel * _editionToolsPanel;
 
-       wxContour_ListViewPanel * _listViewPanel;
+       //wxContour_ListViewPanel * _listViewPanel;
 
-       wxVtkBaseView_SceneManager * _sceneManager;
+       //wxVtkBaseView_SceneManager * _sceneManager;
 
        //Instant * _actualInstant;
 
index 8d271f898c35797f8139a6400162cc53916e4137..9c860f40d9968808fcf8d88f2e43266db31f28a2 100644 (file)
@@ -8,7 +8,7 @@
 //----------------------------------------------------------------------------------------------------------------
 // Other includes
 //----------------------------------------------------------------------------------------------------------------
-#include "ConceptDataWrap.h"
+//#include "ConceptDataWrap.h"
 
 //this should be eliminated at some point
 //#include "wxContourEventHandler.h"
@@ -691,6 +691,42 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE )
                setActualVertical( (int)val );
        }
        void wxContourViewPanel::onActionButtonPressed(wxCommandEvent& event){
+
+               
+               std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
+               int elementsSelected = currentSelection.size();
+               bool ctrlKey = _sceneManager->isCtrlPressed();
+               char toolCommand = _sceneManager->getLastKeyCode();
+
+
+               if ( toolCommand == 3 && ctrlKey ) //'C' || 'c' 
+               {
+                       wxContourMainFrame::getInstance()->onCopy();
+               }
+               else if(  toolCommand == 22 && ctrlKey ) //'V' || 'v' 
+               {
+                       wxContourMainFrame::getInstance()->onPaste();
+               }
+               else if(  toolCommand == 8 || (toolCommand==127) ) // backspace Delete 
+               {
+                       wxContourMainFrame::getInstance()->onDeleteContour();
+               }
+               else if(  toolCommand == 14 && ctrlKey ) //'N' || 'n' 
+               {
+                       //toolCommand = &(CREATE_CONTOUR_KEY);
+               }
+               else if(  toolCommand == 15 && ctrlKey ) //'O' || 'o' 
+               {
+                       wxContourMainFrame::getInstance()->onLoad();
+               }
+               else if(  toolCommand == 19 && ctrlKey ) //'S' || 's' 
+               {
+                       wxContourMainFrame::getInstance()->saveFileWithContoursAutomatique();
+               }else if( toolCommand == 26 ){
+                       wxContourMainFrame::getInstance()->onUndo();
+               }else if( toolCommand == 25 ){
+                       wxContourMainFrame::getInstance()->onRedo();
+               }
        }
 
        void wxContourViewPanel::removeSceneContours(){
index 2a33f4a1ecc6966990bcb1f397018b1ba0cee35f..3d65b286f89258637ee757a8aeb585d2f602dc1a 100644 (file)
@@ -57,6 +57,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                _creatingROI                                    = false;
                _drawingSelectionROI                    = false;
 
+               
                _wxVtk_BaseView = theWxBaseViewToManage;
                if( _wxVtk_BaseView!=NULL )
                {
@@ -660,51 +661,67 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
        // Inherited Methods
        //------------------------------------------------------------------------------------------------------------
 
+       bool  wxVtkBaseView_SceneManager :: isCtrlPressed()
+       { 
+               return _ctrlKey;
+       }
+       bool  wxVtkBaseView_SceneManager :: isShiftPressed()
+       { 
+               return _shiftKey;
+       }
+       char  wxVtkBaseView_SceneManager :: getLastKeyCode()
+       { 
+               return _lastKeyCode;
+       }
        bool  wxVtkBaseView_SceneManager :: OnChar()
        { 
 
-               bool ctrlKey = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey() == 1;
-               bool shiftKey = _vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey() == 1;
+               _ctrlKey = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey() == 1;
+               _shiftKey = _vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey() == 1;
 
                _lastKeyCode = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode();
+
+               wxCommandEvent cevent( wxEVT_COMMAND_BUTTON_CLICKED );
+               _eventHandler->ProcessEvent( cevent );
                
-               
-               if( _eventHandler!=NULL )
+                               
+               /*if( _eventHandler!=NULL )
                {
-                       const char * toolCommand = NULL;
+                       char * toolCommand = NULL;
 
                        if ( _lastKeyCode == 3 && ctrlKey ) //'C' || 'c' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::COPY_TOOL);
+                               toolCommand = &(COPY_TOOL);
                        }
                        else if(  _lastKeyCode == 22 && ctrlKey ) //'V' || 'v' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::PASTE_TOOL);
+                               toolCommand = &(PASTE_TOOL);
                        }
                        else if(  _lastKeyCode == 8 || (_lastKeyCode==127) ) // Delete 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::DELETE_KEY);
+                               toolCommand = &(DELETE_KEY);
                        }
                        else if(  _lastKeyCode == 14 && ctrlKey ) //'N' || 'n' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::CREATE_CONTOUR_KEY);
+                               toolCommand = &(CREATE_CONTOUR_KEY);
                        }
                        else if(  _lastKeyCode == 15 && ctrlKey ) //'O' || 'o' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::OPEN_TOOL);
+                               toolCommand = &(OPEN_TOOL);
                        }
                        else if(  _lastKeyCode == 19 && ctrlKey ) //'S' || 's' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::SAVE_KEY);
+                               toolCommand = &(SAVE_KEY);
                        }
 
                        if ( toolCommand!=NULL )
                        {
+                               currentkey = toolCommand;
                                wxCommandEvent cevent( wxEVT_COMMAND_BUTTON_CLICKED );
                                cevent.SetClientData( (void *) toolCommand);
                                _eventHandler->ProcessEvent( cevent );
                        }                               
-               }
+               }*/
                
        
        //      long int endtime = clock();             
index 8b26d4bdfac982fc6872b88464e1cd06cc85a6b8..32362276d2ff19f94e4bce6686bc5793af6ccd22 100644 (file)
@@ -161,6 +161,9 @@ class wxVtkBaseView_SceneManager : public InteractorStyleMaracas {
 //JCP 21 - 09 - 08
        bool isEditableCControler(std::string theKeyName);
        void deleteCViewerCControler(std::string theKeyName);
+       bool isCtrlPressed();
+       bool isShiftPressed();
+       char getLastKeyCode();
 private:
        //------------------------------------------------------------------------------------------------------------
        //  Private methods
@@ -201,7 +204,9 @@ private:
        manualViewRoi                   *_viewerSelectionROI;
        manualContourModel              *_modelSelectionROI;
        double                                  _widthOfContour;
-       
+
+       bool _ctrlKey;
+       bool _shiftKey;
 };
 #endif // __wxVtkBaseView_SceneManager_HEADER_FILE__
 
index 10a3c4cb22a0f32ab8466ddbfe26566b7d0b0acd..93e21d5d355cc8489aa48fbafdbd75d595c1e139 100644 (file)
@@ -419,4 +419,12 @@ vtkImageData* KernelManagerContour::getImageAtInstant(std::vector<int> inst){
                return vectimages[index];
        }
        return NULL;
+}
+
+std::string KernelManagerContour::getCurrentFileName(){
+       return filename;
+}
+
+void KernelManagerContour::setCurrentFileName(std::string filenam){
+       this->filename = filenam;
 }
\ No newline at end of file
index 296fbca1abe004b4778faa32ed2463bf81e990cb..39871491779663f9ce6c51e772e3a1f8e6b522b5 100644 (file)
@@ -6,10 +6,10 @@
 //------------------------------------------------------------------------------------------------------------
 // Includes
 //------------------------------------------------------------------------------------------------------------
-#include "ImageSourceThing.h"
-#include "ImageSectionThing.h"
-#include "AxeThing.h"
-#include "ContourThing.h"
+//#include "ImageSourceThing.h"
+//#include "ImageSectionThing.h"
+//#include "AxeThing.h"
+//#include "ContourThing.h"
 #include "OutlineModelManager.h"
 #include "OutlineModelBuilder.h"
 
@@ -122,6 +122,8 @@ public:
 // Constants
 //------------------------------------------------------------------------------------------------------------
 
+       void setCurrentFileName(std::string filenam);
+       std::string getCurrentFileName();
 private:       
 //------------------------------------------------------------------------------------------------------------
 // Attributes
@@ -134,6 +136,8 @@ private:
 //Temporary attribute should be removed
        OutlineModelManager             * modelManager;
 
+       std::string filename;
+
        int inredo;
        int inundo;
        int _currentIndex;