Export tiles and anotations inside specific ROI

I have some WSI that are anotated like the following image:

I am using the TileExporter script to create pairs of images like explained here specifying my addLabel, tileSize and downsample and annotatedTilesOnly(true) without issues. It works great.

However, I would like to generate tile and label images only from the regions inside the square annotations (class None). Is there any way to do this? Should I do something like
def regions_of_int= getAnnotationObjects().findAll{it.getPathClass()==getPathClass("None")} at the beginning of the script?

Thanks!

I’m not certain if you need the TileExporter, or just the regular way of writing an image corresponding to specific annotations
https://qupath.readthedocs.io/en/latest/docs/advanced/exporting_annotations.html#individual-annotations

In any case, the line you mention should probably be

def regions_of_int= getAnnotationObjects().findAll { it.getPathClass()==null }

See also this:

1 Like