-
Notifications
You must be signed in to change notification settings - Fork 459
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
Hierarchy visibility refactoring #1214
Closed
Closed
Conversation
This file contains 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
7 tasks
ce7c4d1
to
94a0b6a
Compare
If there are no comments, I will integrate this tonight. @jcfr Can you please answer the question I had with one of the tests? It seems you added this test. Thanks!
|
Subject hierarchy (SH) is now used in the Models module to make it more stable and have more features. A mechanism has been in place to keep supporting model hierarchies alongside the SH folders. This commit removes this support, and changes the way visibility is handled by subject hierarchy, and the way display properties are overridden for branches. - Convert model hierarchies to SH folders on scene import - Change SH node visibility functions to only change visibility in the directly or indirectly associated display node, instead of applying the visibility setting on all children individually - Folder items have a directly associated display node after any interaction with display settings of the folder. A new display node type vtkMRMLFolderDisplayNode is added for this - DICOM type hierarchy items (subject, study) now subclass folders, inheriting all its features - Model displayable manager now considers only folders, not model hierarchies. If a folder has apply display properties on branch enabled, then the model uses the display node of the folder for all properties - Visibility of the parent items is always considered (i.e. if a parent is hidden, the branch is hidden, regardless the override settings) - Opacity of the parent items is always considered (i.e. multiply the opacity values of the branch) - Add new event SubjectHierarchyItemReparentedEvent to SH. It is used to update display if models after reparenting (may be dropped under a folder that overrides display properties)
- Remove ModelHierarchy mode from qMRMLTreeView - Remove ModelHierarchyDisplayNodeClassName concept from selection node - Update segmentation import/export from/to model hierarchies to use folders instead where appropriate - Use subject hierarchy combobox instead of MRML node combobox in Import/export section in Segmentations module - Add option to filter for multiple levels in subject hierarchy - Update qMRMLModelDisplayNodeWidget to support folders - Set SH item instead of "ModelOrHierarchyNode" - Use generic display node and only show model display node features if item of model node is set
- Displayable managers that now support overrides: Model 3D+2D, Segmentations 3D+2D - Display nodes have a FolderDisplayOverrideAllowed flag, which determines whether folder nodes can override their display properties. On by default - Instead of the displayable managers handling the folder and subject hierarchy events, this is now managed centrally by the folder display node
The Include Fibers checkbox and the fiber display types tab widget did not work since the switch to using SH tree in the Models module. These features will be re-added as SH plugins.
- Automated python test added for the subject hierarchy folder features: show/hide, color override, hierarchy visibility and opacity, FolderDisplayOverrideAllowed display node flag - Fix vtkSlicerSubjectHierarchyModuleLogicTest automated test - Utility functions added to subject hierarchy node for getting items by name
- Folder visibility and opacity is considered for markups - Add support for folder color override for markups
The widget shows the properties of the first selected model, but if a property is changed, then that one property it is applied to all selected.
d330635
to
4dfb85d
Compare
If there is any issue, I'll be happy to fix it. @jcfr please answer the (btw minor) question about ScenePerformance.py, just so that it's not forgotten. |
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.
The are two main goals of this PR:
This is the related issue: PerkLab/SlicerOpenAnatomy#4
Details:
Questions:
Post-PR tasks (while we discuss the PR and while I fix any occasional things to fix):