MantisBT - VTK
View Issue Details
0000484VTK(No Category)public2004-01-05 16:512016-08-12 09:54
Mathieu Malaterre 
Brad King 
lowminoralways
closedmoved 
 
 
0000484: vtkXMLImageData[Reader/Writer] + LookupTable
vtkXMLImageData[Reader/Writer] doesn't take into account the imagedata's lookuptable:

Here is a python script to reproduce the problem

import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()

reader = vtk.vtkBMPReader()
reader.SetFileName(VTK_DATA_ROOT + "/Data/masonry.bmp")
reader.Allow8BitBMPOn()
reader.Update()

#construct an image data with a lookup table
image = reader.GetOutput()
image.GetPointData().GetScalars().SetLookupTable( reader.GetLookupTable() )

writer = vtk.vtkXMLImageDataWriter()
writer.SetInput(image)
writer.SetFileName("demoxml.vtk")
writer.Write()

reader2 = vtk.vtkXMLImageDataReader()
reader2.SetFileName( 'demoxml.vtk' )
reader2.Update()

print reader2.GetOutput().GetPointData().GetScalars().GetLookupTable()


(This problem doesn't appear when using vtkStructuredPoints[Reader/Writer])
No tags attached.
Issue History
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036707
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved

Notes
(0036707)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.