Third milestone on the path to QuPath v0.2.0

Ok, I found one and tried it: opening in a project worked for me. Otherwise QuPath couldn’t find any clues which one it ought to open, and unfortunately the main whole slide image for .scn doesn’t seem to be the first one in the file.

I’ve tried various logic over the years in an effort to open the right one by default… but none totally reliable across all file formats. I recall previously QuPath would open the largest file, which would probably have been more successful here, but was really surprising when applied to a file containing 100 scenes, each representing an individual TMA core - and each with slightly different sizes. It ended up picking one seemingly at random.

Also, previously there was an extra list under the ‘Image’ tab to select different images stored within the same file, but this has been removed because the ImageServer interface has changed. Currently, the only way to access different images within the same file via Bio-Formats is to add them to a project (apart from things recognised as labels/ancillary images, which are still under the ‘Image’ tab).

The change was made in the service of the ‘fancy’ images mentioned above. It is becoming increasingly important to use projects in QuPath rather than to open images individually to be able to take advantage of all the features. To support that it is becoming easier to create and organize projects.


you guys are amazing … looks as if you started typing the answer before I even asked. Incedible speed.

I tried opening in a project and that worked as well for me. So I guess we simply getting used to projects. Which probably is a good idea anyways.

Thanks again for the quick response (and solution).

Here is a quick video demonstrating how projects can be quickly created and organized, as of 0.2.0m3


I’m really embarrassed to ask, but is there any way to work with projects created with 0.2.0m2 in 0.2.0m3? Although we should have known better, we started a whole bunch of projects right after the m2 release, which cannot be used with m3 it seems …

Probably yes, although I’m afraid I don’t have a way yet. But I was expecting to have to come up with one at some point :slight_smile:

The good news is that the general idea is the same for m2 and m3:

  • The list of images in the project is in the .qpproj file (it’s JSON and can be opened in a text editor; I use Atom)
  • Each image entry has an ID, which is just an integer
  • Inside the data folder there is a subfolder for each ID (assuming anything has been saved for that image)
    • Inside each ID subfolder there is
      • A .qpdata file
      • Other stuff, which it should be safe to ignore (I think…)

The good news is that m3 projects are actually a bit simpler than m2 ones… as figuring out how to do it more simply took a lot more time.

What I think you’ll need to do is

  • create an m3 project with the same images as m2
  • figure out how match the IDs
  • copy over the .qpdata files into the correct place

I think the best thing would be to write a script to do the job. I did/do plan to write one (assuming someone asked), but I’m afraid it may take a some weeks before I can look properly.

Warning: I wrote this from memory and it’s very possible there are hidden complications that I haven’t considered… but I’m fairly sure it should be achievable in the end.


@petebankhead thank you so much for your encouraging answer at this late hour. I already looked into the .qpproj file of an m3 project (I just used notepad++, but will switch to Atom now :slight_smile:) and noticed some of the differences. If the “only” thing I have to do is to get the .qpdata files (is this where the annotations are?) into the folders with the right IDs - that should be feasible. Would it also work, if I change the IDs in the .qpproj file of the m3 project to match the folder / ID structure of the old m2 project?

If you could look into writing a script that deals with “0.2.0mX to mY conversion”, that would be absolutely fantastic. But only if you find the time - I can only imagine how busy you must be. I will also try to put something together, but this will probably take even longer. Also it will probably not work.

Thanks again anyway.

1 Like

M4!! Full speed ahead!

And potentially more useful, you could also try moving the annotations over. If the script still works.

1 Like

@Research_Associate Thank you very much, Mike. I will look into the Google Groups thread which I totally forgot about :sweat_smile: Plus, I will try out Pete’s idea / script, when it’s ready … Have a great weekend everyone.

1 Like

Well, it seems I forgot some things about the complexity of m2 projects (e.g. the ID is a long & incomprehensible UUID, not a simple integer).

The ‘good’ thing is that writing code is my preferred way to procrastinate before an important deadline.

You could try this:


@petebankhead I just saw this, Pete. I’ll try it out tonight and return with praise and ovation shortly. Good luck on your deadline :slight_smile:

Thanks, I’m hoping that’s how the story works out! :slight_smile:

1 Like

The first two tries were successful and everything worked perfectly. You’re amazing @petebankhead. I will let you know if I run into any problems further down the way - but I doubt it :slight_smile: Thank you very much! And again maximum success on your deadline-associated matter.

1 Like

6 posts were split to a new topic: Missing metadata for Ventana images in QuPath with Bio-Formats

Hi @petebankhead ,

I just tried this with both m3 and m4 and got error everytime saying unable to build whole slide server or something like that. Asking as well to recheck Bioformats and/or OpenSlide.

Any ideas why I’m getting that ?

Thanks a lot !

I’m afraid not… I assume ‘tried this’ means the m2 -> m3 script?
I might need the project itself to decipher what is going wrong, any useful info from View → Show log, or at the very least an example path from the first project that doesn’t transfer over.

Yes, sorry. I thought that just replying to your answer would link it and therefore give the info…

To go back to why we’re doing that: a user is having a QuPath project with images on a network drive. However, our IT changed the path of those network drives and therefore the project is failing at opening the files now (which totally makes the sense). I saw that m3 makes it easy to change the path of the file and tried the script to convert it but it seems that the script is failing for every file (even local ones) with this error message about building whole slide server.

Right now the computer on which we tried is used but I’ll try to get you more info once it’s available.

Here is the message that I’m getting:

