From: Eduardo DAVILA Date: Wed, 29 Jan 2020 10:51:31 +0000 (+0100) Subject: #3350 creaMaracasVisu Bug New Normal - box PlotterViewer Refresh X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d98fd43bb0bba8c95bfaf4c88e5ff7f7f8ac0e95;p=creaMaracasVisu.git #3350 creaMaracasVisu Bug New Normal - box PlotterViewer Refresh --- diff --git a/bbtk/src/bbmaracasvisuPlotterView.cxx b/bbtk/src/bbmaracasvisuPlotterView.cxx index e3e61ba..f48e2d2 100644 --- a/bbtk/src/bbmaracasvisuPlotterView.cxx +++ b/bbtk/src/bbmaracasvisuPlotterView.cxx @@ -39,6 +39,9 @@ BBTK_BLACK_BOX_IMPLEMENTATION(PlotterView,bbtk::WxBlackBox); //--------------------------------------------------- void PlotterView::Process() { + + double lim=1; + if (bbGetInputInX().size()==bbGetInputInY().size() ) { pGraphicalFunction *pGF = mwxwidget->getFunction(0); @@ -77,7 +80,6 @@ void PlotterView::Process() mwxwidget->deleteFunction(pGF2); pGF2=NULL; } - if ( (bbGetInputInY().size()!=0) && (pGF==NULL) ) { // avoid 'taking address of temporary ' @@ -99,12 +101,15 @@ void PlotterView::Process() int i, size = inY.size(); for ( i=0 ; i-lim) && (inY[i]lim)) {ok=true;} }// for if (ok==true) { pGF = mwxwidget->getFunctionForVectors( &inX, &inY ); mwxwidget->addFunction(pGF); + } else { + printf("EED Warnning!! PlotterView::Process function y with CEROS ????..... \n"); } // if ok } // if bbGetInputInY @@ -130,13 +135,16 @@ void PlotterView::Process() int i, size = inY2.size(); for ( i=0 ; i-lim) && (inY2[i]lim)) {ok2=true;} }// for if (ok2==true) { pGF2 = mwxwidget->getFunctionForVectors( &inX2, &inY2 ); mwxwidget->addFunction(pGF2); - } // if ok + } else { + printf("EED Warnning!! PlotterView::Process function y2 with CEROS ????..... \n"); + } // if ok2 } // if bbGetInputInY @@ -198,7 +206,6 @@ void PlotterView::Process() } else { printf("EED Warnning... PlotterView::Process() Size of vecto X and Y is not coherent.\n"); } // InX.size InY.size - } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx index 1537162..32994c7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx @@ -519,10 +519,8 @@ void wxVtkMPR3DView::RefreshView() // virtual spc[1] = 0; spc[2] = 0; } - // GetVtkMPR3DDataViewer()->Configure(); - //double nx=1,ny=0,nz=0; // JPRx Refresh(); double x = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetX(); @@ -558,10 +556,11 @@ void wxVtkMPR3DView::RefreshView() // virtual _planeWidgetZ->GetTexture()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() ); } - x=x*spc[0]; - y=y*spc[1]; - z=z*spc[2]; + SetWindowColorLevel(_vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorWindow() , _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorLevel() ); + x = x*spc[0]; + y = y*spc[1]; + z = z*spc[2]; if(_pointWidget) { //EED 2017-01-01 Migration VTK7 @@ -645,7 +644,6 @@ void wxVtkMPR3DView::VisibleImageActor(int idPosition, bool visible) // This works in ViewerNV with nTymeView=6 // Because the others modules (5) generate also more actors with an OutLineFilter -> Actor //showOutlineActor(false); - // step 1, step 2 vtkActorCollection *tmpCollection = vtkActorCollection::New(); vtkActorCollection *collectionActors = _wxvtk3Dbaseview->GetRenderer()->GetActors(); @@ -655,20 +653,16 @@ void wxVtkMPR3DView::VisibleImageActor(int idPosition, bool visible) tmpCollection->AddItem ( (vtkActor*)collectionActors->GetItemAsObject(0) ); _wxvtk3Dbaseview->GetRenderer()->RemoveActor( (vtkProp*)tmpCollection->GetItemAsObject(i) ); } // for - // step 3 _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(idPosition) ); - // step 4 for (i=0; iGetRenderer()->AddActor( (vtkProp*)tmpCollection->GetItemAsObject(i) ); } // for tmpCollection->Delete(); - // step 5 Refresh _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render(); - } // if visible _vtkmpr3Ddataviewer->SetVisiblePosition(idPosition,visible); } // if visible @@ -696,7 +690,6 @@ void wxVtkMPR3DView::VisiblePlaneWidget( bool visible ) { _planeWidget->On(); _contourPlaneActor->VisibilityOn(); - } else { _planeWidget->Off(); _contourPlaneActor->VisibilityOff();