X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxVtkBaseView_SceneManager.cxx;h=0189493190fe812c3197d0f74bf5d57d8a5a7de5;hb=14722b19e7d13b894d78ddca182c042a7ef5c6e6;hp=128f1bca280b567bb6e3659a5756a728f0205189;hpb=51925120414ab3fe69aa8d3fbab7851bbf83874a;p=creaContours.git 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){