Hi Paulo,
I just wanted to let you know that I solved my problem. Here’s my workflow:
- Extract points to clip along (I’ll call it crossline).
- Extract points from largest edge (i.e., perimeter of mask).
- Determine nearest neighbours from crossline to perimeter.
- Create closed loop bound by crossline and perimeter and convert to polydata.
- Use
vtkSelectPolyData
thenvtkClipPolyData
to clip mask along loop.
The image shows the clipped mask in green, the perimiter in white, and the closed loop for clipping in red.
Thanks for discussing and helping me improve my understanding!
Positively,
Matthew