]> Creatis software - creaContours.git/commitdiff
#3322 creaContours Feature New Normal - Feference contour Befor After actual slice
authorEduardo DAVILA <davila@ei-ed-606.univ-lyon1.fr>
Thu, 5 Dec 2019 15:44:15 +0000 (16:44 +0100)
committerEduardo DAVILA <davila@ei-ed-606.univ-lyon1.fr>
Thu, 5 Dec 2019 15:44:15 +0000 (16:44 +0100)
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx
lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx

index e18f7d654d8c3fc091ad28f16baf97dc088b4634..5f3aeae73e9f417bf750f2296c57ea16961f447e 100644 (file)
@@ -2512,6 +2512,8 @@ void wxContourMainFrame::onSpreadGo(int type)
 
 void wxContourMainFrame::getInstantVector(std::vector<int>& tempVector)
 {
+       printf("wxContourMainFrame::getInstantVector   Warning!!  Methon not implemented ... \n");
+       _instantPanel->getInstant( tempVector );
 }
 
 std::vector<std::string> wxContourMainFrame::getOutlinesName(int slide)
index 1da23fc1608255c5ce64e5b2e4934806f890f210..f0d33dd4656755af22c7b25f9ca7ff6b874ebc86 100644 (file)
@@ -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<int> tempVector;
+               wxContourMainFrame::getInstance()->getInstantVector( tempVector );
+
+               // Contours Befor
+               std::vector<std::string> 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<std::string> 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<std::string> wxContourViewPanel::getSelectedObjects(){
index 70fd6293e70d0924a5d4bcadadb73116dc8b625f..d70557f6aed385d7a0eb11226b3ec6b60d71cc01 100644 (file)
@@ -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 );