[vtkusers] Coloring 2D surface along contourlines

Deij, Menno M.Deij at marin.nl
Wed Jul 6 06:04:04 EDT 2011


I’ve solved this problem by adding a vtkLookupTable with a fixed number of colors to the vtkPolyDataMapper and by calling InterpolateScalarsBeforeMappingOn() on the mapper. Now the picture looks as attached. Without a color range as specified by the vktLookupTable you get the original picture with blocky shapes.

Thanks for your help, loading the vtkStructuredGrid data into ParaView helped pinpointing the problem: the absence of a lookup table for colors and enabling interpolation of scalars on the mapper.

Best wishes,


Menno Deij




[cid:image97921a.JPG at c1588e51.4a962db5][cid:imaged35522.JPG at 6a735d7e.4c917f9e]

dr. ir. Menno A. Deij


Software Engineer


Maritime Simulation Group




MARIN




        2, Haagsteeg

E M.Deij at marin.nl<mailto:M.Deij at marin.nl>       P.O. Box 28     T +31 317 49 39 11
        6700 AA Wageningen
T       The Netherlands I  www.marin.nl<http://www.marin.nl>





MARIN news: Are you a PhD/MSc student with no fear of depth?<http://www.marin.nl/web/News/News-items/Are-you-a-PhDMSc-student-with-no-fear-of-depth.htm>

This e-mail may be confidential, privileged and/or protected by copyright. If you are not the intended recipient, you should return it to the sender immediately and delete your copy from your system.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110706/1ddd5884/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image97921a.JPG
Type: image/jpeg
Size: 1069 bytes
Desc: image97921a.JPG
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110706/1ddd5884/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imaged35522.JPG
Type: image/jpeg
Size: 1622 bytes
Desc: imaged35522.JPG
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110706/1ddd5884/attachment-0001.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screeshot_4.png
Type: image/png
Size: 4377 bytes
Desc: screeshot_4.png
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110706/1ddd5884/attachment.png>


More information about the vtkusers mailing list