Use a pen directly on the screen to make annotations in QuPath?

Hi everyone, I want to annotate epithelial structures in 3-400 histopathology slides (biopsies from inflamed colon), each with 20-50 glandular structures, and additionally surface epithelium. Is it possible to do this with a pen (a wacom pen) ?

Hi @elisyn,

Yes should be able to, with the help of JPen! It’s been tested on Wacom tablets so hopefully this should work for you without problem. See the docs for more info :slight_smile:

1 Like

I am looking for a laptop/tablet that I can use the pen to draw my annotations that does not break the bank. I am a research faculty with limited fundings. Any words of wisdom? Just the Wacom pens work, or I can buy a regular touchscreen laptop with a digital pen and use it.

Thank you so much


QuPath is using an open source library called ‘JPen’ for this to work, but the library doesn’t seem to be maintained / updated any more – so I’m not sure what exactly it is compatible with.

I’ve only ever tried it with Wacom pens. These work for me, although the only specific thing it adds is pressure-sensitivity for the brush or wand – it shouldn’t make a difference for other tools.

In practice, I find that I still prefer a mouse though… since I can zoom in/out according to the level of detail I want to annotate, and I often find it more precise than using a pen.


Hi Lilian,
I tried different pens on a touch screen laptop from DELL, but it didn’t work.
I prefer the wacom cintiq screen with the wacom pen, although I still have to use the mouse to zoom in and out (i try to use my left hand for the zooming, but it is not that easy).
May I ask what kind of annotations you are making? I like using the digital pen because then I have the sceen almost flat on the table in front of me so I get more close to the tissue, but I have many small detailed annotations. If I had only solid tumor tissue I think that using the mouse is just as good as the digital pen.

1 Like

I have used QuPath with a XP-Pen Deco 03 wireless drawing tablet . Although, I would recommend connecting it via USB due to lag over wireless . IIRC, pressure-sensitivity is also possible in QuPath thanks to JPen.

1 Like

Thank you so much.
I think I will keep doing with the mouse then. I am trying to measure the area of the vascular spaces of the villous placenta, and I am having a hard time including the red cells and not the tissue surrounding them. There is not much contrast, and I am still figuring out how to do it.



1 Like

Thank you so much Peter.
I think the mouse is still my best choice.



The wand tool takes into account the colors displayed on screen, so if you can find a color vector that only shows up in your tissue, that will make things easier. RBCs frequently show up everywhere, though, so that may not work as well as “Fill Holes” in the annotation menu, if you are dealing with isolated RBCs.

You might be able to use some of the texture features to find both empty pixels (pixel classifier) and RBC pixels, and then merge the two at a later step automatically.

@lijoli You can use the brightness/contrast tool to transform the image is various ways, and if you find a way that makes your different regions appear with better contrast then the wand should do a better job.


(Similar to what @Research_Associate said, but in different words – and it doesn’t necessarily need to involve stain vectors)