[New Component] Addition of new methods based on jira issue number 105 - #2
Open
bouamarakamelia wants to merge 3 commits into
Open
[New Component] Addition of new methods based on jira issue number 105#2bouamarakamelia wants to merge 3 commits into
bouamarakamelia wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Description
Extends
SkeletonGraph/SkeletonReaderwith node-level query methods (parents, children, path from root, subtree) and a new human-readable CSV export, so the skeleton tree can be inspected per-node without needing ParaView or writing custom code.2. Newest features
node(nodeId) : safe lookup by id
m_nodes.nullptrfor an invalid id instead of crashing.parentsOf(nodeId) / childrenOf(nodeId)
node().pathFromRoot(nodeId)
parentIds().front()) back to the root, then reverses the result to get root → ... →nodeId, inclusive.subtree(nodeId)
childrenIds, collecting every node reachable fromnodeId(itself included).exportReportCSV(filename)
id, x, y, z, parentId, childrenIds, pathFromRoot, loopParentIds.parentIdis the single primary (tree) parent for the common case; any extra parent from a loop-closing node is kept in a separateloopParentIdscolumn so nothing is silently dropped.SkeletonReaderas a new output Data field,outputReport.3. Results
exportReportCSVcompiled and run for real against what we have;outputReport="report.csv"on<SkeletonReader/>, no other component or file affected.4. Example of the componenet in the scene (use case)