<br>
<br><br><div class="gmail_quote">On Thu, Jul 2, 2009 at 7:33 AM, hammett <span dir="ltr">&lt;<a href="mailto:notlee@gmail.com">notlee@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;">
<br>
I have a file which contains the x, y and z co-ordinates which I wish to<br>
generate voxels from using vtkImageData. How can I read this data in to VTK?<br>
It looks like this:<br>
<br>
1 28 16<br>
1 29 15<br>
1 29 16<br>
1 30 15<br>
1 30 16<br>
1 31 14<br>
1 31 15<br>
1 31 16<br>
1 32 14<br>
1 32 15<br>
1 32 16<br>
1 33 14<br>
1 33 15<br>
1 34 14<br>
<br>
etc. Thanks in advance for any help.<br>
--<br></blockquote></div><br>You can use most of this example:<br>
<a href="http://www.vtk.org/Wiki/Write_a_file_of_triangle_corners" target="_blank">http://www.vtk.org/Wiki/Write_a_file_of_triangle_corners</a><br>


<br>
just replace the first few lines there that are generating data to
some code that reads your file. Let me know if this was not what you
were looking to do.<br>
<br clear="all">
Thanks,<br>
<br>
David<br>