Keyboard shortcut for Fill Holes

@petebankhead I was wondering if there was a way to set a custom keyboard shortcut for the Objects-> Annotations → Fill Holes option.

Working on Linux (Ubuntu).

I am currently manually annotating lots of cells, and this would save me time.

Thank you.


Not sure whether it works on Linux, but it seems to at least work on Mac (according to the following post)

1 Like

I was just looking at the default actions here: qupath/ at 43aad4ecda893a7eb03c30774e64da5b9547bc86 · qupath/qupath · GitHub

I don’t see one for fill holes.

But thank you for the suggestion! I didn’t know you could alter the key combinations via a script. I will try and see if I can find out how to access the fill holes menu option.

Hi @chris21, the ‘sidenote’ here gives my method of avoiding the need for custom shortcuts: Setting custom keyboard shortcuts or Wacom tablet key commands - #4 by petebankhead

Also, note that you can select multiple annotations and choose ‘Fill holes’ to process all of them at once.

To select multiple annotations, do one of the following:

  • Click the annotations with the Alt key pressed and the Move tool selected
  • Use the selection mode (S in the toolbar) + a drawing command
  • Run Objects → Select… → Select annotations… to get them all at once

Thank you for the quick reply. I will go with the command list method. That saves me going up to the menu every time.

Generating binary masks for training neural nets to segment cells. So I like to see how each looks before I move onto the next. Usually I draw around the cell body, then fill the annotation.

And good to know it can be run on them all at once. Will do that at the end to make sure I didn’t miss any.

Thanks again.