[vtkusers] strange behavior of vtkClipPolyData ???

Marcel Weiss mweiss at cbs.mpg.de
Mon Feb 9 07:09:54 EST 2009


Hi again²,

I´m still facing my clipping problem and would be deeply grateful for any hints or remarks!

I am using vtkStreamLine to trace streams through a 3D data field.
The start points are given by a vtkPolyData object in the same space.
So the number of streams created is identical to the number of points in the vtkPolyData. Each of the created streams consists of ~30 connected points.

Everything fine so far.

then I use vtkClipPolyData to clip those streams based on (other) scalar value.
therefor I assign a scalar value for each of the points of every single stream and use the following code for clipping

vtkClipPolyData* cutter = vtkClipPolyData :: New();
cutter-> SetInput(streams);
cutter-> GenerateClipScalarsOff(); 
cutter-> SetValue(1.0);
cutter-> UpdateInformation();  
cutter-> Update();

this also works (some how), BUT:
although vtkClipPolyData removes many of the streams points (as expected), it seems to create many new cell/lines. (see below)

streamlining result has got: 
12577845 points, 483730 cells, 0 verts, 483730 lines, 0 polys and 0 strips.

cutting result has got:
9753382 points, 9268541 cells, 0 verts, 9268541 lines, 0 polys and 0 strips.

even if some of the streams/line are clipped into two or more new lines, which should not happen (due to the way I write the scalars), the number of cells/lines/streams increases in a way I can´t understand ...

Anyone any ideas?

thanks

Marcel Weiss
PhD student
Department of Neurophysics
Max Planck Institute for Human Cognitive and Brain Sciences



More information about the vtkusers mailing list