From 14722b19e7d13b894d78ddca182c042a7ef5c6e6 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Thu, 2 Sep 2010 00:39:17 +0000 Subject: [PATCH] *** empty log message *** --- .../wxVtkBaseView_SceneManager.cxx | 35 +++++++++++-------- .../wxVtkBaseView_SceneManager.h | 23 ++++++------ 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx index 128f1bc..0189493 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx @@ -40,23 +40,23 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) wxVtkBaseView_SceneManager :: wxVtkBaseView_SceneManager( wxVtkBaseView * theWxBaseViewToManage, wxEvtHandler * theEventHandler, double * spc ) { - _widthOfContour = 1.0; + SetWidthContour(1.0); _lastInteraction = NULL; - _lastInteractionName = ""; + _lastInteractionName = ""; _eventHandler = theEventHandler; _leftClickCount = 0; _rigthClickCount = 0; - _contours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >(); - _sceneContours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >(); + _contours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >(); + _sceneContours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >(); _workingGroup = new std::map< std::string, ContourWrap_ViewControl * >(); _creatingMULT_ROI = false; - _editingROI = false; - _toIncludeAtInteractionGroup = false; - _waiting = false; + _editingROI = false; + _toIncludeAtInteractionGroup = false; + _waiting = false; _creatingROI = false; - _drawingSelectionROI = false; + _drawingSelectionROI = false; _wxVtk_BaseView = theWxBaseViewToManage; @@ -195,7 +195,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) //Configuring the relations between the contour members representation manViewerContour->SetModel( manModelContour ); manViewerContour->SetWxVtkBaseView( _wxVtk_BaseView ); - manViewerContour->SetRange( 0.5 ); + manViewerContour->SetRange( _widthOfControlPoint ); manViewerContour->SetZ( 1000 ); manViewerContour->SetSpacing(spc); @@ -1182,17 +1182,22 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) //------------------------------------------------------------------------------------------------------------ void wxVtkBaseView_SceneManager::SetWidthContour(double width) { - _widthOfContour = width; + _widthOfContour = width; + _widthOfControlPoint = _widthOfContour*_widthOfContour/2; manualViewBaseContour *cViewer; ContourWrap_ViewControl *conwraviwcont; std::map ::iterator iter; - for (iter=_contours_ViewControl->begin(); iter!=_contours_ViewControl->end(); iter++ ) + if (_contours_ViewControl!=NULL) { - conwraviwcont = iter->second; - cViewer = conwraviwcont->getViewer(); - cViewer->SetWidthLine(_widthOfContour); - } + for (iter=_contours_ViewControl->begin(); iter!=_contours_ViewControl->end(); iter++ ) + { + conwraviwcont = iter->second; + cViewer = conwraviwcont->getViewer(); + cViewer->SetWidthLine( _widthOfContour ); + cViewer->SetRange( _widthOfControlPoint ); + } // for + } // if } bool wxVtkBaseView_SceneManager::isEditableCControler(std::string theKeyName){ diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h index 2dafb31..93a2d86 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.h @@ -209,9 +209,9 @@ private: std::map * _contours_ViewControl; std::map * _sceneContours_ViewControl; - wxVtkBaseView *_wxVtk_BaseView; - wxEvtHandler *_eventHandler; - ContourWrap_ViewControl *_lastInteraction; + wxVtkBaseView *_wxVtk_BaseView; + wxEvtHandler *_eventHandler; + ContourWrap_ViewControl *_lastInteraction; std::string _lastInteractionName; std::map * _workingGroup; bool _creatingMULT_ROI; @@ -219,19 +219,20 @@ private: bool _toIncludeAtInteractionGroup; bool _waiting; bool _creatingROI; - int _enventID; - int _leftClickCount; - int _rigthClickCount; - int clickX; - int clickY; + int _enventID; + int _leftClickCount; + int _rigthClickCount; + int clickX; + int clickY; char _lastKeyCode; long int onCharCallBackTimeEnd; long int onCharNeeded; bool _drawingSelectionROI; - manualRoiControler *_controlerSelectionROI; - manualViewRoi *_viewerSelectionROI; - manualBaseModel *_modelSelectionROI; + manualRoiControler *_controlerSelectionROI; + manualViewRoi *_viewerSelectionROI; + manualBaseModel *_modelSelectionROI; double _widthOfContour; + double _widthOfControlPoint; bool _ctrlKey; bool _shiftKey; -- 2.45.0