[vtkusers] Data representation and color contour

Philip Schuchardt ohc at vt.edu
Thu Apr 12 22:31:15 EDT 2007


Look into vtkLookupTable and vtkAnimationScene.

You can set the scalars for the polydata by doing something like this:

vtkPolyData data = vtkPolyData::New();
data->AddPoints(points);
data->AddPolys(polys);
data->GetPointData()->SetScalars(scalars);

The scalars are then linked to lookuptable in a mapper.

This is a good example of building the lookup table manually:
http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/Rendering/Python/rainbow.py?root=VTK&content-type=text/plain

Philip Schuchardt

On Thursday 12 April 2007 3:20 pm, Janny Dong wrote:
> Hi all,
>
> I have a US map and some measurements distributed in the whole area. For
> each time step, I'd like to generate a color surface (a frame) over the map
> by data interpolation. The colors would represent measurements values. Then
> I'd like to put these frames into a video file (eg. avi file). I know in
> Matlab, I can use functions like meshgrid(), griddata() and surf(). I am
> not quite sure if I can do all this stuff in VTK. Any suggestions will be
> greatly appreciated.
>
> Janny
> <vtkusers at vtk.org>



More information about the vtkusers mailing list