From a654abbc209ed3104e98553cb381ef1c2845937a Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Wed, 28 Jan 2009 09:38:05 +0000 Subject: [PATCH] *** empty log message *** --- .../wxContourGUIExample.cxx | 2 +- .../interfEditMenu.cxx | 8 +- .../interfIOMenu.cxx | 4 +- .../interfMainPanel.cxx | 2 +- .../wxContourMainFrame.cxx | 119 ++++++++++-------- .../wxContourMainFrame.h | 83 ++++++------ .../wxContourViewPanel.cxx | 38 +++++- .../wxVtkBaseView_SceneManager.cxx | 41 ++++-- .../wxVtkBaseView_SceneManager.h | 7 +- .../KernelManagerContour.cxx | 8 ++ .../KernelManagerContour.h | 12 +- 11 files changed, 203 insertions(+), 121 deletions(-) diff --git a/appli/wxContourGUIExample/wxContourGUIExample.cxx b/appli/wxContourGUIExample/wxContourGUIExample.cxx index 87ace39..9849c42 100644 --- a/appli/wxContourGUIExample/wxContourGUIExample.cxx +++ b/appli/wxContourGUIExample/wxContourGUIExample.cxx @@ -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{ diff --git a/lib/Interface_Icons_NDimensions/interfEditMenu.cxx b/lib/Interface_Icons_NDimensions/interfEditMenu.cxx index 9f94b67..8780412 100644 --- a/lib/Interface_Icons_NDimensions/interfEditMenu.cxx +++ b/lib/Interface_Icons_NDimensions/interfEditMenu.cxx @@ -15,19 +15,19 @@ void interfEditMenu::initButtons(wxEvtHandler* evtHandler) { std::vector 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); diff --git a/lib/Interface_Icons_NDimensions/interfIOMenu.cxx b/lib/Interface_Icons_NDimensions/interfIOMenu.cxx index a93a828..00a74c9 100644 --- a/lib/Interface_Icons_NDimensions/interfIOMenu.cxx +++ b/lib/Interface_Icons_NDimensions/interfIOMenu.cxx @@ -15,11 +15,11 @@ void interfIOMenu::initButtons(wxEvtHandler* evtHandler) { std::vector 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); diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx index 5467ccd..1ad6cb4 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx @@ -611,7 +611,7 @@ void interfMainPanel::onInformationPressed(){ infoWin->SetAutoLayout( true ); infoWin->Layout(); - infoWin->Show(); + infoWin->Show(); }else { diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index d2cbf44..969ac05 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -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 diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 50a923f..c3dcaf7 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -22,19 +22,16 @@ #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" @@ -45,26 +42,26 @@ //#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; diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx index 8d271f8..9c860f4 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx @@ -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 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(){ diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx index 2a33f4a..3d65b28 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx @@ -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(); diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h index 8b26d4b..3236227 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h @@ -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__ diff --git a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx index 10a3c4c..93e21d5 100644 --- a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx +++ b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx @@ -419,4 +419,12 @@ vtkImageData* KernelManagerContour::getImageAtInstant(std::vector 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 diff --git a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h index 296fbca..3987149 100644 --- a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h +++ b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h @@ -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; -- 2.45.1