= Documentation =This page contains information on how to setup QuPath 0.3 and how to migrate 0.2 to 0.3 scripts and protocols
= Installing QuPath =
Install the latest version of QuPath from https://qupath.github.io/
= BIOP Installation =
You can copy the "QuPath Common Data" folder from
You can find all the [[ https://github.com/qupath/qupath/wiki/ | documentation ]] on-line, and some [[ https://www.youtube.com/playlist?list=PL4ta8RxZklWkPB_pwW-ZDVAGPGktAlE5Y | video tutorials ]] on youtube .```
WIN: \\svraw1\ptbiop\public\0-Software\QuPath
MAC: smb://svraw1/ptbiop/public\0-Software\QuPath
```
or download the[[ https://drive.google.com/file/d/1fz7P41CTqkcHKT91lVdjRtNDCqJLft4D/view?usp=sharing | ZIP from the BIOP GDrive ]] (~14Mb)
= Presentation =Place the `QuPath Common Data` folder somewher permanent on your computer
[[ https://docs.google.com/presentation/d/1OmBUK-_2Ex66Wn3cYxInxzfadOVAcDp_gbSm7m9nKN4/edit?usp=sharing | Google Slides ]] (accessible to all EPFL users)
=12. From QuPath, go to {nav Edit > Preferences...}
3. Install =
==1.1.Under {nav Extensions > QuPath user directory} point to the previously copied `QuPath Common Data`
{F14241650, layout=center, QuPath Latest Versions ==
The BIOP is maintaining the current version with the latest in house bugfixes for
===1.1.asize=full}
4. Restart QuPath
5. Win 10 ===Go to {nav Extensions> Installed Extensions} and locate `BIOP QuPath Extension`
(NOTE) Just "Copy & Paste" the QuPath folder located at **\\svfas6.epfl.ch\biop\public\0 - BIOP Data\0-Install\QuPath\** to your favorite location and run `QuPath.exe`{F22627804, layout=center, size=full}
(NOTE) or dowload and extract [[https://drive.google.com/a/epfl.ch/file/d/1YtXdABBV0G9VrvllMWhAH057s3Uy_SOz/view?usp=sharing | the zip archive ]]
NB: to connect to svfas6.epfl.ch,== Common Scripts ==
To have BIOP scripts (and your own) available for any open QuPath Project, you need to set the `Script directory`
1. use "Map network drive" on windows and use your GASPAR login but add 'intranet\' before your login name: 'intranet\username'
** Extensions for Windows **Go to {nav Edit > Preferences > Automation}
After you start the new version of 2. Set the `Script directory` to`QuPath go toCommon Data\biop-scripts`
{nav Edit > Preferences} and find
**Extensions Directory for windows **
Set it to the `extensions` directory inside your QuPath folder.F15226503, layout=center, (e.g. `C:\QuPath\extensions`) as shown in 1.2.a.
=== 1.1.bsize=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. Mac OSX ===Go go {nav Edit > Preferences > ImageJ} and set the `ImageJ plugins directory` (we set is a subfolder of `QuPath Common Data`)
(NOTE) Get the compiled version at **smb://svfas6.epfl.ch/biop/public/0 - BIOP Data/0-Install/QuPath/QuPath MAC**
(NOTE) or dowload and extract [[https://drive.google.com/a/epfl.ch/file/d/1TuaOHpw_8YdudImf33ql_oP-6G2CPXfX/view?usp=sharing | the zip archive ]]
**Extensions for Mac**{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`
- You will need to get the extensions at **smb://svfas6.epfl.ch/biop/public/0 - BIOP Data/0-Install/QuPath/Extensions**
- Copy these in a folder= Installing StarDist for QuPath =
[[ https://github.com/qupath/qupath-extension-stardist | StarDist now exists as a QuPath Extension ]], and on a fresh QuPath install, all you need to do is drag and drop the release JAR into QuPath. This will copy it into the `extensions` directory.
- Setup the Extensions folder within QuPath as per the paragraph below to wherever you copied the **Extensions** folder. See Section 1.2.a. on how to set your **Extensions ** folder from within QuPathOtherwise it is included in `QuPath Common Data` which can be downloaded here: `\\svraw1\ptbiop\public\0-Software\QuPath`
(WARNING) The versions above contain all the extensions you need in the `Extensions` Subfolder= Migrating StarDist Models =
==1.2. QuPath Setup ==StarDist models now need to be in `*.pb` format as per [[ https://github.com/qupath/qupath-extension-stardist#converting-a-tensorflow-model-for-use-with-opencv | this note by Pete Bankhead on the StarDist Extension Repo ]]
=== 1.2.a. Directories ===
Computers at== Install a Virtual Environment for the BIOP have the QuPath directories set as follows:conversion ==
Pip Dependencies: {F21324420}
From QuPath, go to {nav Edit > Preferences }**If you use `venv` with `py` and set the followind directory fields by double clicking on themwant to install in `D:\env-tf2onnx`**
- Extensions Directory: `C:\QuPath\extensions`
{F9985762, size=full}
=2. Create a project=
==Description==```
py -3.7 -m venv d:\env-tf2onnx
d:\env-tf2onnx\Scripts\activate\
pip install -r tf2onnx.txt
For images of a Project to be accessible from different computers they have to be **within the project folder**.```
== To create a QuPath project ==
# Create a folder that will contain the project, let's call it `QP-Project-Demo`**If you use `conda`**
```
# Create a folder called `Images` inside `QP-Project-Demo` and move all your images thereconda create -n env-tf2onnx python=3.7
# From QuPath, select {nav Creconda activate Project} and navigate to `QP-Project-Demo`env-tf2onnx
pip install -r tf2onnx.txt
# Click on {nav Add images} and select all the images you want to add to the project form the `Images` folder```
# Your Project is ready
Specific details for VSI files can be found at [[ https://c4science.ch/w/bioimaging_and_optics_platform_biop/image-processing/qupath/import_vsi/ | this Wiki Page]]
==Procedure to open a project==== Converting a Model from a StarDist Training ==
1. Locate the resulting **model folder **from StarDist training (not the ZIP file). The example here assumes it is called `demo-model`
2. Run the following command
Now, everyone (with "reading" right to the destination folder) can access the images from every computer:```
# Start QuPathpython -m tf2onnx.convert --opset 10 --saved-model "L:\public\0-BIOP_Data\StarDist Models\demo-model" --output_frozen_graph "L:\public\0-BIOP_Data\StarDist Models\demo-model.pb"
# Press {key Open_project},```
3. select your **qpproj**This creates a single file and press {key Open}
# Double-clic o`demo-model.pb`
4. Point to this file in the thumbnail image you want to visualizenew StarDist Extension from within QuPath