Exporting images with same size

Hi,

I am pretty new to QuPath and I feel what I need should be available, however, I can’t find it yet.

In my project, we do whole slide imaging and then I get back pictures, with different sizes from tissues with ofcourse also different sizes. What I need to generate at first, before starting any analysis, is to make pictures, where the same scaling factor is used in order to make an overview of all the different tissues on one (I know…) PowerPoint presentation.

This would mean, that a smaller tumor, will look small compared to a bigger tumor, but the cells in the tumor are still the same size on the picture. If possible, it would be great to also be able to include the scalebar in this.

For now I am opening every picture, adjusting the scaling and then export the viewer window. But feels like there should be a better way to do this.

I am very unexperienced with ImageJ, so unless with a good explanation, this is no real option for me. I was really hoping that I can start doing all my analysis in one programme (where I am also new in the analysis business).

I already figured out that I can do most of what I want afterwards in this software because then it doesn’t really matter what scale the picture is in.

I hope somebody here knows a trick or knows how to do it :slight_smile: Thanks in advance!

The biggest issue I see with this is that any script wouldn’t know how large the largest image was, so wouldn’t be able to automatically pick a size. If you just want to export a downsampled image, you should be able to do that with a variety of scripts scattered around the forum or on Pete’s blog, but which one would depend on both your version of QuPath and potentially the type of image (IF, BF, other).

I don’t do a lot of image exporting, so I can’t really help too much there, other than to say that if you fix the downsample variable in whichever script you chose, you should keep the same relative image size.

If you do some ImageJ macro writer work, you can also export and save with an ImageJ scale bar.
image
Manually, you can use the above to create small evenly downsampled images in ImageJ, at least.
image
So with those settings I would get an image 25% of the original size. Downsample to taste, bigger numbers make for a smaller image.
Once there, you can do Analyze->Tools->Scale bar just as you would in a stand alone copy of ImageJ.

If you record the ImageJ steps as part of a Macro, you could run that through Extensions->ImageJ->ImageJ macro runner
https://github.com/qupath/qupath/wiki/Working-with-ImageJ

Hi @svanhal, v0.2.0-m9 has just been uploaded today, and with it new documentation. There’s a page on exporting images here: https://qupath.readthedocs.io/en/latest/docs/advanced/exporting_images.html

I would however recommend trying ImageJ at least a bit. QuPath makes it easy to send cropped regions to ImageJ at exactly the same resolution, and then there are a lot of resources online about using ImageJ to create figures (including with scalebars).

1 Like

Thank you both for your ideas. I enrolled myself in a digital ImageJ course. Lets see how far I will get, but all info you gave was already very usefull!

Thanks again :slight_smile:

1 Like