]> Creatis software - clitk.git/blobdiff - vv/vvROIActor.cxx
Merge branch 'landmark'
[clitk.git] / vv / vvROIActor.cxx
index 8561a25636eb8b81a419f0c66d82b7bc7c3ca552..4e1a9dc880b487c8b38969c67f567e1fb44cd5a4 100644 (file)
@@ -69,8 +69,8 @@ void vvROIActor::RemoveActors()
   }  
   
   Update(true);
-  mImageContour.clear();
-  mOverlayActors.clear();
+  //mImageContour.clear();
+  //mOverlayActors.clear();
 }
 //------------------------------------------------------------------------------
 
@@ -121,7 +121,7 @@ void vvROIActor::SetVisible(bool b)
     for(unsigned int i= 0; i<mOverlayActors.size(); i++)
       mOverlayActors[i]->ShowActors();
   }
-  Update(); // No Render
+  //Update(); // No Render
 }
 //------------------------------------------------------------------------------
 
@@ -140,7 +140,7 @@ void vvROIActor::SetContourVisible(bool b)
       mImageContour[i]->ShowActors();
     }
   }
-  Update(); // No Render
+  //Update(); // No Render
 }
 //------------------------------------------------------------------------------
 
@@ -202,7 +202,7 @@ void vvROIActor::Initialize(double depth, bool IsVisible)
       mOverlayActors[i]->SetDepth(mDepth);
     }
     connect(mSlicerManager,SIGNAL(UpdateSlice(int,int)),this,SLOT(UpdateSlice(int, int)));
-    //connect(mSlicerManager,SIGNAL(UpdateTSlice(int,int)),this,SLOT(UpdateSlice(int, int)));
+    connect(mSlicerManager,SIGNAL(UpdateTSlice(int,int,int)),this,SLOT(UpdateSlice(int, int, int)));
     connect(mSlicerManager, SIGNAL(AVerticalSliderHasChanged(int, int)), SLOT(UpdateSlice(int, int)));
   }
 }
@@ -235,7 +235,7 @@ void vvROIActor::Update(bool force)
 
 
 //------------------------------------------------------------------------------
-void vvROIActor::UpdateSlice(int slicer, int slices, bool force)
+void vvROIActor::UpdateSlice(int slicer, int slices, int force)
 { 
   if (!mROI->GetImage())  return;
   if ((!mIsVisible) && (!mIsContourVisible)) return; 
@@ -249,7 +249,10 @@ void vvROIActor::UpdateSlice(int slicer, int slices, bool force)
   }
 
   // Refresh overlays
-  mOverlayActors[slicer]->UpdateSlice(slicer, slices, force);
+  if (mIsVisible) {
+    mOverlayActors[slicer]->UpdateSlice(slicer, slices, force);
+  }
+  //mSlicerManager->GetSlicer(slicer)->Render();
 }
 //------------------------------------------------------------------------------