Take a look at the documentation for vtkImageData for how to set the 3D extents and fill the scalar data with a 0/1 array. You will have to put your values in a vtkIntArray one by one since there is no way to pass a java array pointer directly to an array. It would be more efficient to load your data directly from disk using a VTK reader so you don&#39;t have to do lots of looping with Java-wrapped VTK.<div>
<br></div><div>Then look at vtkThresholdFilter for how to threshold this, then you can send that through vtkGeometryFilter, then vtkPolyDataMapper/vtkActor and into a vtkRenderWindow. You could also I suppose use volume rendering on the whole dataset using an appropriate transfer function, but I&#39;m not an expert in that.</div>
<div><br></div><div>Jeff<br><br><div class="gmail_quote">On Thu, Jun 25, 2009 at 10:35 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="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi. I have a three-dimensional array, the values of which are either 0 or 1.<br>
How can I create a 3D visualisation which shows just the elements in the<br>
array which are set to 1 in Java? What I&#39;m trying to do is create voxels<br>
from the 3D array. I have looked through the mailing list archive and on the<br>
Internet and VTK is quite a lot of information to take in so I haven&#39;t<br>
managed to work out how to do this.<br>
<br>
Thanks for any help.<br>
--<br>
View this message in context: <a href="http://www.nabble.com/How-to-visualise-3d-array-of-data-tp24204434p24204434.html" target="_blank">http://www.nabble.com/How-to-visualise-3d-array-of-data-tp24204434p24204434.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<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>
</blockquote></div><br>
</div>