[vtkusers] Textures, Colours, SetScalars

Malcolm Drummond malcolm at geovision.co.za
Wed Mar 26 13:58:57 EST 2003


Doesn't this read in a simple bitmap file ?

bmpReader = vtk.vtkBMPReader()
bmpReader.SetFileName(VTK_DATA_ROOT + "/Data/masonry.bmp")

it's all there, in TPlane.py in the examples/rendering/python dir.

Hope this helps
Malcolm
  ----- Original Message ----- 
  From: Markus Louw 
  To: vtkusers at public.kitware.com 
  Sent: Wednesday, March 26, 2003 8:29 PM
  Subject: [vtkusers] Textures, Colours, SetScalars


  Hello All

  I am quite disappointed with vtk´s lack of texture methods.   It seems that none of the objects can read in a simple BMP file and paint it onto
  a PolyData set. 

  So I wrote the BMP file reader, now I am trying to visualize my data
   (3D vertex points of faces, each face with a texture map), and I´m trying to 
  convert the byte RGB values to floats [0,1], (so that I can set the scalar values of the vetrices to the new float colour values), but it doesn´t work, 
  the colours come out all funny.     I have set the SetNumberofComponents of the FloatArray scalar set to 3, and have initialized it with the correct number of tuples...

  Thakns
  Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030326/922d1da1/attachment.htm>


More information about the vtkusers mailing list