View Issue Details

IDProjectCategoryView StatusLast Update
0003396Slicer4Module Markupspublic2015-01-06 10:33
ReporterfedorovAssigned Tonicole 
Status assignedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0003396: Keyboard shortcut/popup menu to delete a markup

Currently, can only be deleted via module panel - very limiting. This limitation was specifically highlighted by the clinical user in the prostate project biopsy planning use case.

Steve suggested to do this via popup menu.

TagsNo tags attached.




2015-01-06 10:33

administrator   ~0012839

From email:
I took a quick look at the work I'd done for this before:
The p key to add a fiducial is using a QShortcut defined on the Markups module, the module catches that signal and then simulates a left mouse click on the view widget - the fiducial displayable manager catches that mouse click and if it's in place mode it will create a new fiducial at that point.
For the d key, I can add the short cut but:

  • I get stuck at going from the QVTKWidget to a displayable manager so that I can calculate the RAS coordinate from the widget display coordinate
  • if I simulate a right click, the 2d viewer swallows it for the zoom functionality and my 2d displayable manager never gets the right button release. In 3d I'm using the right click to exit persistent place mode, so I can get it there (though a quick test showed it failing to pass through).
    I had a note in my 3d disp manager:
    // Note: this is currently only implemented in 3D as the right click is used
    // in ctkQImageView
    // for zooming.

So I think we'd have to look at ctkQImageView to have it also pass through the click, or else figure out how to get at the RAS coordinate from the key press (I would then pass it to the markups logic to figure out which fiducial it was over). In general the two possible paths are:
Qt short cut to RAS position to logic to determine which fiducial to delete
Qt short cut to mouse click to displayable manager and use the seed widget to determine which fid to delete.
With the final step of this new process having to be deleting the fiducial at the MRML level so that the displayable managers can update from MRML. So the best case scenario for me would be to be able to go right from a Qt key press short cut to an RAS coordinate.

Issue History

Date Modified Username Field Change
2013-09-15 17:37 fedorov New Issue
2013-09-15 17:37 fedorov Status new => assigned
2013-09-15 17:37 fedorov Assigned To => nicole
2015-01-06 10:33 nicole Note Added: 0012839