This page contains information and protocols related to the latest version of QuPath (v0.2.3 as of September 2020)
IMPORTANT: The **BIOP** recommends that you update to the latest QuPath and migrate your older projects to the new version. Please request assistance migrating scripts to our image analysts or sign up for our [[ mailto:olivier.burri@epfl.ch?subject=QuPath Migration Help | QuPath Migration sessions ]]
= QuPath Training and Migration Sessions =
If people are registered, these sessions will take place **Every Wednesday at 13h30** and last about 1h.
== Topics Covered ==
1. Installation of the new QuPath version
2. Migrating QuPath v0.1.2-v0.1.4 to the latest version
3. Overview of changes and QA
NOTE: We **will not** use these sessions to migrate your code from QuPath v0.1.4. Please book an appointment with the script's creator as necessary.
= Installing QuPath 0.2.x =
As opposed to previous versions, the BIOP is now keeping in sync with the official releases of QuPath found here
https://qupath.github.io/
We will always be working with the **'Latest Stable Release'**
== Installing the BIOP-Extensions ==
0. Go to `\\svfas6.epfl.ch\biop\public\0-BIOP_Data\0-Install\QuPath` or `smb://svfas6.epfl.ch/biop/public/0-BIOP_Data/0-Install/QuPath/`
1. Copy the `QuPath Common Data` directory to a location (We copy it directly to `C:\`)
2. From QuPath, go to {nav Edit > Preferences...}
3. Under {nav Extensions > QuPath user directory} point to the previously copied `QuPath Common Data`
{F14241650, layout=center, size=full}
4. Restart QuPath
5. Go to {nav Help > Installed Extensions} and locate `BIOP Commands`
{F14817674, layout=center, size=full}
== Common Scripts ==
To have BIOP scripts (and your own) available for any open QuPath Project, you need to set the `Script directory`
1. Go to {nav Edit > Preferences > Automation}
2. Set the `Script directory` to`QuPath Common Data\biop-scripts`
{F15226503, layout=center, size=full}
== Extra Plugins and ImageJ Plugins ==
If you need a plugin from Fiji-ImageJ that will be run either manually within QuPath's ImageJ or with a script using a `run(...)` command, you need to **copy the jar file to the `ImageJ plugins directory` **.
1. Go go {nav Edit > Preferences > ImageJ} and set the `ImageJ plugins directory` (we set is a subfolder of `QuPath Common Data`)
{F14241693, layout=center, size=full}
2. Restart QuPath
NOTE: If you are going to run this code within a script **using the API directly**, you need to copy it to `QuPath Common Data\extensions`
== Native StarDist Support ==
QuPath 0.2.x includes a native way to run StarDist which is documented here:
https://qupath.readthedocs.io/en/latest/docs/advanced/stardist.html
WARNING: As stated in the documentation, this is an **Experimental Extension** that will change in the future.
This requires the installation of a TensorFlow-enabled QuPath which has to be built on your machine and for which no direct download exists.
We provide a compiled version for Windows on each of our Image Processing Workstations. Please reserve a workstation at the BIOP using [[ https://sv-bbs.epfl.ch/ptbiop/reservation/reserv2.php | SV-BBS ]].
= Importing Older QuPath Projects =
Older projects need to be migrated to a new project. All data is kept.
1. Create a new folder for the updated project
2. Drag and Drop that folder into QuPath, Click yes when prompted to create a new Project
3. If you installed `QuPath Common Data`, you should have a script under {nav Automate > Shared Scripts > Projects > type=instructions, name=Import all QuPath projects with relative paths}
4. After the script opens, simply run it and point to your `Old QuPath Project`
At the end of this process, if everything worked, your new project folder will contain all the annotations and results from before and the *absolute paths to your images**
WARNING: This procedure migrates images and annotations/detections but not results nor scripts!
You need to copy-paste them into your new project manually.
NOTE: QuPath 0.2.x uses absolute paths for your images. This means that you need to move the images from your old QuPath Project elsewhere **after** the import, and then reopen the project and point QuPath to the new final resting place of your images. See the section below
= Images, Changes with the latest QuPath =
The latest version of QuPath **does not support relative paths** for your images.
This means that the new strategy consists in
1. Storing your raw images somewhere (You lab share, Locally, etc..)
2. Creating your QuPath project folder somewhere (Can be the same location, or your 'Analysis' folder)
3. Load the images into QuPath
== Problems and Solutions with Absolute Paths ==
One advantage is that all your experimental data can reside in the same place, with the QuPath projects being elsewhere, which facilitates
- Sharing of QuPath projects among collaborators: If someone edits the QuPath project, they can send the Zipped folder to their colleagues. As the folder no longer contains the images, it is quite small.
- Storing your raw data somewhere, and your analysis elsewhere, decoupling QuPath from the raw data. That way you can store all raw data (Not just the QuPath raw data in the same location, which can help you get organized)
NOTE: However this means that when you or someone else opens the new QuPath Project, **the absolute location of the images might be different**
QuPath will announce that it cannot find the image data after you open the project
{F14241822, layout=center, size=full}
You can use {nav Search...} to locate once again the folder containing the images and QuPath will update the location of all the images
{F14241828, layout=center, size=full}
After you click {nav Apply changes}, the project is updated and you can again navigate
=== Limitations ===
If you are loading images from multiple locations, this will most likely not work. If you wish to sort images for a project, make sure they are all in a common folder (Subfolders are OK)