[vtkusers] How to visualise 3d array of data

Jeff Baumes jeff.baumes at kitware.com
Mon Jun 29 11:01:14 EDT 2009


Sorry, it's vtkThreshold. As for the input format, I don't know what the
simplest format is for reading in 3D image data. Perhaps someone else on the
list knows.
Jeff

On Sun, Jun 28, 2009 at 12:14 PM, hammett <notlee at gmail.com> wrote:

>
> Thanks for the starting point. It would make more sense to load from a file
> from my point of view too. What format should the file be in? Can I simply
> have a list of the x,y and z points I wish to generate voxels from? Like
> this:
>
> 1 5 6
> 1 6 6
> 1 7 6
> etc..
>
> Also, I couldn't see the vtkThresholdFilter class is the class list.
>
> Thanks so far!
>
> Jeff Baumes wrote:
> >
> > 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't have to do lots
> of
> > looping with Java-wrapped VTK.
> > 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'm not an expert in
> > that.
> >
> > Jeff
> >
> > On Thu, Jun 25, 2009 at 10:35 AM, hammett <notlee at gmail.com> wrote:
> >
> >>
> >> Hi. I have a three-dimensional array, the values of which are either 0
> or
> >> 1.
> >> How can I create a 3D visualisation which shows just the elements in the
> >> array which are set to 1 in Java? What I'm trying to do is create voxels
> >> from the 3D array. I have looked through the mailing list archive and on
> >> the
> >> Internet and VTK is quite a lot of information to take in so I haven't
> >> managed to work out how to do this.
> >>
> >> Thanks for any help.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-visualise-3d-array-of-data-tp24204434p24204434.html
> >> Sent from the VTK - Users mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Please keep messages on-topic and check the VTK FAQ at:
> >> http://www.vtk.org/Wiki/VTK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.vtk.org/mailman/listinfo/vtkusers
> >>
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-visualise-3d-array-of-data-tp24204434p24242865.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4932
jeff.baumes at kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090629/a6b8e81b/attachment.htm>


More information about the vtkusers mailing list