Justin,<div><br></div><div>I am using C++.</div><div>But I am asking about .vtk file format.</div><div>Now I do not use vtk library at all, just would like to utilize .vtk file format - it is quite straightforward.</div><div>
<br></div><div>Thanks,</div><div>Sergiy<br><br><div class="gmail_quote">10 марта 2012 г. 16:40 пользователь Justin Weber <span dir="ltr">&lt;<a href="mailto:onlyjus@gmail.com">onlyjus@gmail.com</a>&gt;</span> написал:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Sergiy,</p>
<p>What code are you using? If you are using <a href="http://python.org/" target="_blank">python</a>, I have code that will take numpy arrays and save them to *.vtk files that work in paraview. However you need the pyhon wrapped vtk library. For windows, there is an awesome collection of windows binaries here: <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/" target="_blank">http://www.lfd.uci.edu/~gohlke/pythonlibs/</a>, thanks <span style="font-size:medium;font-family:&#39;Times New Roman&#39;"> </span>Christoph Gohlke!</p>


<p>Also, there is <a href="https://bitbucket.org/pauloh/pyevtk" target="_blank">PyEVTK</a>. Another resource: <a href="http://www.vtk.org/Wiki/VTK/Writing_VTK_files_using_python" target="_blank">http://www.vtk.org/Wiki/VTK/Writing_VTK_files_using_python</a>.</p>


<p>Justin</p>
<div class="gmail_quote">On Mar 10, 2012 12:36 AM, &quot;Sergiy Tkachuk&quot; &lt;<a href="mailto:serg.tk@gmail.com" target="_blank">serg.tk@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>
        <p>Hi, </p><p>I have 3d binary array which represents volume:<br>
a[x,y,z] = 0 - no object,<br>
a[x,y,z] = 1 - object region.</p>

<p>I want to save it in .vtk format and view in <a href="http://www.paraview.org/" rel="nofollow" target="_blank">ParaView</a>.<br>
What is the simplest way to achieve this?<br><br></p><p>I looked through the <a href="http://www.vtk.org/VTK/img/file-formats.pdf" rel="nofollow" target="_blank">VTK file format</a>, but I have not found direct way to achieve what I need, just via other structures..</p>



</div><div><br></div>Best wishes,
<div>Sergiy</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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>-------------------------<br>С уважением,<br>Сергей Ткачук<br><br><a href="http://serg.tk/" target="_blank">serg.tk</a>@<a href="http://gmail.com/" target="_blank">gmail.com</a>, <a href="mailto:t-serg@inbox.ru" target="_blank">t-serg@inbox.ru</a><br>
<a href="http://serg.tk" target="_blank"></a><a href="mailto:t-serg@inbox.ru" target="_blank">http://sergtk.com<br></a><br>
</div>