View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0003579 | VTK | (No Category) | public | 2006-08-03 11:10 | 2016-08-12 09:54 | ||||
Reporter | Mathieu Malaterre | ||||||||
Assigned To | Dave DeMarle | ||||||||
Priority | low | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003579: vtkLookupTable + vtkStructuredPointsWriter | ||||||||
Description | Hi all, In case someone already knows the answer I am posting this. Anyway here is a python script(*) that reproduce the bug. The faulty line is: writer.SetFileTypeToBinary() if a vtkImageData is saved with a vtkLookupTable in binary mode everything is ok, but when saved as ASCII then the LUT can't be reread properly. I'll try to find a patch ASAP. BTW, does anyone knows why I should explicitely set the TableRange ? lut.SetTableRange( 0, 255) Thanks, mathieu ################################################## (*) 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.vtkStructuredPointsWriter() writer.SetInput( image ) writer.SetFileName( 'demolut.vtk' ) #writer.SetFileTypeToBinary() #culprit !!! writer.Write() reader2 = vtk.vtkStructuredPointsReader() reader2.SetFileName( 'demolut.vtk' ) reader2.UpdateWholeExtent() lut = reader2.GetOutput().GetPointData().GetScalars().GetLookupTable() lut.SetTableRange( 0, 255) #trick ?? map2 = vtk.vtkImageMapToColors () map2.SetInput (reader2.GetOutput()) map2.SetLookupTable ( lut ) map2.SetOutputFormatToRGB() iren = vtk.vtkRenderWindowInteractor(); viewer = vtk.vtkImageViewer2() viewer.SetInput (map2.GetOutput()) viewer.SetupInteractor (iren) #make interface iren.Initialize() iren.Start() ################################################## | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0030955) Jean-Christophe Fillion-Robin (manager) 2013-06-05 17:57 |
Does the problem still occur with VTK 5.10 ? VTK 6 ? |
(0030964) Mathieu Malaterre (developer) 2013-06-06 02:51 |
Steps still reproduce error here. What did you do on your side to avoid the issue ? |
(0031223) Dave DeMarle (administrator) 2013-07-22 19:21 |
If the bug persists in 6.0.0, please reopen. |
(0036882) Kitware Robot (administrator) 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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-11-30 09:09 | Mathieu Malaterre | Assigned To | Mathieu Malaterre => David Cole |
2011-01-19 09:54 | David Cole | Assigned To | David Cole => |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
2013-06-05 17:57 | Jean-Christophe Fillion-Robin | Note Added: 0030955 | |
2013-06-06 02:51 | Mathieu Malaterre | Note Added: 0030964 | |
2013-07-22 19:21 | Dave DeMarle | Note Added: 0031223 | |
2013-07-22 19:21 | Dave DeMarle | Status | backlog => expired |
2013-07-22 19:21 | Dave DeMarle | Assigned To | => Dave DeMarle |
2016-08-12 09:54 | Kitware Robot | Note Added: 0036882 | |
2016-08-12 09:54 | Kitware Robot | Status | expired => closed |
2016-08-12 09:54 | Kitware Robot | Resolution | open => moved |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |