[vtkusers] VtkMarchingCubes

David Doria daviddoria at gmail.com
Tue Sep 28 07:53:01 EDT 2010


On Tue, Sep 28, 2010 at 12:24 AM, XuXing <cool2201 at sina.com> wrote:

> 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
>
>
>

Try

marchingCubes->ComputeScalarsOff()

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


More information about the vtkusers mailing list