<div class="gmail_quote">On Thu, Dec 17, 2009 at 6:25 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="im">On Thu, Dec 17, 2009 at 5:46 AM, Dmitri Danewitz <span dir="ltr">&lt;<a href="mailto:d.danewitz@yahoo.de" target="_blank">d.danewitz@yahoo.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">

<div>Hello all!</div>
<div> </div>
<div>I want to create a VTK File  with my own C# program. I have the data stored in int variables. Does someone know a way in C# to write them into a vtk not as &quot;12345&quot; but as &quot;?€ _ _&quot; (binary) format?</div>


<div> </div>
<div>Thanks a lot!</div>
<div> </div><font color="#888888">
<div>Dmitri</div></font></td></tr></tbody></table><br></blockquote></div><div><br>Dmitri,<br><br>You can use vtkXMLPolyDataWriter with<a href="http://www.vtk.org/doc/nightly/html/classvtkXMLWriter.html#a5ca529771f07f666a6291086948d66ea" target="_blank"> SetDataModeToBinary</a>()<br>

<br>Let us know if this does what you&#39;re looking for.<br><br>Thanks,<br><br>David <br></div></div>
</blockquote></div><br>I just noticed that you wanted a vtk file. Is there a reason for this? I believe vtk files have been &quot;depricated&quot; and replaced by vtp files. If you indeed want a vtk file, I think you can use:<br>
<br>vtkPolyDataWriter with<br><a class="el" href="http://www.vtk.org/doc/nightly/html/classvtkDataWriter.html#a430bdf89f9711259820f703d6c846a1b">SetFileTypeToBinary</a>()<br><br clear="all">Thanks,<br><br>David<br>