X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=lib%2FInterface_ManagerContour_NDimensions%2FwxVtkBaseView_SceneManager.cxx;h=fccc03657f72041a8d8d571ff8f6075cc9345c52;hb=a6507d91019d9f428af751e5b0b3a7d19d6f0bf6;hp=ea195fe6204bc25251441eb8e4e9c4e9f46d5f4f;hpb=99c30d2b8b911d2b923ca173285041d2b077d770;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx index ea195fe..fccc036 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx @@ -3,6 +3,7 @@ // Class definition include //---------------------------------------------------------------------------------------------------------------- #include "wxVtkBaseView_SceneManager.h" +#include "wxVtk2DBaseView.h" //---------------------------------------------------------------------------------------------------------------- // Class implementation @@ -61,7 +62,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) _wxVtk_BaseView = theWxBaseViewToManage; if( _wxVtk_BaseView!=NULL ) { - vtkInteractorStyleBaseView* theInteractorStyleBaseView = _wxVtk_BaseView->GetInteractorStyleBaseView(); + vtkInteractorStyleBaseView* theInteractorStyleBaseView = (vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView(); theInteractorStyleBaseView->AddInteractorStyleMaracas( this ); SetVtkInteractorStyleBaseView( theInteractorStyleBaseView ); } @@ -77,12 +78,12 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) _contours_ViewControl->erase( iter ); i++; } - delete _contours_ViewControl; _contours_ViewControl->clear(); + delete _contours_ViewControl; _workingGroup->clear(); delete _lastInteraction; delete _workingGroup; - delete _contours_ViewControl; + //delete _contours_ViewControl; } //------------------------------------------------------------------------------------------------------------ @@ -145,6 +146,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) { manContourControl = new manualContourControler(); manViewerContour = new manualViewContour(); + manModelContour->SetCloseContour(false); } if (typeContour==2) @@ -185,7 +187,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) //Configuring the relations between the contour members representation manViewerContour->SetModel( manModelContour ); manViewerContour->SetWxVtkBaseView( _wxVtk_BaseView ); - manViewerContour->SetRange( 2 ); + manViewerContour->SetRange( 0.5 ); manViewerContour->SetZ( 1000 ); manViewerContour->SetSpacing(spc); @@ -223,7 +225,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) _viewerSelectionROI->SetSpacing( spc ); _controlerSelectionROI->SetModelView( _modelSelectionROI , _viewerSelectionROI ); - _wxVtk_BaseView->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _controlerSelectionROI ); + ((vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _controlerSelectionROI ); _controlerSelectionROI->SetActive(false); } @@ -392,7 +394,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) //fprintf(ff," %p \n", contourWRP->getControler() ); //fclose(ff); - _wxVtk_BaseView->GetInteractorStyleBaseView()->RemoveInteractorStyleMaracas( contourWRP->getControler() ); + ((vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView())->RemoveInteractorStyleMaracas( contourWRP->getControler() ); contourWRP->getControler()->SetActive( control ); contourWRP->getControler()->SetEditable( false ); @@ -517,7 +519,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) if( control ) { - _wxVtk_BaseView->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( contourWRP->getControler() ); + ((vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( contourWRP->getControler() ); } if( ifActive ) {