[vtkusers] vtkBooleanOperationPolyDataFilter

Cory Quammen cory.quammen at kitware.com
Fri Mar 2 14:03:41 EST 2018


On Fri, Mar 2, 2018 at 1:39 PM, Polly Pui <polly_sukting at hotmail.com> wrote:

> Hi Cory,
>
> Thanks for your reply.
>
> I extracted the result in red image by using the vtkthreshold
> (ThresholdByLower=0.085).
>
> I tried to invert the extraction by using ThresholdByUpper=0.015, but the
> result weren't what i wanted.
>
> The red image with white holes (the removed areas are what i wanted). The
> blue area is extracted using the inverted value of threshold.
>

I think calling vtkThreshold::AllScalarsOff() should fix it.



>
> I cant really understand what do you mean by boolean operations cant work
> on this case.
>
> Are we not able to obtain the areas using "difference" operation?
>

You are right in principle that a boolean operation should be able to do
this. In practice, however, the existing boolean operations filter makes
some assumptions about the input data, namely that each input geometry
defines an enclosed volume and that no two intersecting polygons in the
input geometries are coplanar. The output of the filter is a new surface
that encloses the union, difference, or intersection of the volumes
enclosed by the input geometries. This test case violates both assumptions,
hence it won't work.

Best,
Cory




> Best,
> Polly
> ------------------------------
> *From:* Cory Quammen <cory.quammen at kitware.com>
> *Sent:* Thursday, March 1, 2018 9:01 PM
> *To:* Polly Pui
> *Cc:* vtkusers at vtk.org
> *Subject:* Re: [vtkusers] vtkBooleanOperationPolyDataFilter
>
>
>
> On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui <polly_sukting at hotmail.com>
> wrote:
>
> Hi,
>
> I would like to obtain the areas which are removed in 'Red Image'.
>
> Couldn't you invert the threshold operation to produce those areas instead
> of the red surface?
>
> Green image is original data and Red image is the thresholded data.
>
> I applied "union operation" in order to get the areas. I used the code
> given in https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/Boolea
> nOperationPolyDataFilter
>
> The boolean operation filter won't work in this case because it does not
> handle boolean operations on overlapping surfaces.
>
> HTH,
> Cory
>
> But the areas that I wanted couldn't be shown completely in grey image.
> The polygons are not connected.
>
> Any suggestion on how can I improve this?
>
>
>
> Thanks.
>
> Best,
>
> Polly
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
> vtkusers Info Page - VTK - The Visualization Toolkit
> <https://vtk.org/mailman/listinfo/vtkusers>
> vtk.org
> To see the collection of prior postings to the list, visit the vtkusers
> Archives. Using vtkusers: To post a message to all the list members, send
> ...
>
>
>
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/2561e84b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boolean.jpg
Type: image/jpeg
Size: 29351 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/2561e84b/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: above_below.jpg
Type: image/jpeg
Size: 68707 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/2561e84b/attachment-0001.jpg>


More information about the vtkusers mailing list