Export Live Pixel Classifier Prediction as Image

Whenever I use the pixel classifier, I just report the class area numbers for each annotation given by the live prediction. I rarely use the “Create objects” button, because then it deletes all of my annotations and I can’t change things afterwards.

I’d like to export images of the classified regions to demonstrate what was considered positive and negative. This would ideally be something like https://petebankhead.github.io/qupath/scripting/2018/03/13/script-export-import-binary-masks.html, but showing the live prediction output. I’d like it to look something like this, but as a real tiff, not a screen shot:


Any idea how to do this?


It isn’t really what you wanted, but ya’ll were using some annotation saving/loading scripts that were pretty nice, and you should be able to run two scripts, one to save, and one to delete all and reload the saved annotations to run on either side of using the pixel classifier to generate annotations. As long as you aren’t splitting the annotations, hopefully it won’t be too slow. Though definitely slower than what you want.

At least until someone comes up with something better… :slight_smile: For now I only have got the main viewer screenshot set at a fixed magnification.

Does the ‘Show’ button beside the ‘Output’ option do what you want? It’s like a ‘Send region to ImageJ’ but for the classification result.

1 Like

Nice, you can even pick the resolution based on the… well, resolution.

Side note, if you happen to have something selected, that works less well :slight_smile:

And wow, I hadn’t played with the ANN much until now, but that performs fantastically better in some situations!

What do you mean…?

In general it should work with selected annotations (size might be an issue), and should be able to output both classifications and probabilities (although the latter might require using the Channels Tool in ImageJ to overcome with the awkward application of lookup tables).

It just sounded like she was interested in the whole area. When I had an object selected it seemed to be bounding to just that object. Which is probably as intended, but confusing to me when I first clicked show with something selected and didn’t get the whole image.

Ah ok, sounds like it is working as intended then.

Ability to write OME-TIFFs of the full classification to come… maybe.

Thank you! I had somehow missed that button. It gives me an error when I try for the entire image (probably too big), but it works for selected annotations.