MantisBT - ITK
View Issue Details
0009259ITKpublic2009-07-10 18:272010-10-21 14:18
Charlotte Curits 
Jim Miller 
normalminoralways
assignedopen 
 
 
0009259: itkImageToVTKImageFilter not updating all information
When re-using the itkImageToVTKImageFilter, the filter requires two calls to Update() in order to correctly update the output information. This has been tested by examining the scalar range of the data as computed by GetScalarRange(). A workaround is to add "m_exporter->Update()" to the filter's Update() method, as currently only the importer is being updated (although in theory this should be enough).
A more or less minimal example is attached, although the dicom series reading is specific to my own files (which have both "LEFT" and "RIGHT" protocols in a single folder). This program prints out the scalar ranges of converted images before and after thresholding (to change the scalar range), with the following result:

Original Image range: [0 255]
Thresholded image range: [0 255]
Second update thresholded image range: [0 1]

With a modified version of the filter as described above, the thresholded image range is updated correctly the first time.
No tags attached.
cxx main.cxx (2,927) 2009-07-10 18:27
https://public.kitware.com/Bug/file/2362/main.cxx
Issue History
2009-07-10 18:27Charlotte CuritsNew Issue
2009-07-10 18:27Charlotte CuritsFile Added: main.cxx
2010-04-26 11:48Luis IbanezStatusnew => assigned
2010-04-26 11:48Luis IbanezAssigned To => Cory W Quammen
2010-10-21 14:18Hans JohnsonAssigned ToCory W Quammen => Jim Miller

There are no notes attached to this issue.