Skip to content

If system command call QuPath, Bioformats Extension was not usable #260

@rmd13

Description

@rmd13

Problem of run script from system command when image was opened using BioFormats Extension

I want to using QuPath open an image and run a groovy script by command like this:

"C:\Program Files\QuPath\app\QuPathApp.jar" -image "D:\QMDownload\6[failed_handOK]Leica_scn\Leica-Fluorescence-1.scn" -script "D:\QMDownload\6\Tiling_a_whole_slide_image.groovy"

If the image was originally openable in QuPath using OpenSlide server, then the command could run.

If the image was originally openable( and only Bioformats can handle it because without this extension then QuPath cannot open it) in QuPath using BioFormats Extension, such as .vsi/.scn format, then the command raise error:

However, the image Leica-Fluorescence-1.scn could be hand-opened in QuPath, and after openning, I can run the same script by clicking inside QuPath without problem.

So the issue would be that how to let Bioformats extension usable when call QuPath from system command, but bot GUI.

Any suggestions are welcome.

20:56:55.735 [main] [INFO ] qupath.QuPath - Launching QuPath with args: -image, D:\QMDownload\6\[failed_handOK]Leica_scn\Leica-Fluorescence-1.scn, -script, D:\QMDownload\6\Tiling_a_whole_slide_image.groovy
20:56:55.829 [main] [ERROR] q.lib.images.servers.FileFormatInfo - Checking Big TIFF images currently not supported!!!
Unsupported format or not found
20:56:55.876 [main] [WARN ] q.i.i.servers.ImageJServerBuilder - Error opening D:\QMDownload\6\[failed_handOK]Leica_scn\Leica-Fluorescence-1.scn with ImageJ: Could not open D:\QMDownload\6\[failed_handOK]Leica_scn\Leica-Fluorescence-1.scn with ImageJ
20:56:55.907 [main] [WARN ] q.l.i.servers.OpenslideServerBuilder - Unable to open D:\QMDownload\6\[failed_handOK]Leica_scn\Leica-Fluorescence-1.scn with OpenSlide: Can't find main image
20:56:55.907 [main] [ERROR] q.l.i.servers.ImageServerProvider - Unable to build whole slide server - check your classpath for a suitable library (e.g. OpenSlide, BioFormats)

20:56:55.907 [main] [ERROR] q.l.i.servers.ImageServerProvider - C:\Program Files\QuPath\app\QuPathApp.jar;qupath/qupath-core-0.1.2.jar;qupath/qupath-core-awt-0.1.2.jar;qupath/qupath-core-processing-0.1.2.jar;qupath/qupath-core-processing-awt-0.1.2.jar;qupath/qupath-extension-ij-0.1.2.jar;qupath/qupath-extension-input-0.1.2.jar;qupath/qupath-extension-opencv-0.1.2.jar;qupath/qupath-extension-openslide-0.1.2.jar;qupath/qupath-extension-pen-0.1.2.jar;qupath/qupath-extension-script-editor-0.1.2.jar;qupath/qupath-gui-fx-0.1.2.jar;qupath/qupath-processing-ij-0.1.2.jar;qupath/qupath-processing-opencv-0.1.2.jar;jars/commons-math3-3.6.1.jar;jars/controlsfx-8.40.12.jar;jars/flowless-0.4.5.jar;jars/groovy-2.4.7.jar;jars/groovy-jsr223-2.4.7.jar;jars/gson-2.8.0.jar;jars/ij-1.51g.jar;jars/jfxtras-common-8.0-r5.jar;jars/jfxtras-menu-8.0-r5.jar;jars/jinput-2.0.6.jar;jars/jpen-2-150301.jar;jars/jutils-1.0.0.jar;jars/logback-classic-1.1.7.jar;jars/logback-core-1.1.7.jar;jars/opencv-3.1.0.jar;jars/openslide-3.4.1_2.jar;jars/packager.jar;jars/reactfx-2.0-M4u1.jar;jars/richtextfx-0.6.10.jar;jars/slf4j-api-1.7.20.jar;jars/undofx-1.2.jar;jars/wellbehavedfx-0.1.1.jar
20:56:56.627 [main] [ERROR] qupath.QuPath - Error running script!
javax.script.ScriptException: javax.script.ScriptException: java.lang.NullPointerException
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155)
at qupath.QuPath.main(Unknown Source)
Caused by: javax.script.ScriptException: java.lang.NullPointerException
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:152)
... 1 common frames omitted
Caused by: java.lang.NullPointerException: null
at qupath.imagej.images.servers.BufferedImagePlusServer.getPath(BufferedImagePlusServer.java:71)
at qupath.lib.images.servers.ImageServer$getPath.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at Script1.run(Script1.groovy:42)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:343)
... 2 common frames omitted

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions