Hello,<br><br>sorry, haven't got the time to check your specific file. Here is a description of the legacy vtk file format:<br><a href="http://www.vtk.org/VTK/img/file-formats.pdf">http://www.vtk.org/VTK/img/file-formats.pdf</a><br>
<br>I try to avoid constructing such files by hand. If you know (or want to learn) python you can construct your dataset in memory (by calling *.InsertNextPoint(...) or so, depends on your data structure). On the plus-side you get to know the vtk data structures really well and you can use one of the numerous writer-classes to write your datafiles as xml or legacy-files, with or without compression, ...<br>
<br>3 things: there's a surplus U in structured_grid & I'm not too sure how stock prices can be visualized by a structured grid, but maybe you thought of something special. Have you had a look at gnuplot or matplotlib? They can do simple visualizations very good, maybe using vtk is a bit of an overkill.<br>
<br>Kind regards,<br>Johannes Strecha.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 4, 2012 at 4:49 PM, boyeggplant110 <span dir="ltr"><<a href="mailto:boyeggplant110@gmail.com" target="_blank">boyeggplant110@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">Hi all,<u></u><u></u></p><p class="MsoNormal"> I have a problem about how to convert point data to proper data type in vtk. I have a dataset including stock prices. So I have 3 variables: stock price, time, and stock index. I want visualize the dataset but it doesn’t work when I want to construct a structured grid vtk file(as following). I wonder if my method to convert the data is right.<u></u><u></u></p>
<p class="MsoNormal">Example :<u></u><u></u></p><p class="MsoNormal"># vtk DataFile Version 2.0<u></u><u></u></p><p class="MsoNormal">test data<u></u><u></u></p><p class="MsoNormal">ASCII<u></u><u></u></p><p class="MsoNormal">
DATASET STRUCUTURED_GRID<u></u><u></u></p><p class="MsoNormal">DIMENSIONS 30 30 30<u></u><u></u></p><p class="MsoNormal">POINTS 30 float<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">1 1 36.32 <u></u><u></u></p>
<p class="MsoNormal">1 2 36.61 <u></u><u></u></p><p class="MsoNormal">1 3 36.48 <u></u><u></u></p><p class="MsoNormal">1 4 36.64 <u></u><u></u></p>
<p class="MsoNormal">1 5 35.78 <u></u><u></u></p><p class="MsoNormal">1 6 35.94 <u></u><u></u></p><p class="MsoNormal">1 7 37.04 <u></u><u></u></p>
<p class="MsoNormal">1 8 36.97 <u></u><u></u></p><p class="MsoNormal">1 9 37.65 <u></u><u></u></p><p class="MsoNormal">1 10 37.63 <u></u><u></u></p>
<p class="MsoNormal">2 1 76.78 <u></u><u></u></p><p class="MsoNormal">2 2 75.58 <u></u><u></u></p><p class="MsoNormal">2 3 79.05 <u></u><u></u></p>
<p class="MsoNormal">2 4 80.28 <u></u><u></u></p><p class="MsoNormal">2 5 78.64 <u></u><u></u></p><p class="MsoNormal">2 6 78.95 <u></u><u></u></p>
<p class="MsoNormal">2 7 82.58 <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The first column is stock index, second is time, third is price.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks in advance!<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:#595959">JIE </span></b><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:#595959"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p></div></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>