[vtkusers] Design question

Simon Ouellette s.ouellette1 at gmail.com
Fri Sep 11 21:53:11 EDT 2009


I'm new to VTK, and I'm trying to do something that I thought would be quite
easy, since it's very basic. I have a list of data points in 3D space, each
with an associated scalar value. My data set will be manually created, not
read through a VTK reader class.

I want to display a 3D graph of this data, with color/opacity mappings.

Initially, I was planning to go the vtkImageData/vtkVolumeRayCastMapper
route (which I saw in an example that produces a 3D graph similar to what I
want to produce). However, manually creating a vtkImageData from 3D data
implies transforming 3D arrays to 1D arrays, and this just looks too
complicated and ugly for something that should be simple. So I thought that
maybe I didn't have the right data set type, and that I should use a
vtkStructuredGrid instead, since it is more along the lines of the data set
I find myself with (a structured 3D space, plus I get to blank the cells I
don't use, etc.). However, all documentation I've read so far points to the
fact that it is impossible to render a volume from a structured grid (?). I
also can't find any method that allows to set data attributes in a
structured grid, for the color mapping. vtkStructuredGrid intuitively seems
to be the best data set choice, but vtkImageData is the only data set type
with which I know how render a color-mapped/opacity-mapped volume with.

After having read the User's Guide, reviewed examples, and searched through
the online class references, I still can't figure how I should be doing
this. I'm just overwhelmed and any help would be quite appreciated.

Simon Ouellette
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090911/e75197af/attachment.htm>


More information about the vtkusers mailing list