Scripting Pixel Size?

Is there any way to set an image’s pixel size with a script? If not, are there any pre-processing workarounds that I can implement such that the pixel size is automatically recognized by QuPath when I import the image?
Thanks in advance.

Yes

setPixelSizeMicrons(0.64, 0.64)

Obviously you need to change 0.64 for the appropriate pixel scaling for your image.

4 Likes

Thank you! I was scared about this because it’s not automatically populated in the workflow… glad it’s so easy!
:slight_smile:

1 Like

QuPath should already do this, but it depends upon the file format and whether the image reader QuPath is using is able to get the pixel size (generally the reader will be one of Bio-Formats, ImageJ or OpenSlide).

2 Likes