[vtkusers] Color Mapping

REGAT-BARREL Aurélien arbvtk at yahoo.fr
Wed Jun 16 03:54:15 EDT 2004


Hi,
I think "popMapper SetScalarModeToUsePointData" is missing.
Greets.

DyXin DyXin <dyxin_ at hotmail.com> wrote:
It 's me again...

I wanna use color mapping but it doesn 't work and I don 't know what I 'm 
doing wrong...
I get a red figure instead of multiple colors...
Can someone help me pls?
Thnx a lot!

This is what I do:



vtkUnstructuredGrid dataSet
vtkPoints pts
vtkFloatArray scalars

..........

while { ![eof $file] } {
# Read a line from the file and analyse it.
scan $line "%f %f %f %f" v1 v2 v3 v4
set line [gets $file]

pts InsertNextPoint $v1 $v2 $v3
# 0 < v4 < 250
scalars InsertNextValue $v4
}

dataSet SetPoints pts
[dataSet GetPointData] SetScalars scalars

..........

vtkGaussianSplatter popSplatter
popSplatter SetInput dataSet
popSplatter SetSampleDimensions 50 50 50
popSplatter SetRadius 0.05
popSplatter ScalarWarpingOff

vtkContourFilter popSurface
popSurface SetInput [popSplatter GetOutput]
popSurface SetValue 0 0.01

vtkPolyDataMapper popMapper
popMapper SetInput [popSurface GetOutput]
popMapper ScalarVisibilityOn

vtkActor actor
actor SetMapper popMapper
[actor GetProperty] SetOpacity 0.3
[actor GetProperty] SetColor .9 .9 .9

..........

_________________________________________________________________
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: 
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


Aurélien REGAT-BARREL
		
---------------------------------
Vous manquez d’espace pour stocker vos mails ? 
Essayez Yahoo! Mail, vous serez surpris ! Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040616/f7841d35/attachment.htm>


More information about the vtkusers mailing list