<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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am having some trouble understanding the format of a .vtk file. I am deformably registering 2 CT images and saving the displacement field in a .vtk file. According to a pdf I found (for VTK v4.2), when written in ASCII format, vector
data should have 3 values on each line corresponding to the x,y,z components for each vector. When I write my .vtk file, I get this,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># vtk DataFile Version 3.0<o:p></o:p></p>
<p class="MsoNormal">VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)<o:p></o:p></p>
<p class="MsoNormal">ASCII<o:p></o:p></p>
<p class="MsoNormal">DATASET STRUCTURED_POINTS<o:p></o:p></p>
<p class="MsoNormal">DIMENSIONS 512 512 88 <o:p></o:p></p>
<p class="MsoNormal">SPACING 9.7656250000000000e-001 9.7656250000000000e-001 3.0000000000000000e+000
<o:p></o:p></p>
<p class="MsoNormal">ORIGIN -2.5000000000000000e+002 -1.0900000000000000e+002 -1.5900000000000000e+002
<o:p></o:p></p>
<p class="MsoNormal">POINT_DATA 23068672<o:p></o:p></p>
<p class="MsoNormal">VECTORS vectors float<o:p></o:p></p>
<p class="MsoNormal">-0.0644559 -0.0859412 0 0.231144 -0.231144 0 <o:p></o:p></p>
<p class="MsoNormal">0.242202 -0.201835 0 -0.211765 0 0 <o:p></o:p></p>
<p class="MsoNormal">0.164835 -0.362637 0 0.159204 -0.437811 0 <o:p></o:p></p>
<p class="MsoNormal">0.108108 -0.0405405 0 0.395062 -0.0493827 0 <o:p></o:p></p>
<p class="MsoNormal">-0.0987654 0.00493827 0 0.447702 -0.127915 0 <o:p></o:p></p>
<p class="MsoNormal">-0.167866 0.167866 0 -0.359551 -0.134831 0 <o:p></o:p></p>
<p class="MsoNormal">.<o:p></o:p></p>
<p class="MsoNormal">.<o:p></o:p></p>
<p class="MsoNormal">.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Which is giving 6 values on each line. I looked for some documentation but couldn’t find anything other than the pdf. Could someone please point me to the latest documentation for the .vtk file format? Also, I originally wrote the files
in binary format, but was having some issue with that as well, which is why I switched to ASCII so I can actually visualize the data. The documentation is not clear if there are newline characters included or not when binary data is written. I would assume
not, but could this be clarified as well?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">James Armstrong, Ph.D.<o:p></o:p></p>
<p class="MsoNormal">PostDoctoral Fellow, Physics<o:p></o:p></p>
<p class="MsoNormal">Department of Radiation Oncology<o:p></o:p></p>
<p class="MsoNormal">University of Colorado School of Medicine<o:p></o:p></p>
<p class="MsoNormal">1665 Aurora Ct, MS F706<o:p></o:p></p>
<p class="MsoNormal">Aurora, CO 80045<o:p></o:p></p>
<p class="MsoNormal">720-848-0257<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>