[vtkusers] vtkClipClosedSurface using a finite plane
David Gobbi
david.gobbi at gmail.com
Fri Jun 15 18:54:35 EDT 2012
On Fri, Jun 15, 2012 at 4:31 PM, sebastian ordas
<sebastian.ordas at gmail.com> wrote:
> thank you David
>
> yes, more planes, more contours ... I thought the planes would set like a
> region inside which the clipping is performed
>
> anyway ... i will continue thinking ...
>
> btw, do you think it´s doable the modification in
> vtkClipClosedSurface::ClipAndContourPolys() to achieve my requirement?
Doubtful. It really expect the scalars to provide the signed distance
from an infinite plane. If given the signed distance from any other
kind of surface (especially one with sharp corners, like a box) it
won't give good results for the contours.
To put this in more general terms, the use of clipping scalars in a
clipping algorithm assumes that the clip surface is flat, or nearly
flat. The clipping scalars give a piecewise linear approximation of
the clipping surface. Using clip scalars to clip with anything but a
plane will only give approximate results. As the curvature of the
clip surface increases, the approximation becomes worse. Corners are
points of infinite curvature... so you can see where this is going.
Clipping away the outside of a box can be done by clipping with each
of the six planes in sequence. Clipping away the inside of a box
cannot be done in this way.
- David
> Alternatively, If as a preprocessing step I clip my scene e.g. with a
> sphere, then I will get open surfaces ..... that will affect
> vtkClipClosedSurface, right?
>
> just the first thoughts ...
>
> let me know if you come out with some idea
>
> thanks again,
> sebastian
>
>
>
> On 6/15/2012 7:16 PM, David Gobbi wrote:
>>
>> Hi Sebastien,
>>
>> It's not possible to limit the plane size with vtkClipClosedSurface.
>> The planes are always infinite in extent. Adding more clipping
>> planes will always clip away more of the data, never less.
>>
>> - David
>>
>>
>> On Fri, Jun 15, 2012 at 4:10 PM, sebastian ordas
>> <sebastian.ordas at gmail.com> wrote:
>>>
>>> Dear all,
>>>
>>> I'm successfully using vtkClipClosedSurface in an application for slicing
>>> a
>>> set of perfectly closed meshes.
>>>
>>> Now I would like to cut through my scene with a finite plane or somehow
>>> restrict the slicing extension to a given extent
>>>
>>> My target application is an ultrasound simulator. I would like to avoid
>>> slicing through the complete scene (i.e all organs in my scene) but
>>> within
>>> the US image plane only
>>>
>>> I´m trying to combine several planes in vtkClipClosedSurface, but I´m not
>>> getting the pretended results
>>>
>>> Any hint will help
>>>
>>> many thanks
>>> sebastian
More information about the vtkusers
mailing list