[vtkusers] matrix output VERY hard to read

Jeff Baumes jeff.baumes at kitware.com
Wed Oct 21 16:38:34 EDT 2009


On Fri, Oct 16, 2009 at 5:24 PM, Yang, Jinzhong <jinzhong76 at gmail.com> wrote:
> The same problem is with the ascii *.vtk data file. It looks in a mess for
> those point coordinate outputs. When output data to streams, fix the width
> for each output element and specify the output precision should solve the
> problem easily.

Changing precision for debug output is one thing, but changing it for
*.vtk file output is another, where keeping the precision is
important.

Thinking about it, the default debug output for a matrix should
probably still contain the full precision, so you don't think there's
a value exactly zero in the matrix when there really isn't. If you
need a "pretty printed" matrix, I'd suggest another method. e.g.
vtkTable::Dump(int width) dumps a table to standard output keeping
each column to a certain number of characters.

Jeff



More information about the vtkusers mailing list