[vtkusers] Visualizing characteristic map like MATLAB surf does

Andy Treisch Andy.Treisch at gmx.de
Sun Aug 27 08:14:04 EDT 2006


Hi All!

I want to visualize a characteristik map like the Matlab "mesh" and "surf" 
commands do.
Lets take the following map for example:

0.00    0.00    0.00    0.00
0.00    0.15    0.40    0.70
0.00    0.20    0.50    0.90
0.00    0.30    0.70    1.00

I created a vtkPolyData adding vtkPoints with the data from the map. Points 
are
(0,0,0)..(0,3,0), (1,0,0)..(1,3,0.7), ... , (3,3,1)

Does there exist a filter, which can calculate the Polygons for the meshgrid 
without
my Interaction? Currently I have created an additional vtkCellArray where I 
have
to calculate the strips (4 Points, i.e. (0,0,0), (0,1,0), (1,0,0), 
(1,1,0.15)) Then I add them
to a vtkPolyDataMapper via SetPoints and SetStrips Method. As I said before 
I would
really like to use a vtk Filter doing the work for me.

There is another reason, why I am trying to use vtk and not Matlab :)
My application will get time-discrete data. This means, my input Data
will change during running the application and I want to display an 
"animated"
visualization. If I assign a new Pointset to my vtkPolyData, calculate the 
new
Polygons and then call the Update() method on my vtkPolyDataMapper, is
that enough to get the new display of the characteristic map? Or do I have 
to
do something more with the vtkRenderWindow or sth. else?

I have uploaded a picture of what I want to get and my current sourcefile to 
this location:
http://www-public.tu-bs.de/~y0018227/vtk


Thanks in advance for helping me,

Andy Treisch






More information about the vtkusers mailing list