[vtk-developers] vtkTableWriter precision loss

Hunt, Warren L wlhunt at sandia.gov
Mon Jul 25 20:26:01 EDT 2011


Greetings from New Mexico,

I am using vtkTableWriter to write a vtkTable of numeric data out to a file. The vtkTable is constructed with its SetRow(vtkIdType rowID, vtkVariantArray *values) method and the vtkVariantArray has been loaded with type double values. When vtkDataWriter::WriteArray() actually processes the values, ToString() is called on each variant which appears to truncate each value down to about 7 digits of precision.  This results in writing a file of severely reduced precision.

There seems to be several ways to address this issue, but vtkVariant's conversion seems to be primarily at fault. Could I get some suggestions on how to proceed?

Thanks!
Warren

Warren Hunt
505.284.8881
Scientific Applications, SNL 9326
Sandia National Laboratories
Albuquerque, New Mexico



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110726/910291f9/attachment.html>


More information about the vtk-developers mailing list