Put it in the FIELD DATA. Besides googling for vtk file formats I find it helpful to generate small datasets in paraview to decipher the syntax.<div><br></div><div>Here is a sample, which I created in ParaView by making a 2x2x2 wavelet, applying the calculator with the expression "coordsX" to make the second point associated array, and then saving as a legacy ascii vtk file.</div>
<div><div><br></div><div># vtk DataFile Version 3.0</div><div><div>vtk output</div><div>ASCII</div><div>DATASET STRUCTURED_POINTS</div><div>DIMENSIONS 3 3 3</div><div>SPACING 1 1 1</div><div>ORIGIN 0 0 0</div><div>POINT_DATA 27</div>
<div>SCALARS Result double</div><div>LOOKUP_TABLE default</div><div>0 1 2 0 1 2 0 1 2</div><div>0 1 2 0 1 2 0 1 2</div><div>0 1 2 0 1 2 0 1 2</div><div><br></div><div>FIELD FieldData 1</div><div>RTData 1 27 float</div><div>
260 169.546 42.5586 147.96 96.9844 17.2746 57.2951 53.5966 30.5032</div><div>156.706 105.73 26.0202 84.1445 57.1137 6.07904 40.7567 42.401 25.7059</div><div>31.1758 27.4773 4.3839 5.8918 7.53615 -9.15897 19.1204 27.163 18.1301</div>
<div><br></div><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br>
<br><br><div class="gmail_quote">On Thu, Oct 20, 2011 at 5:19 PM, Gaurish Telang <span dir="ltr"><<a href="mailto:gaurish108@gmail.com">gaurish108@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<div><br></div><div>I have a uniform rectangular grid on a cubical bounding box with N points placed along each dimension. For each of the N^3 grid points I have 2 or more attributes like pressure, density. </div>
<div>
MY vtk file for the simple case of the box [0,2]x[0,2]x[0,2] with spacing 1 (=> 8 grid points) is as follows. </div><div><div><br></div><div><div># vtk DataFile Version 2.0</div><div>Test file.</div><div>ASCII</div><div>
</div><div>DATASET STRUCTURED_POINTS</div><div>DIMENSIONS 2 2 2</div><div>ORIGIN 0.000 0.000 0.000</div><div>SPACING 1.000 1.000 4.000</div><div> </div><div>POINT_DATA 8</div>
<div>
SCALARS density float</div><div>LOOKUP_TABLE default</div><div><br></div><div><br></div><div>1.2 2.3 3.3 4.5</div><div>5.4 6.6 7.7 8.8</div><div><br></div><div><br></div><div>POINT_DATA 8</div><div>SCALARS pressure float</div>
<div>LOOKUP_TABLE default</div><div><br></div><div><br></div><div>1.2 3.4 5.6 7.8</div><div>5.6 7.8 8.9 1.2</div></div></div><div><br></div><div>The part related to the pressure is not being accepted by the Paraview software. I get the following error</div>
<div>
<table style="margin-top:4px;margin-bottom:4px;margin-left:4px;margin-right:4px">
<tbody><tr>
<td style="border:none">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:#800000">ERROR: In /home/kitware/Dashboards/MyTests/ParaView-master/source/VTK/IO/vtkDataReader.cxx, line 915</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:#800000">vtkStructuredPointsReader (0xa698438): Unsupported point attribute type: point_data for file: /home/gaurish108/Desktop/TongfeiFileReadPRactice/test.vtk</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font color="#800000" face="Courier"><span style="font-size:12px"><br>
</span></font></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px">However the density information is being accepted and read by Paraview. Being new to VTK file format I think I am not writing the pressure information correctly. </span></font></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px">Please let me know how to rectify this. </span></font></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px"><br>
</span></font></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px"><br>
</span></font></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px">Thank you! </span></font></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px"><br>
</span></font></p><font color="#888888"><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px">Gaurish Telang </span></font></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px"><br>
</span></font></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font color="#ffffff" face="'times new roman', serif"><span style="font-size:12px"><br>
</span></font></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font color="#800000" face="Courier"><span style="font-size:12px"><br>
</span></font></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:#800000"><br></span></p>
</font></td></tr></tbody></table></div><div><br></div><div><br></div><div><br></div><div><br></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div></div></div>