ERROR: Unable to build server
    at qupath.lib.images.servers.ImageServerBuilder$DefaultImageServerBuilder.buildOriginal(
    at qupath.lib.images.servers.ImageServerBuilder$
    at qupath.lib.images.servers.ImageServerProvider.buildServer(
    at qupath.lib.images.servers.ImageServerProvider$ Source)
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(
    at qupath.lib.gui.scripting.DefaultScriptEditor.executeScript(
    at qupath.lib.gui.scripting.DefaultScriptEditor.executeScript(
    at qupath.lib.gui.scripting.DefaultScriptEditor.executeScript(
    at qupath.lib.gui.scripting.DefaultScriptEditor$
    at java.base/java.util.concurrent.Executors$ Source)
    at java.base/ Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
    at java.base/ Source)
ERROR: Unable to build whole slide server - check your classpath for a suitable library (e.g. OpenSlide, BioFormats)
ERROR: C:\Tools\QuPath-0.2.0-m4-Windows\QuPath-0.2.0-m4\app\qupath-0.2.0-m4.jar;c3p0-;cdm-4.6.13.jar;commons-codec-1.9.jar;commons-io-1.4.jar;commons-lang-2.4.jar;commons-logging-1.2.jar;commons-math3-3.6.1.jar;controlsfx-11.0.0.jar;failureaccess-1.0.1.jar;flowless-0.6.jar;formats-api-6.2.0.jar;formats-bsd-6.2.0.jar;formats-gpl-6.2.0.jar;google-http-client-1.20.0.jar;google-http-client-xml-1.20.0.jar;groovy-2.5.7.jar;groovy-jsr223-2.5.7.jar;gson-2.8.5.jar;guava-28.0-jre.jar;httpclient-4.5.1.jar;httpcore-4.4.3.jar;httpmime-4.5.1.jar;httpservices-4.6.13.jar;ij-1.52p.jar;jackson-annotations-2.9.8.jar;jackson-core-2.9.8.jar;jackson-databind-2.9.8.jar;javacpp-1.5.1.jar;javafx-base-12.0.2-win.jar;javafx-base-12.0.2.jar;javafx-controls-12.0.2-win.jar;javafx-controls-12.0.2.jar;javafx-graphics-12.0.2-win.jar;javafx-graphics-12.0.2.jar;javafx-media-12.0.2-win.jar;javafx-media-12.0.2.jar;javafx-swing-12.0.2-win.jar;javafx-swing-12.0.2.jar;javafx-web-12.0.2-win.jar;javafx-web-12.0.2.jar;jfxtras-common-10.0-r1.jar;jfxtras-menu-10.0-r1.jar;jgoodies-common-1.7.0.jar;jgoodies-forms-1.7.2.jar;jhdf5-14.12.6.jar;joda-time-2.8.1.jar;jpen-2-150301-natives-windows.jar;jpen-2-150301.jar;json-20090211.jar;jts-core-1.16.1.jar;JWlz-1.4.0.jar;jxrlib-all-0.2.1.jar;kryo-2.24.0.jar;listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;logback-classic-1.2.3.jar;logback-core-1.2.3.jar;mchange-commons-java-0.2.15.jar;metadata-extractor-2.11.0.jar;metakit-5.3.2.jar;minio-5.0.2.jar;minlog-1.2.jar;native-lib-loader-2.1.4.jar;objenesis-2.1.jar;okhttp-3.7.0.jar;okio-1.12.0.jar;ome-codecs-0.2.3.jar;ome-common-6.0.3.jar;ome-jai-0.1.0.jar;ome-mdbtools-5.3.2.jar;ome-poi-5.3.3.jar;ome-xml-6.0.1.jar;openblas-0.3.6-1.5.1-windows-x86_64.jar;openblas-0.3.6-1.5.1.jar;opencv-4.1.0-1.5.1-windows-x86_64.jar;opencv-4.1.0-1.5.1.jar;openslide-3.4.1_2-natives-windows.jar;openslide-3.4.1_2.jar;perf4j-0.9.16.jar;qupath-0.2.0-m4.jar;qupath-core-0.2.0-m4.jar;qupath-core-processing-0.2.0-m4.jar;qupath-experimental-0.2.0-m4.jar;qupath-extension-bioformats-0.2.0-m4.jar;qupath-extension-omero-0.2.0-m4.jar;qupath-extension-openslide-0.2.0-m4.jar;qupath-extension-pen-0.2.0-m4.jar;qupath-extension-processing-0.2.0-m4.jar;qupath-extension-script-editor-0.2.0-m4.jar;qupath-gui-fx-0.2.0-m4.jar;reactfx-2.0-M5.jar;richtextfx-0.10.1.jar;serializer-2.7.2.jar;slf4j-api-1.7.25.jar;specification-6.0.1.jar;turbojpeg-6.2.0.jar;undofx-2.1.0.jar;wellbehavedfx-0.3.3.jar;xalan-2.7.2.jar;xercesImpl-2.8.1.jar;xml-apis-1.3.04.jar;xmpcore-5.1.3.jar;xpp3-1.1.4c.jar;
INFO: Unable to build a whole slide server for (path_of_the-file)
INFO: Done!

so I guess it means that this is because the file can’t be found ? I thought I could import the project in m3 and then fix the path but I guess not. :sweat_smile:

That sounds about right, was considering suggesting that, but I really didn’t know. I have seen in a few other posts (maybe Issues? I forget), that people use find/replace to edit the file paths when they change en mass in the qpproj file. *In a text editor of some sort.

Yes, the script needs to create the ImageServer once before it can be added to the project:

This is because m3/m4 projects contain more info than just the path (e.g. whether the image is opened with OpenSlide/Bio-Formats/ImageJ, whether it is rotated or transformed some other way).

1 Like

A post was split to a new topic: Open VSI images in QuPath