[vtkusers] strange behavior of vtkClipPolyData ???

Marcel Weiss mweiss at cbs.mpg.de
Thu Feb 19 14:29:15 EST 2009


as I could not get any anwser or remark on my problem, I want to raise it once more...

I´m struggeling with a strange behavior of vtkClipPolyData which creates an enormous amount of new lines and cells when applied as shown below to a result of vtkStreamLine ... 

any ideas?

....

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 ...

thanks

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



More information about the vtkusers mailing list