New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(filter): Add contour loop extraction filter #3003
Conversation
Co-authored-by: Forrest Li <forrest.li@kitware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 more cosmetic changes. This will be good to go afterwards!
const outLines = output.getLines(); | ||
outLines.resize(0); | ||
|
||
// Optional merging of contours can happen here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop this comment, since it's not implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@floryst Would it be possible for you to re-review this? |
LGTM! Thanks! |
🎉 This PR is included in version 29.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Context
contourLoopExtraction
code, I am just providing an example, as well as typing and submitting a pull request.This PR introduces the
vtkContourLoopExtraction
filter, which is designed to extract closed loop contours from the output of the vtkPolyData.Unlike tools like
vtkCutter
, which lack sufficient clustering information about the cuts,vtkContourLoopExtraction
efficiently traverses the points to identify loops.Results
I've included an example that demonstrates this amazing feature. In this particular example, we obtain the output of the
vtkCutter
and then pass it to thevtkContourLoopExtraction
. Finally, we generate separate polyData for each individual contour, with each contour having its own unique color.vtk.mp4
Changes
PR and Code Checklist
npm run reformat
to have correctly formatted codeTesting