[vtkusers] Colorscale Problem
WolfgangZillig
wollez at gmx.net
Tue Jan 23 08:51:05 EST 2007
Hello,
I want to generate some grapfics from results from a finite element
calculation. It works quite well but when I tried to generate a scalebar
(out of a manually entered grid) I got some strange results. I want to
have the color rangeing from red over yellow to blue. I've defined this
range by:
min=0.50
max=0.80
avg=(min+max)/2.0
aTriangleMapper.SetInput(aTriangleGrid)
colorTransferFunction = vtk.vtkColorTransferFunction()
colorTransferFunction.AddRGBPoint(min, 0.0, 0.0, 1.0)
colorTransferFunction.AddRGBPoint(avg, 1.0, 1.0, 0.0)
colorTransferFunction.AddRGBPoint(max, 1.0, 0.0, 0.0)
aTriangleMapper.SetLookupTable(colorTransferFunction)
It looks for me that this range can not be drawn in one element of my
grid. In the output from my calculations this is not a problem as there
is not a that huge difference over one single element but in the mesh of
my scalbar I got strange results. See included pictures.
So my question is: is this a limitation of vtk or do I do something wrong?
Kind regards
Wolfgang Zillig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorscale_right_grid.png
Type: image/png
Size: 5178 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/85d3612a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorscale_false.png
Type: image/png
Size: 1295 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/85d3612a/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: colorscale_false.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/85d3612a/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorscale_false_grid.png
Type: image/png
Size: 3968 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/85d3612a/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorscale_right.png
Type: image/png
Size: 1466 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/85d3612a/attachment-0003.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: colorscale_right.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/85d3612a/attachment.asc>
More information about the vtkusers
mailing list