[vtkusers] 答复: VtkMarchingCubes

XuXing cool2201 at sina.com
Tue Sep 28 22:54:22 EDT 2010


 

 

发件人: David Doria [mailto:daviddoria at gmail.com] 
发送时间: 2010年9月28日 19:53
收件人: XuXing
抄送: vtkusers at vtk.org
主题: Re: [vtkusers] VtkMarchingCubes

 

Thank you , it works.

 

 

 

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/20100929/6e983275/attachment.htm>


More information about the vtkusers mailing list