How do I open an image?#
What will I learn?
How to open an image, quickly
How to pan & zoom
How to check the image properties
Images are composed of pixels (picture elements), and pixels have numeric values.
That’s really the starting point for digital image analysis. The most important insight is that it’s the numbers that are important, and not the colour that is used for their display.
If you want to find out more, there are details in the QuPath docs or Pete’s Introduction to Bioimage Analysis.
Our priority for now is to be able to view our images in QuPath as quickly as possible.
We’ll be seeing colours, but remember: the real data are the numbers.
How to open an image#
What to do
Find the
CMU-1.svsimage downloaded in the setup pageDrag the file onto the main QuPath window
You should see the following window:
Fig. 6 The image type display#
The image type doesn’t really matter if you only want to look at an image, but it will become important later when we want to do analysis.
CMU-1.svs is a brightfield image of tissue stained with haematoxylin and eosin, so select Brightfield H & E.
What to do
Select Brightfield H & E
Click Apply
The image is now open in QuPath!
Fig. 7 CMU-1.svs image opened in QuPath#
Tip
You can also open an image in QuPath with but drag & drop is usually faster.
can be used if your image isn’t a local file. For example, if it’s accessed via OMERO.
How to pan and zoom#
What to do
Make sure that the
button is selected in the toolbar: this is the Move toolClick on the image and drag the mouse to pan
Use the scroll wheel of your mouse — or equivalent scrolling motion on a trackpad — to zoom in or out of the image
Fig. 8 Image zoomed to the top left#
The best way to become used to QuPath’s various ways to pan and zoom around an image is to experiment.
For example, try clicking and dragging on the image, or pressing arrow keys. We hope you find the behaviour quite intuitive.
Question
Navigate so that you are zoomed in to view the top left corner of the image.
Can you figure out three different ways to navigate to look at the bottom right corner, without using ‘click and drag’?
Using a single click
Only scrolling (not clicking anywhere)
Only using the keyboard (not clicking or scrolling)
Question
Zoom-in and hover the cursor over different areas of CMU-1.svs.
How do the numbers in the bottom-right corner of the viewer relate to what is shown on screen?
How to check image properties#
What to do
On the left panel, click on the Image tab.
Look at what information is available in the image properties
Hover your mouse over different rows of the table to see more information
Images don’t only contain pixel values. They usually have some extra properties associated with them.
Fig. 9 CMU-1.svs image properties panel#
QuPath can open images using three popular open-source libraries:
These support different file types from different microscopes or whole slide scanners. There are ways to tell QuPath which to use, but usually you don’t have to – QuPath’s automatic choice should work.
Question
Which library do you think was used to open CMU-1.svs?
Question
Note the Pixel width and Pixel height values under the Image tab.
How can you change them if they are missing or wrong?
Setting the image type (again)#
What to do
Make sure an image is open, then select the Image tab
Double-click the Image type value and change it if necessary
By default, QuPath prompts you to set the type of an image when it is opened. You can also set this value later under the Image tab.
Tip
If you find being prompted for the image type annoying every time you open an image, look at the dialog box closely. There is an option to Auto-estimate image type. Then QuPath will make its best guess, and not prompt you.
But QuPath won’t always get it right. So if you select this option, it is especially important to know how to check the type and fix it.
How QuPath handles big images
Whole slide images can be gigabytes in size. It usually isn’t possible to read all the pixels in one go: it would take too much time and memory.
QuPath uses the fact that the images are usually stored as pyramids (i.e., with multiple zoom levels in the same file). It only reads the pixels that are required at the time, based upon what is currently being processed or shown in the viewer.
Fig. 10 A pyramidal image contains multiple zoom levels within the same file#