View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001121VTK(No Category)public2004-08-31 08:122004-09-01 10:00
Reporterraphael.de_matos 
Assigned ToMathieu Malaterre 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001121: problem with colors and redhat 9
Descriptionbug in vtk-4.3.0-1.cvs20030620

When I run the following script under win xp, there is no problem. But under linux, I've got a grey scale render instead of a coloured one.

import vtk
reader = vtk.vtkUnstructuredGridReader()
reader.SetFileName('./essai.vtk')
reader.Update()
lut1 = vtk.vtkLookupTable()
lut1.SetHueRange(0.667, 0.0)
dataMapper = vtk.vtkDataSetMapper()
dataMapper.SetLookupTable(lut1)
dataMapper.SetInput(reader.GetOutput())
drange = reader.GetOutput().GetScalarRange()
dmin = drange[0]
dmax = drange[1]
dataMapper.SetScalarRange(1.2, 2.5)
dataActor = vtk.vtkActor()
dataActor.SetMapper(dataMapper)
ren = vtk.vtkRenderer()
ren.AddActor(dataActor)
ren.SetBackground(1,1,1)
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
renWin.SetSize(500, 500)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
iren.Initialize()
iren.Start()


And the file essai.vtk :

# vtk DataFile Version 3.0
2D scalar data
ASCII

DATASET UNSTRUCTURED_GRID
POINTS 8 float
0 0 2
1 0 2
1 1 2
0 1 2
2 0 2
3 0 2
3 1 2
2 1 2

CELLS 6 24
3 0 1 2
3 0 2 3
3 1 4 2
3 4 7 2
3 4 5 7
3 5 6 7

CELL_TYPES 6
5
5
5
5
5
5

POINT_DATA 8
SCALARS temperature float 1
LOOKUP_TABLE default
1.0 2.0 2.0 1.0
3.0 4.0 4.0 3.0
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0001405)
Mathieu Malaterre (developer)
2004-09-01 10:00

This works for me, this a bug on your redhat machine.
A few things to check:
- Can you run some OpenGL code properly ?
- Can you reproduce the problem with Mesa (make Mesa, then using export LD_PRELOAD=/opt/Mesa/lib/libGL.so this will force the use of Mesa opengl lib instead of your manufacturer one's).

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team