]> Creatis software - clitk.git/commitdiff
remove unuseful Render (faster)
authordsarrut <dsarrut>
Thu, 27 May 2010 09:34:41 +0000 (09:34 +0000)
committerdsarrut <dsarrut>
Thu, 27 May 2010 09:34:41 +0000 (09:34 +0000)
vv/vvBinaryImageOverlayActor.cxx
vv/vvImageContour.cxx

index 0405cdb2fda4c4b49968ee2cbd71b6972c242f3d..efdb19124c4388d548277979554e8a39aee80e75 100644 (file)
@@ -169,7 +169,8 @@ void vvBinaryImageOverlayActor::HideActors()
   for(unsigned int i=0; i<mImageActorList.size(); i++) {
     mImageActorList[i]->VisibilityOff();
   }
-  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);
 }
 //------------------------------------------------------------------------------
 
-
-
-
index 0e4e428110c4a2958e2441fee248149406ca5fb7..99da398bf92518b3bb5bfa6d8430dba2e34d619f 100644 (file)
@@ -167,9 +167,7 @@ void vvImageContour::Update(double value) {
     UpdateWithFastCacheMode();
   }
 
-
-  mSlicer->Render(); //DS ---> REMOVE ??
-
+  //  mSlicer->Render(); //DS ---> REMOVE ??
 
   mPreviousTSlice = mSlicer->GetTSlice();
   mPreviousSlice  = mSlicer->GetSlice();