[vtkusers] cell color

John Platt jcplatt at lineone.net
Mon May 16 05:48:07 EDT 2005


Hi Longfei,

 

Did you include #include "vtkCellData.h" in your .cpp file?

 

John.

-----Original Message-----
From: Longfei Cong [mailto:lfcong at nlpr.ia.ac.cn] 
Sent: 16 May 2005 09:35
To: John Platt
Subject: Re: [vtkusers] cell color

 

Hi John:

     thank u for your kindly answer.  I use below to set the cell scalar
and get some problem.

 surf->GetCellData()->SetScalars(surscalar);

 

//###############


D:\cong\normalperson\tensorvisual.cpp(4739) : error C2027: use of
undefined type 'vtkCellData'
        D:\dvtk\Common\vtkDataSet.h(46) : see declaration of
'vtkCellData'
D:\cong\normalperson\tensorvisual.cpp(4739) : error C2227: left of
'->SetScalars' must point to class/struct/union
Error executing cl.exe.

//###############

      

  Wish u can help me .

----- Original Message ----- 

From: John Platt <mailto:jcplatt at lineone.net>  

To: 'Longfei Cong' <mailto:lfcong at nlpr.ia.ac.cn>  

Sent: Monday, May 16, 2005 3:42 PM

Subject: RE: [vtkusers] cell color

 

Hi Longfei,

 

Have you tried adding cell scalars and changing the mapper colour mode
if the default behaviour is not applicable. If you create the scalars as
unsigned chars with 3 components, for example, these will be mapped
directly as RGB and not through the lookup table. Have a look at
vtkMapper::SetColorMode().

 

John.

 

-----Original Message-----
From: vtkusers-bounces+jcplatt=lineone.net at vtk.org
[mailto:vtkusers-bounces+jcplatt=lineone.net at vtk.org] On Behalf Of
Longfei Cong
Sent: 16 May 2005 07:40
To: vtkusers at vtk.org
Subject: [vtkusers] cell color

 

Dear Vtkusers:

  I use the vtkPolyData to show a surface and  want to set diefferent
cells with different color. Wish someone can help me!!

Regards!

----------------------------------------------------
Longfei Cong
National Laboratory of Pattern Recognition
Institute of Automation, Chinese Academy of Sciences
Tel:86-10-62659278
Fax:86-10-62551993
Email:lfcong at nlpr.ia.ac.cn
----------------------------------------------------

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


More information about the vtkusers mailing list