<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-Jinzhong<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
vtkusers-bounces@vtk.org [mailto:vtkusers-bounces@vtk.org] <b>On Behalf Of </b>David
Doria<br>
<b>Sent:</b> Thursday, October 15, 2009 6:55 AM<br>
<b>To:</b> Jeff Baumes<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] matrix output VERY hard to read<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal>On Tue, Oct 13, 2009 at 9:34 AM, Jeff Baumes <<a
href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>I agree that this would likely be a good change. Could you
add a<br>
little more clarity to this? What class(es)/method(s) are you<br>
proposing to change?<br>
<br>
Jeff<o:p></o:p></p>
<div>
<p class=MsoNormal><br>
Jeff,<br>
<br>
I think just vtkMatrix4x4::PrintSelf would need to be changed? Maybe something
more like this:<br>
<a href="http://www.rpi.edu/~doriad/VTK_List/MatrixOutput/">http://www.rpi.edu/~doriad/VTK_List/MatrixOutput/</a><br>
<br>
It's tough to get the formatting VERY nice because of variable width character
fonts, but there is still quite an improvement (in my opinion). Here are two
examples:<br>
<br>
Existing method, hard matrix:<br>
1 -4.12726e-10 3.91703e-10 5.2556e-12 <br>
4.12726e-10 1 7.75407e-10 -7.62694e-10 <br>
-3.91703e-10 -7.75407e-10 1 7.57439e-10 <br>
0 0 0 1 <br>
<br>
Proposed method, hard matrix:<br>
1.000 -0.000 0.000 0.000<br>
0.000 1.000 0.000 -0.000<br>
-0.000 -0.000 1.000 0.000<br>
0.000 0.000 0.000 1.000<br>
<br>
<br>
Existing method, easy matrix:<br>
1 2 3 4 <br>
5 6 7 8 <br>
9 10 11 12 <br>
13 14 15 16 <br>
<br>
Proposed method, easy matrix:<br>
1.000 2.000 3.000 4.000<br>
5.000 6.000 7.000 8.000<br>
9.000 10.000 11.000 12.000<br>
13.000 14.000 15.000 16.000<br>
<br>
As you can see there is a HUGE difference in the hard case, while the easy case
remains ok. The precision of the decimal outputs is clearly a user preference
sort of thing - maybe we could even make some options for the formatting? That
may be hard to do in the PrintSelf sort of framework though..<br>
<br>
Thoughts?<br>
<br clear=all>
Thanks,<br>
<br>
David <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>