[vtkusers] vtkBooleanOperationPolyDataFilter

Polly Pui polly_sukting at hotmail.com
Sun Mar 4 22:49:06 EST 2018


Hi Cory,

Thanks for your reply.

I could get those regions by calling AllScalarsOff correctly now.

Thank you!


Best,
Polly


________________________________
From: Cory Quammen <cory.quammen at kitware.com>
Sent: Saturday, March 3, 2018 3:03 AM
To: Polly Pui
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter



On Fri, Mar 2, 2018 at 1:39 PM, Polly Pui <polly_sukting at hotmail.com<mailto: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.



[cid:f7c26712-986e-4e9b-9c1f-0174777617ab]
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<mailto:cory.quammen at kitware.com>>
Sent: Thursday, March 1, 2018 9:01 PM
To: Polly Pui
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter



On Thu, Mar 1, 2018 at 1:01 AM, Polly Pui <polly_sukting at hotmail.com<mailto: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/BooleanOperationPolyDataFilter

VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter<https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter>
www.vtk.org
Download and Build BooleanOperationPolyDataFilter. Click here to download BooleanOperationPolyDataFilter. and its CMakeLists.txt file. Once the tarball ...



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?

[cid:447fa535-f257-4dc6-b3fc-6e3077cf35dd]


Thanks.


Best,

Polly

_______________________________________________
Powered by www.kitware.com<http://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

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<http://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/20180305/535488aa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boolean.jpg
Type: image/jpeg
Size: 29351 bytes
Desc: boolean.jpg
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180305/535488aa/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: above_below.jpg
Type: image/jpeg
Size: 68707 bytes
Desc: above_below.jpg
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180305/535488aa/attachment-0003.jpg>


More information about the vtkusers mailing list