QuPath: Move while drawing Polygon

Dear All,

We want use QuPath 0.2 m8 to draw (any classify) many polygons that mark airways in lungs.

Airways are rather big and the border of the line must delineate exactly the position of the first cell layer.

Thus, we zoom in a lot & need to move the image while drawing the polygon.

However, when we do so an uncontrolled jump in the border of the polygon occurs upon moving the image using the arrow keys.

While the brush tool might be used to refine from inside out, the opposite does not work.

We also considered to draw multiple polygons per air-way and fuse them in QuPath but did not succeed.

I anyway do all further processing in Python, thus I could do the fusion there, but a solution inside QuPath would be better.

Or did I just “do it the wrong way”?

Thanks a lot & Kind regards

Tobias

@petebankhead

Was not able to replicate, maybe a video or pictures showing before and after would help.

Drew several annotations at 350X+ magnification on tissue sections in brightfield and saw no jumps when using the arrow keys to navigate or mousewheel to zoom. NDPI files, 0.2.0M8.

Might want to try turning off pixel snapping to see if that resolves the issue:
image

Without sample images, I’m not clear on why manual annotations are preferred to automation if you are looking for, essentially, whitespace.


Thanks a lot!

I tried to turn off pixel snapping.
However the issue persists for the polygon tool.

We want certain airways & and exactly the center of the first cell layer.
The exact position of the line is not easy to teach to humans, thus
any ML approach would either not work or not be worth the effort in this case.

I made a .webm video (which plays in the browser) with a very imprecise line drawing just to illustrate the movement issue. To be allowed to upload it i had to rename it to .webp. You might have to download and rename again. (Sorry)

move_bug_qupath.webp (2.6 MB)

Thanks again & Kind regards

Tobias

1 Like

Hi Tobias, a few comments/options:

  • You can use the Brush/Wand tools to ‘subtract’ the ‘bad bits’ - just hold down the alt key and draw from outside (the annotations needs to be selected)
  • The Polygon tool can operate either with click & drag (like in your video) or with multiple clicks (+ a double-click to end).
    • If you start drawing with click & drag* then when you release the mouse the annotation is completed.
    • If you start drawing with a single click* then you can click to add more points, click and drag for part of the drawing after that, so long as you double-click to end. Basically, this means you could release the mouse when using the arrow keys to avoid creating the erroneous points - I think this is the approach you need.
  • You can also zoom out & in while drawing, which can be combined with the last option to adjust the field of view without using the arrow keys
  • If you are using a Mac with a magic mouse/trackpad (only) you can turn off the scroll gestures preference and navigate by swiping (I don’t think this works with any other OS)
  • You could also try creating the same annotation using the Wand tool at a low(ish) magnification.
2 Likes

This solves the issue. Thank you so much. I should have know this but I just always used “the other way” to make polygons…

1 Like