From 87001c540c1fbcdf21ea7f994d620c8341755848 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 5 Dec 2019 16:44:15 +0100 Subject: [PATCH] #3322 creaContours Feature New Normal - Feference contour Befor After actual slice --- .../wxContourMainFrame.cxx | 2 + .../wxContourViewPanel.cxx | 42 +++++++++++++++++-- .../wxVtkBaseView_SceneManager.cxx | 8 ++++ 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index e18f7d6..5f3aeae 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -2512,6 +2512,8 @@ void wxContourMainFrame::onSpreadGo(int type) void wxContourMainFrame::getInstantVector(std::vector& tempVector) { + printf("wxContourMainFrame::getInstantVector Warning!! Methon not implemented ... \n"); + _instantPanel->getInstant( tempVector ); } std::vector wxContourMainFrame::getOutlinesName(int slide) diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx index 1da23fc..f0d33dd 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx @@ -710,11 +710,47 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE ) void wxContourViewPanel::addNameWrapperToScene() { - int size = wxContourMainFrame::getInstance()->getNamesWrappingSize(); - for(int i = 0; i < size;i++){ + int i,size = wxContourMainFrame::getInstance()->getNamesWrappingSize(); + for(i = 0; i < size;i++) + { std::string name = wxContourMainFrame::getInstance()->getNameWrapping(i); _sceneManager->addToScene(name, true, true, true, false, false ); - } + } // for i + + +printf("EED \wxContourViewPanel::addNameWrapperToScene Clean this part of code ...\n"); +printf("EED \wxContourViewPanel::addNameWrapperToScene Clean this part of code ...\n"); +printf("EED \wxContourViewPanel::addNameWrapperToScene Clean this part of code ...\n"); +printf("EED \wxContourViewPanel::addNameWrapperToScene Clean this part of code ...\n"); +printf("EED \wxContourViewPanel::addNameWrapperToScene Clean this part of code ...\n"); +printf("EED \wxContourViewPanel::addNameWrapperToScene Clean this part of code ...\n"); +//EED 2019-12-05 +// falta buscar slice antes y despues para encontrar elementos +// falta cambiar de colores para antes y despues +// falta un flag que active y desactive esta opcion + + std::vector tempVector; + wxContourMainFrame::getInstance()->getInstantVector( tempVector ); + + // Contours Befor + std::vector lstNameBefor = wxContourMainFrame::getInstance()->getOutlinesName(tempVector[1]-10); + size = lstNameBefor.size(); + for(i = 0; i < size;i++) + { + // ctrol active showCtr + _sceneManager->addToScene(lstNameBefor[i], true, true, false, false, false ); + } // for i + + // Contours After + std::vector lstNameAfter = wxContourMainFrame::getInstance()->getOutlinesName(tempVector[1]+10); + size = lstNameAfter.size(); + for(i = 0; i < size;i++) + { + // ctrol active showCtr + _sceneManager->addToScene(lstNameAfter[i], true, true, false, false, false ); + } // for i + + } std::vector wxContourViewPanel::getSelectedObjects(){ diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx index 70fd629..d70557f 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx @@ -533,6 +533,14 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) { ((vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( contourWRP->getControler() ); } + + if( !control ) + { + contourWRP->getViewer()->SetColorNormalContour(1,0,0); + } else { + contourWRP->getViewer()->SetColorNormalContour(0,0,1); + } + if( ifActive ) { contourWRP->getControler()->SetActive( true ); -- 2.47.1