Sorry, it&#39;s vtkThreshold. As for the input format, I don&#39;t know what the simplest format is for reading in 3D image data. Perhaps someone else on the list knows.<div><br></div><div>Jeff<br><br><div class="gmail_quote">
On Sun, Jun 28, 2009 at 12:14 PM, 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>
Thanks for the starting point. It would make more sense to load from a file<br>
from my point of view too. What format should the file be in? Can I simply<br>
have a list of the x,y and z points I wish to generate voxels from? Like<br>
this:<br>
<br>
1 5 6<br>
1 6 6<br>
1 7 6<br>
etc..<br>
<br>
Also, I couldn&#39;t see the vtkThresholdFilter class is the class list.<br>
<br>
Thanks so far!<br>
<div><div></div><div class="h5"><br>
Jeff Baumes wrote:<br>
&gt;<br>
&gt; Take a look at the documentation for vtkImageData for how to set the 3D<br>
&gt; extents and fill the scalar data with a 0/1 array. You will have to put<br>
&gt; your<br>
&gt; values in a vtkIntArray one by one since there is no way to pass a java<br>
&gt; array pointer directly to an array. It would be more efficient to load<br>
&gt; your<br>
&gt; data directly from disk using a VTK reader so you don&#39;t have to do lots of<br>
&gt; looping with Java-wrapped VTK.<br>
&gt; Then look at vtkThresholdFilter for how to threshold this, then you can<br>
&gt; send<br>
&gt; that through vtkGeometryFilter, then vtkPolyDataMapper/vtkActor and into a<br>
&gt; vtkRenderWindow. You could also I suppose use volume rendering on the<br>
&gt; whole<br>
&gt; dataset using an appropriate transfer function, but I&#39;m not an expert in<br>
&gt; that.<br>
&gt;<br>
&gt; Jeff<br>
&gt;<br>
&gt; On Thu, Jun 25, 2009 at 10:35 AM, hammett &lt;<a href="mailto:notlee@gmail.com">notlee@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi. I have a three-dimensional array, the values of which are either 0 or<br>
&gt;&gt; 1.<br>
&gt;&gt; How can I create a 3D visualisation which shows just the elements in the<br>
&gt;&gt; array which are set to 1 in Java? What I&#39;m trying to do is create voxels<br>
&gt;&gt; from the 3D array. I have looked through the mailing list archive and on<br>
&gt;&gt; the<br>
&gt;&gt; Internet and VTK is quite a lot of information to take in so I haven&#39;t<br>
&gt;&gt; managed to work out how to do this.<br>
&gt;&gt;<br>
&gt;&gt; Thanks for any help.<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <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>
&gt;&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/How-to-visualise-3d-array-of-data-tp24204434p24242865.html" target="_blank">http://www.nabble.com/How-to-visualise-3d-array-of-data-tp24204434p24242865.html</a><br>

</font><div><div></div><div class="h5">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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jeff Baumes, Ph.D.<br>R&amp;D Engineer, Kitware Inc.<br>(518) 881-4932<br><a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a><br>
</div>