This did it!! So far I am having success with the vtkTableBasedClipDataSet
filter and using it the same way as I would a vtkClipDataSet
filter. Thanks for your input, @Vincent_Rivola!
vtkTableBasedClipDataSet
provides exactly what I want! Preserved cells where the clip doesn’t happen and intersection polygons along the implicit clip function:
One last lingering question…
Is there any advantage to using vtkClipVolume
over vtkTableBasedClipDataSet
for vtkImageData
? From my perspective it looks like I always want to use the vtkTableBasedClipDataSet
filter because it will preserve the cells in the image data while vtkClipVolume
triangulates the volume.
Use of vtkClipVolume
with vtkImageData
(plane clip):
Use of vtkTableBasedClipDataSet
with the same dataset and clip function. Note that there are no triangulated cells which is likely preferred when working with vtkImageData
:
Bane,
As you discovered, looks like TableBasedClipDataSet is the way to go. I ran it on the data you provided and got this result.
BTW: Can I use your dataset in the VTKExamples Project?
That should be fine!
Also, any input on this new thread which is highly related would be greatly appreciated!: Box clip with vtkTableBasedClipDataSet and sharp edges? - #2 by banesullivan
I’ve added two nex examples to the VTKExamples Project. They illustrate the difference between vtkTableBasedClipDataSet and vtkClipDataSet.
The former is faster and produces many fewer cells because it retains the original cells outside the clip boundary. See the difference in these images:
If you have been using vtkClipDataSet you may wish to switch to vtkTableBasedClipDataSet.
Thanks to Bane Sullivan for bringing up the original problem and for helping to track down a solution.
Also, he provided a great unstructured grid test dataset.