#include <vtkImageData.h>
#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
+#include <vtkInformation.h>
//------------------------------------------------------------------------------
vvImageContour::vvImageContour()
{ //out << __func__ << endl;
for(unsigned int i=0; i<mSquaresActorList.size(); i++) {
mSquaresActorList[i]->GetProperty()->SetColor(r,g,b);
+ mSquaresActorList[i]->GetProperty()->SetOpacity(0.995);
}
}
//------------------------------------------------------------------------------
vtkActor * mSquaresActor = mSquaresActorList[mTSlice];
int orientation = ComputeCurrentOrientation();
- //UpdateActor(mSquaresActor, mapper, mSquares, mClipper, mValue, orientation, mSlice);
+ UpdateActor(mSquaresActor, mapper, mSquares, mClipper, mValue, orientation, mSlice);
if (mPreviousTslice != mTSlice) {
if (mPreviousTslice != -1) mSquaresActorList[mPreviousTslice]->VisibilityOff();
}
-
+
mSlicer->Render();
}
//------------------------------------------------------------------------------
clipper->SetInputData(mSlicer->GetImage()->GetVTKImages()[numImage]);
#endif
}
-clipper->Update();
#if VTK_MAJOR_VERSION <= 5
squares->SetInput(clipper->GetOutput());
squaresMapper->SetInput(squares->GetOutput());
#else
- squares->SetInputData(clipper->GetOutput());
- squaresMapper->SetInputData(squares->GetOutput());
+ squares->SetInputConnection(clipper->GetOutputPort(0));
+ squaresMapper->SetInputConnection(squares->GetOutputPort(0));
#endif
-squares->Update();
-squaresMapper->Update();
squaresMapper->ScalarVisibilityOff();
squaresActor->SetMapper(squaresMapper);
squaresActor->GetProperty()->SetColor(1.0,0,0);
+ squaresActor->GetProperty()->SetOpacity(0.995);
squaresActor->SetPickable(0);
squaresActor->VisibilityOff();
mSlicer->GetRenderer()->AddActor(squaresActor);
{ //out << __func__ << endl;
// Set parameter for the MarchigSquare
squares->SetValue(0, threshold);
-
+ squares->Update();
// Get image extent
int* extent = mSlicer->GetImageActor()->GetDisplayExtent();
clipper->SetOutputWholeExtent(extent2[0],extent2[1],extent2[2],
extent2[3],extent2[4],extent2[5]);
- clipper->Update();
- clipper->Print(cout);
-
+
if (mHiddenImageIsUsed) delete extent2;
// Move the actor to be visible
// DD(mDepth);
// position[orientation] = -mDepth;
// actor->SetPosition(position);
-
mapper->Update();
}
//------------------------------------------------------------------------------