-
Notifications
You must be signed in to change notification settings - Fork 514
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
Improve interaction handles #7570
Comments
Does this apply to translation as well? Out of plane translation is also often difficult to understand in slice views. |
Good point, yes, it applies to the translation handles as well. I find the white dot in the middle much easier to use. All these do not mean that translation and rotation around parent coordinate system axes is not needed, it is actually very important (e.g., for device placement, to translate and rotate around device axes), it is just a different use case. |
The visibility of individual interaction axes can now be controlled separately for transform nodes. Default 3D visibility: - Translation: X, Y, Z, View - Rotation: X, Y, Z - Scaling: None Default 2D visibility: - Translation: View - Rotation: View - Scaling: None vtkMRMLTransformDisplayNode: - EditorVisibility3D and EditorSliceIntersectionVisibility control the visibility in their respective views, while EditorVisibility controls visibility in both. - Editor{XYZ}Enabled now only works for 3D while Editor{XYZ}SliceEnabled has been added to control 2D view visibility. - {XYZ}HandleComponentVisibility3D allows individual axes to be enabled disabled in 3D, while {XYZ}HandleComponentVisibilitySlice does the same in 2D. qSlicerSubjectHierarchyTransformsPlugin: - "Interaction in 3D view" is now "Interaction", and controls visibility in both views. Re Slicer#7570
We currently use Red/Green/Blue for the axes colors since that is what is used in other 3D software, but @pieper brought up an interesting suggestion during the project week. What if we used Yellow/Green/Red for the default axis colors to match the Coronal/Sagittal/Axial views? |
The visibility of individual interaction axes can now be controlled separately for transform nodes. Default 3D visibility: - Translation: X, Y, Z, View - Rotation: X, Y, Z - Scaling: None Default 2D visibility: - Translation: View - Rotation: View - Scaling: None vtkMRMLTransformDisplayNode: - EditorVisibility3D and EditorSliceIntersectionVisibility control the visibility in their respective views, while EditorVisibility controls visibility in both. - Editor{XYZ}Enabled now only works for 3D while Editor{XYZ}SliceEnabled has been added to control 2D view visibility. - {XYZ}HandleComponentVisibility3D allows individual axes to be enabled disabled in 3D, while {XYZ}HandleComponentVisibilitySlice does the same in 2D. qSlicerSubjectHierarchyTransformsPlugin: - "Interaction in 3D view" is now "Interaction", and controls visibility in both views. Re Slicer#7570
The visibility of individual interaction axes can now be controlled separately for transform nodes. Default 3D visibility: - Translation: X, Y, Z, View - Rotation: X, Y, Z - Scaling: None Default 2D visibility: - Translation: View - Rotation: View - Scaling: None vtkMRMLTransformDisplayNode: - EditorVisibility3D and EditorSliceIntersectionVisibility control the visibility in their respective views, while EditorVisibility controls visibility in both. - Editor{XYZ}Enabled now only works for 3D while Editor{XYZ}SliceEnabled has been added to control 2D view visibility. - {XYZ}HandleComponentVisibility3D allows individual axes to be enabled disabled in 3D, while {XYZ}HandleComponentVisibilitySlice does the same in 2D. qSlicerSubjectHierarchyTransformsPlugin: - "Interaction in 3D view" is now "Interaction", and controls visibility in both views. Re Slicer#7570
The visibility of individual interaction axes can now be controlled separately for transform nodes. Default 3D visibility: - Translation: X, Y, Z, View - Rotation: X, Y, Z - Scaling: None Default 2D visibility: - Translation: View - Rotation: View - Scaling: None vtkMRMLTransformDisplayNode: - EditorVisibility3D and EditorSliceIntersectionVisibility control the visibility in their respective views, while EditorVisibility controls visibility in both. - Editor{XYZ}Enabled now only works for 3D while Editor{XYZ}SliceEnabled has been added to control 2D view visibility. - {XYZ}HandleComponentVisibility3D allows individual axes to be enabled disabled in 3D, while {XYZ}HandleComponentVisibilitySlice does the same in 2D. qSlicerSubjectHierarchyTransformsPlugin: - "Interaction in 3D view" is now "Interaction", and controls visibility in both views. Re Slicer#7570
The visibility of individual interaction axes can now be controlled separately for transform nodes. Default 3D visibility: - Translation: X, Y, Z, View - Rotation: X, Y, Z - Scaling: None Default 2D visibility: - Translation: View - Rotation: View - Scaling: None vtkMRMLTransformDisplayNode: - EditorVisibility3D and EditorSliceIntersectionVisibility control the visibility in their respective views, while EditorVisibility controls visibility in both. - Editor{XYZ}Enabled now only works for 3D while Editor{XYZ}SliceEnabled has been added to control 2D view visibility. - {XYZ}HandleComponentVisibility3D allows individual axes to be enabled disabled in 3D, while {XYZ}HandleComponentVisibilitySlice does the same in 2D. qSlicerSubjectHierarchyTransformsPlugin: - "Interaction in 3D view" is now "Interaction", and controls visibility in both views. Re Slicer#7570
@Sunderlandkyl I have a linear transform applied to a volume, and if I activate the interaction handles, the center of transformation does not correspond to the center of the volume (I noticed that the center can be changed also interactively, alt + left click). Would it make sense to calculate the default center on the boundingbox of all the nodes for which the transform is applied? |
Compiling on my ubuntu: I get a lot of OpenGL errors from the handles. I don't get the errors in this other setup: have you experienced any similar issue? |
Since transforms can be applied to multiple nodes this may not be well defined. Instead, maybe there could be a context menu that lists a set of possible options for centers of rotation, such as the centers of any nodes to which the transform is applied (or not), the center of all transforms, the world space origin, control points of any markups, centers of markups, etc. Potentially the center could interactively snap to these candidates as it is dragged, like a lot of drawing tools do these days. |
No, I haven't seen this issue before. Do you think it's related to debug vs release on Linux?
This is not done automatically for a pre-existing transform nodes, however if you right-click on an untransformed node in the SH and enabling interaction the new transform should have its center of rotation adjusted to match the center of the transformed node's bounds.
This should be relatively easy to implement. I will add it to the list up above. |
I hadn't too much time to investigate. I will try to have soon both a debug and release buils on ubuntu 23.10 and I will let you know.
not sure I follow. I don't see the option in the right click menu for the volume. I am on slicer5.7.0-2024-02-13
nice! |
Sorry, right clicking in the visibility column. Should be "Interaction in 3D view", but it will be re-named "Interaction" in #7586. |
I confirm the OpenGL errors show up only in debug mode. Ubuntu 23.10 |
The visibility of individual interaction axes can now be controlled separately for transform nodes. Default 3D visibility: - Translation: X, Y, Z, View - Rotation: X, Y, Z - Scaling: None Default 2D visibility: - Translation: View - Rotation: View - Scaling: None vtkMRMLTransformDisplayNode: - EditorVisibility3D and EditorSliceIntersectionVisibility control the visibility in their respective views, while EditorVisibility controls visibility in both. - Editor{XYZ}Enabled now only works for 3D while Editor{XYZ}SliceEnabled has been added to control 2D view visibility. - {XYZ}HandleComponentVisibility3D allows individual axes to be enabled disabled in 3D, while {XYZ}HandleComponentVisibilitySlice does the same in 2D. qSlicerSubjectHierarchyTransformsPlugin: - "Interaction in 3D view" is now "Interaction", and controls visibility in both views. Re #7570
I saw a lot of OpenGL errors on Windows, too, in debug mode (VTK does not do OpenGL checks in Release mode). Here are the messages: https://pastebin.com/Ud8DbkaZ It may be related to the VTK fixes that had to be done for shadow support, which changes how the Z and color buffers are cleared. |
I have also experienced that sometimes the rendering of the interaction handles is bugged on the 2D views (probably because of the OpenGL errors). For example the rendering of the handles is visible in the 2D views even if interactions are disabled and viceversa (rendering not showing if interactions are on). The behaviour is very random and very difficult to reproduce. This at least on my linux build in debug. I will test the binaries from 3D slicer website and I will let you know |
in release mode from the slicer website does not seems to happen. I could only reproduce this (not a big issue, just wanted to report it):
|
but they do happen both in release and debug mode on this build Ubuntu 23.10 |
Refactor and combine both 2D and 3D displayable managers for linear transform nodes into a single class. Since both 2D and 3D displayable managers are now generating the exact same interaction widget, they ended up sharing all of the same code. To avoid duplication and to reduce maintenance, this commit combines the two displayable managers into a single class. Re Slicer#7570
I've refactored the displayable manager. I think this issue should be fixed by: #7590. |
Refactor and combine both 2D and 3D displayable managers for linear transform nodes into a single class. Since both 2D and 3D displayable managers are now generating the exact same interaction widget, they ended up sharing all of the same code. To avoid duplication and to reduce maintenance, this commit combines the two displayable managers into a single class. Re #7570
This commit enables the jump to handle action when left-clicking on an interaction handle. For Transform nodes: - Jump is only available when clicking on the center of transformation. For Markups nodes: - Jump is available for any handle type. Re Slicer#7570
This commit enables the jump to handle action when left-clicking on an interaction handle. For Transform nodes: - Jump is only available when clicking on the center of transformation. For Markups nodes: - Jump is available for any handle type. Re Slicer#7570
Good catch, looks like the current slider is linked to glyph size instead.
True, I think it makes sense to add one to Transforms as well.
Since last Thursday (b2be7c3) interactions can be controlled separately on 3D and 2D views: Default behavior is that only 2D interactions are shown in 2D views: In C++/Python The visibility of individual components are controlled through: |
Hi Kyle, thanks a lot for the exhaustive answer! I'll update again check out the new slice rotation option then. I guess we can add the first two items to the long list on top. Those are quite small issues anyway. Thank you very much for working on this, this is an awesome feature! |
…idget New SH actions for resetting the center of transformation for a transform: - Reset to local origin - Reset to world origin - Reset to center of bounds for all transformed nodes - Reset to center of bounds for a single transformed node Transforms module widget: - New widget for live display and editing of center of transformation - New slider for changing scale of interaction widget Bug fixes: - Use correct scale for markups interaction handles - Fix both 2D and 3D visibility being controlled by GetEditorSliceIntersectionVisibility Re Slicer#7570
…idget New SH actions for resetting the center of transformation for a transform: - Reset to local origin - Reset to world origin - Reset to center of bounds for all transformed nodes - Reset to center of bounds for a single transformed node Transforms module widget: - New widget for live display and editing of center of transformation - New slider for changing scale of interaction widget Bug fixes: - Use correct scale for markups interaction handles - Fix both 2D and 3D visibility being controlled by GetEditorSliceIntersectionVisibility Re Slicer#7570
This commit adds a cancel action when translating/rotating/scaling using interaction handles. Users can press "Escape" or right-click to cancel the current action and restore the Transform or Markups node back to its original state. Re Slicer#7570
This commit adds a cancel action when translating/rotating/scaling using interaction handles. Users can press "Escape" or right-click to cancel the current action and restore the Transform or Markups node back to its original state. Re Slicer#7570
This commit adds a cancel action when translating/rotating/scaling using interaction handles. Users can press "Escape" or right-click to cancel the current action and restore the Transform or Markups node back to its original state. Re #7570
…idget New SH actions for resetting the center of transformation for a transform: - Reset to local origin - Reset to world origin - Reset to center of bounds for all transformed nodes - Reset to center of bounds for a single transformed node Transforms module widget: - New widget for live display and editing of center of transformation (in local or world coordinates) - New slider for changing scale of interaction widget - Transform rotation sliders now rotate around the center of transformation Bug fixes: - Use correct scale for markups interaction handles - Fix both 2D and 3D visibility being controlled by GetEditorSliceIntersectionVisibility Re Slicer#7570
…idget New SH actions for resetting the center of transformation for a transform: - Reset to local origin - Reset to world origin - Reset to center of bounds for all transformed nodes - Reset to center of bounds for a single transformed node Transforms module widget: - New widget for live display and editing of center of transformation (in local or world coordinates) - New slider for changing scale of interaction widget - Transform rotation sliders now rotate around the center of transformation Bug fixes: - Use correct scale for markups interaction handles - Fix both 2D and 3D visibility being controlled by GetEditorSliceIntersectionVisibility Re Slicer#7570
…idget New SH actions for resetting the center of transformation for a transform: - Reset to local origin - Reset to world origin - Reset to center of bounds for all transformed nodes - Reset to center of bounds for a single transformed node Transforms module widget: - New widget for live display and editing of center of transformation (in local or world coordinates) - New slider for changing scale of interaction widget - Transform rotation sliders now rotate around the center of transformation Bug fixes: - Use correct scale for markups interaction handles - Fix both 2D and 3D visibility being controlled by GetEditorSliceIntersectionVisibility Re Slicer#7570
Improve and re-enable visibility of transform interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet, though the handles hand can be highlighted using the controllers. Re Slicer#7570
Improve and re-enable visibility of transform interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet, though the handles hand can be highlighted using the controllers. Re Slicer#7570
…idget New SH actions for resetting the center of transformation for a transform: - Reset to local origin - Reset to world origin - Reset to center of bounds for all transformed nodes - Reset to center of bounds for a single transformed node Transforms module widget: - New widget for live display and editing of center of transformation (in local or world coordinates) - New slider for changing scale of interaction widget - Transform rotation sliders now rotate around the center of transformation Bug fixes: - Use correct scale for markups interaction handles - Fix both 2D and 3D visibility being controlled by GetEditorSliceIntersectionVisibility Re #7570
Improve and re-enable visibility of transform interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet. Re Slicer#7570
Improve and re-enable visibility of transform interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet. Re Slicer#7570 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Improve and re-enable visibility of transform interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet. Re Slicer#7570 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Improve and re-enable visibility of transform interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet. Re Slicer#7570 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Improve and re-enable visibility of transform and markups interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet. Re Slicer#7570 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Improve and re-enable visibility of transform and markups interaction widgets in VR. Visualization of interaction widgets works for both absolute and relative widget size. Interacting with the widgets is not implemented yet. Re #7570 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
…bility Adds the subject hierarchy menu "Interaction options" for enabling/disabling transform handle types (Rotation/Translation/Scaling), and adds all of the interaction options to the view context menu. This commit also fixes an issue where markups interaction handles could not be enabled/disabled correctly, and scale handles could be shown for unsupported markups types. Re Slicer#7570
…bility Adds the subject hierarchy menu "Interaction options" for enabling/disabling transform handle types (Rotation/Translation/Scaling), and adds all of the interaction options to the view context menu. This commit also fixes several issues where markups interaction handles could not be enabled/disabled correctly, scale handles could be shown for unsupported markups types, and markups widget scale was not correctly updated. Re Slicer#7570
…bility Adds the subject hierarchy menu "Interaction options" for enabling/disabling transform handle types (Rotation/Translation/Scaling), and adds all of the interaction options to the view context menu. This commit also fixes several issues where markups interaction handles could not be enabled/disabled correctly, scale handles could be shown for unsupported markups types, and markups widget scale was not correctly updated. Re Slicer#7570
…bility Adds the subject hierarchy menu "Interaction options" for enabling/disabling transform handle types (Rotation/Translation/Scaling), and adds all of the interaction options to the view context menu. This commit also fixes several issues where markups interaction handles could not be enabled/disabled correctly, and scale handles could be shown for unsupported markups types. Re Slicer#7570
…bility Adds the subject hierarchy menu "Interaction options" for enabling/disabling transform handle types (Rotation/Translation/Scaling), and adds all of the interaction options to the view context menu. This commit also fixes several issues where markups interaction handles could not be enabled/disabled correctly, and scale handles could be shown for unsupported markups types. Re Slicer#7570
…bility Adds the subject hierarchy menu "Interaction options" for enabling/disabling transform handle types (Rotation/Translation/Scaling), and adds all of the interaction options to the view context menu. This commit also fixes several issues where markups interaction handles could not be enabled/disabled correctly, and scale handles could be shown for unsupported markups types. Re #7570
Summary
The new interaction handles are awesome. Here are a few tweaks that would make them even better:
Environment
The text was updated successfully, but these errors were encountered: