I’m running analyses in qupath and I have made some annotations I would like to intersect from the script editor.
Say I have two annotations “Annotation 1” and “Annotation 2” that partially overlap and I want to intersect them. They are both from the same class.
From the GUI it’s easy, I select right click > edit multiple > intersect selected
However, I would like to do this from script as I have to run this in ~200 images.
I found this example from Pete: https://petebankhead.github.io/qupath/scripts/2018/08/08/three-regions.html
where I found
%annotationobject1%.intersect(%annotationobject2%) should do it.
However I do not know how I can “Get” each annotation object purely based on the annotation name (I did find a script to get by class), and I cannot find that online.
Also when I do it manually I cannot find it in the workflow to copy it from there…
Do you have any suggestions?
Thanks so much in advance,