KitwareMedical / KitwareMedical/SlicerVirtualReality
Improve usability of transform node attributes
- Dominant language
- C++
- Stars
- 137
- Forks
- 62
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 8
Description
_Issue description based on suggestions originally posted by @lassoan in https://github.com/KitwareMedical/SlicerVirtualReality/issues/147#issuecomment-1870367411_
## Is your feature request related to a problem? Please describe.
Using the current API[^1], it is challenging to find out which devices are active or not. First, the user would have to know what device types are possible and then do trial-and-error to find an attribute that can tell if the status is valid.
The attributes may also be contradicting (if you have both HMD and Controller status attributes then which ones should be used?).
## Describe the solution you'd like
* Remove use of `PoseValid`, `PoseStatus`, `Active` and `Connected` attributes
* Use attribute `VirtualReality.DeviceType` for devices categorized as "HMD," "Controller" or "Tracker".
* Use attribute `VirtualReality.DeviceActive` attribute to indicate the validity of the transform for all device types.
Consider also adding _transform status_ support directly into Slicer and have it become a first-class property of transform nodes (instead of note attribute):
* It would be used in `SlicerIGT` extensively
* Also useful to temporarily disable a transform to quickly see the transformed nodes with/without the transformation in effect.
* Transformable display node could also use the information to be represented differently:
* if invalid status: node appear more transparent and/or different color, or use identity as transform; or ignore transform status for display.
## Historical Notes
* Attributes `VirtualReality.PoseValid` and `VirtualReality.PoseStatus` originally introduced in 3f12e857f5e4f06ee84961772efe1212df0d3305 (`ENH: Adding additional information to VR transforms for pose status`)
* Attributes `VirtualReality.HMDActive` introduced in 5848c8cd51847bd676f8a06dd8dc7991a21bedc4 (`Resolves #36. Exposes HMD pose to Slicer as a singleton transform named "VirtualReality.HMD"`)
* Attributes `VirtualReality.ControllerActive` and `VirtualReality.ControllerConnected` introduced in 7aaf98c2f8e24a30d28077cf5e4438fac4ac325b (`Adding population of controller transforms (#29)`)
* Logic refactored (while keep the same attributes) through https://github.com/KitwareMedical/SlicerVirtualReality/pull/147
## Related
* #147
* #29
* #36
Contributor guide
No contributing guide indexed for this repository
Research direction
Review PR #147 and the historical commits cited in this issue to understand how the current transform-node attributes are populated. Define the replacement behavior around VirtualReality.DeviceType and VirtualReality.DeviceActive, and confirm that obsolete status and device-specific attributes are no longer used; the broader first-class transform-status proposal remains a separate design question.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100