[vtkusers] strange behavior of vtkClipPolyData ???
Bill Lorensen
bill.lorensen at gmail.com
Thu Feb 19 23:30:32 EST 2009
In vtkPolyLine::Clip, each segment of the polyline is clipped
independently. So a polyline with 30 segments would be split into 30
lines as it is clipped.
To reassemble the lines into polylines, you can apply the vtkStripper
to the output of the clipper.
Bill
On Thu, Feb 19, 2009 at 2:29 PM, Marcel Weiss <mweiss at cbs.mpg.de> wrote:
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list