Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 741
    • Issues 741
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 196
    • Merge requests 196
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #1121
Closed
Open
Created Aug 30, 2004 by Kitware Robot@kwrobotOwner

problem with colors and redhat 9

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


bug 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

Assignee
Assign to
Time tracking