From 6789a2e30f7c951de93ebd0c0596e7168ec6e061 Mon Sep 17 00:00:00 2001 From: dsarrut Date: Thu, 27 May 2010 09:34:41 +0000 Subject: [PATCH] remove unuseful Render (faster) --- vv/vvBinaryImageOverlayActor.cxx | 27 ++++++++++++--------------- vv/vvImageContour.cxx | 4 +--- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/vv/vvBinaryImageOverlayActor.cxx b/vv/vvBinaryImageOverlayActor.cxx index 0405cdb..efdb191 100644 --- a/vv/vvBinaryImageOverlayActor.cxx +++ b/vv/vvBinaryImageOverlayActor.cxx @@ -169,7 +169,8 @@ void vvBinaryImageOverlayActor::HideActors() for(unsigned int i=0; iVisibilityOff(); } - mSlicer->Render(); + // Caller MUST call Render + // mSlicer->Render(); } //------------------------------------------------------------------------------ @@ -184,7 +185,8 @@ void vvBinaryImageOverlayActor::ShowActors() mImageActorList[mTSlice]->VisibilityOn(); UpdateSlice(0, mSlice); //} - mSlicer->Render(); + // Caller MUST call Render + //mSlicer->Render(); } //------------------------------------------------------------------------------ @@ -243,9 +245,9 @@ void vvBinaryImageOverlayActor::UpdateSlice(int slicer, int slice) //------------------------------------------------------------------------------ void vvBinaryImageOverlayActor::ComputeExtent(int orientation, - int slice, - int * inExtent, - int * outExtent) + int slice, + int * inExtent, + int * outExtent) { // std::cout << "InExtent = " << inExtent[0] << " " << inExtent[1] << " " << inExtent[2] << " " // << inExtent[3] << " " << inExtent[4] << " " << inExtent[5] << std::endl; @@ -292,13 +294,11 @@ void vvBinaryImageOverlayActor::ComputeExtent(int * inExtent, int * outExtent, v //------------------------------------------------------------------------------ void vvBinaryImageOverlayActor::SetDisplayExtentAndCameraPosition(int orientation, - int slice, - int * extent, - vtkImageActor * actor, - double position) + int slice, + int * extent, + vtkImageActor * actor, + double position) { - actor->SetDisplayExtent(extent); - // Set position if (orientation == vtkImageViewer2::SLICE_ORIENTATION_XY) { if (mSlicer->GetRenderer()->GetActiveCamera()->GetPosition()[2] > slice) @@ -318,10 +318,7 @@ void vvBinaryImageOverlayActor::SetDisplayExtentAndCameraPosition(int orientatio else actor->SetPosition(-position,0, 0); } - + actor->SetDisplayExtent(extent); } //------------------------------------------------------------------------------ - - - diff --git a/vv/vvImageContour.cxx b/vv/vvImageContour.cxx index 0e4e428..99da398 100644 --- a/vv/vvImageContour.cxx +++ b/vv/vvImageContour.cxx @@ -167,9 +167,7 @@ void vvImageContour::Update(double value) { UpdateWithFastCacheMode(); } - - mSlicer->Render(); //DS ---> REMOVE ?? - + // mSlicer->Render(); //DS ---> REMOVE ?? mPreviousTSlice = mSlicer->GetTSlice(); mPreviousSlice = mSlicer->GetSlice(); -- 2.47.1