+void vvImageContour::hideActors() {
+ if (!mSlicer) return;
+ mSlice = mSlicer->GetSlice();
+ for(unsigned int i=0; i<mSquaresActorList.size(); i++) {
+ mSquaresActorList[i]->VisibilityOff();
+ }
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvImageContour::showActors() {
+ if (!mSlicer) return;
+ mSlice = mSlicer->GetSlice();
+ mTSlice = mSlicer->GetTSlice();
+ // for(unsigned int i=0; i<mSquaresActorList.size(); i++) {
+ mSquaresActorList[mTSlice]->VisibilityOn();
+ update(mValue);
+ //}
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvImageContour::update(int value) {
+ mValue= value;
+ if (!mSlicer) return;
+
+ // how to not update if not visible ?
+
+ mSlice = mSlicer->GetSlice();
+ // Only change actor visibility if tslice change
+ if (mTSlice != mSlicer->GetTSlice()) {
+ if (mTSlice != -1)
+ mSquaresActorList[mTSlice]->VisibilityOff();
+ mTSlice = mSlicer->GetTSlice();
+ mSquaresActorList[mTSlice]->VisibilityOn();
+ }
+
+ vtkMarchingSquares * mSquares = mSquaresList[mTSlice];
+ vtkImageClip * mClipper = mClipperList[mTSlice];
+ vtkActor * mSquaresActor = mSquaresActorList[mTSlice];