[vtkusers] Visualizing scalar data
Juan José Aja Fernández
juan.aja at gmail.com
Tue Feb 8 20:00:03 EST 2005
Hi everyone.
I'm having a lot of trouble trying to volume render unstructured grids.
Basically what I need is to read scalar (ASCII) data from a file (the
scalars are arranged in a grid layout, so X increments first, then Y,
then Z), and then visualize it applying volume rendering techniques.
I started out by constructing a unstructured grid which will contain
the scalars.
Then I read each point of data and insert it into a vtkDoubleArray
(let's call it scalars).
This scalars represent values of emission of certain objects, they are
arranged in cubes, and each point is in the order of 1.03e-12,
6.01449e-19 and so.
I believe I need to construct a grid that containts the scalar data,
and I've found that the only method that supports volume rendering
works on untructured ones.
Am I forced to use grids in order to render it?
Supposing that I must use grids I began constructing one.
Each point of this grid has assigned one scalar of my data by means of
the following combination of methods:
grid->GetPointData()->SetScalars(scalars)
Now I would like to apply volume rendering techniques to the scalars
of my grid, so I intend to use the method:
vtkUnstructuredGridVolumeRayCastFunction and it's corresponding mapper
vtkUntructuredGridVolumeRayCastMapper.
As I understand it, I need to interpolate the data in each point and
assign the result to each cell in order to apply volume rendering.
Is this correct?
If so, then I believe that vtkPointDataToCellData will do the job.
If that's not true, how can I accomplish this?
Thanks in advance.
More information about the vtkusers
mailing list