Hello again,<br><br>What do you mean by &quot;not ideal&quot;, doesn&#39;t it look like expected, or doesn&#39;t it work?<br><br>I&#39;m not sure if you need the Delauny triangulation if you start with a structured grid. I think the points in the grid should have coordinates time/index/0, the stock price should go as an array into the pointdata if you want to use warpscalar. I never worked with structured grids before (only unstructured) so I can only guess.<br>
<br>Try to read the reference (<a href="http://www.vtk.org/doc/release/5.8/html/">http://www.vtk.org/doc/release/5.8/html/</a>) to get an idea what you need to specify. I think if you do not really know how your data structure should look like it&#39;s easier to construct it in memory and then use a writer class instead of constructing the datafile by hand.<br>
<br>Kind regards,<br>Johannes Strecha.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 4, 2012 at 10:55 PM, boyeggplant110 <span dir="ltr">&lt;<a href="mailto:boyeggplant110@gmail.com" target="_blank">boyeggplant110@gmail.com</a>&gt;</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"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks for your reply.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> I want to use vtk to construct a program to visualize the stock price. The stock price is static here, not time varying. I want to do  something like the attachment. I want to order the stock by x-coordinates so the x-coordinates is stock index(or stock name),y-coodinates is time, and z-coordinates is price. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I want to use height field to implement this.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I use vtkDelaunay2D and vtkWarpScalar to handle my dataset but the result is not ideal<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Do you have any suggestions?<u></u><u></u></span></p><p class="MsoNormal"><img src="cid:image001.jpg@01CDD237.D4D2EE40" height="288" width="576"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="color:#595959">JIE LI</span></b><span style="color:#595959"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="color:#595959">Master of Science in Statistics</span></b><span style="color:#595959"><u></u><u></u></span></p><p class="MsoNormal"><b><span style="color:#595959">Division of Statistics + Scientific Computation </span></b><span style="color:#595959"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="color:#595959">The University of Texas at Austin| 1 <span style="background:white">University</span> Station G2500| Austin, TX 78712</span></b><span style="color:#595959"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Johannes Strecha [mailto:<a href="mailto:j.strecha@gmail.com" target="_blank">j.strecha@gmail.com</a>] <br>
<b>Sent:</b> 2012</span><span style="font-size:10.0pt;font-family:宋体" lang="ZH-CN">年</span><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">12</span><span style="font-size:10.0pt;font-family:宋体" lang="ZH-CN">月</span><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">4</span><span style="font-size:10.0pt;font-family:宋体" lang="ZH-CN">日</span><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> 13:04<br>
<b>To:</b> boyeggplant110; <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br><b>Subject:</b> Re: [vtkusers] How to convert point data into proper datatype in vtk?<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hello,<br><br>sorry, haven&#39;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" target="_blank">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&#39;s a surplus U in structured_grid &amp; I&#39;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.<u></u><u></u></p><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, Dec 4, 2012 at 4:49 PM, boyeggplant110 &lt;<a href="mailto:boyeggplant110@gmail.com" target="_blank">boyeggplant110@gmail.com</a>&gt; wrote:<u></u><u></u></p>
<div><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">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="color:#595959">JIE </span></b><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><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><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p>
</div></div></div></div></div></blockquote></div><br></div>