[vtkusers] VtkMarchingCubes

XuXing cool2201 at sina.com
Tue Sep 28 00:24:57 EDT 2010


Hi, all

   I got a problem when I try to use vtkMarchingCubes to visualize my image,
I can't set the color of the image, here is part of my code:

 

vtkPolyData* polydata = vtkPolyData::New();

         polydata = marchingCubes->GetOutput();

         vtkPolyDataMapper *polydataMapper = vtkPolyDataMapper::New();

         polydataMapper->SetInput(polydata);

         vtkActor *polydataActor = vtkActor::New();  

         polydataActor->SetMapper(polydataMapper);

         polydataActor->GetProperty()->SetRepresentationToSurface();

         polydataActor->GetProperty()->SetColor(0,1,0);

 

no matter what color I set, it always show it blue.

Any advice will be appreciated, thank you!

 

XuXing

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100928/bf0bae5a/attachment.htm>


More information about the vtkusers mailing list