Unable to import .ndpi images

Hi,

I have been given access to .ndpi images scanned on a Hamamatsu scanner. I can assess the images on the viewing portal (NDP.serve) but can not import the images into a QuPath 2.0m9 project.

Trying to import via coping the image address brings up the ‘Failed to load one image’ error.

Importing via pasting the image URL gives the error

‘QuPath has encountered a problem’

INFO: Bio-Formats version 6.3.1
INFO: Loaded extension Bio-Formats server options (Bio-Formats 6.3.1) (13 ms)
INFO: Loaded extension Experimental commands (17 ms)
INFO: Loaded extension ImageJ extension (34 ms)
INFO: Loaded extension JPen extension (15 ms)
INFO: Loaded extension OpenCV extensions (2 ms)
INFO: Loaded extension Rich script editor extension (198 ms)
INFO: OpenSlide version 3.4.1
INFO: Selected style: null
INFO: Performing update check…
WARN: No changelog found - will not check for updates
INFO: Starting QuPath with parameters:
INFO: Project set to Project: Project-project
ERROR: Unable to connect to OMERO server
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder$OmeroWebClient.getJSONString(OmeroWebImageServerBuilder.java:357)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder$OmeroWebClient.parseJSON(OmeroWebImageServerBuilder.java:365)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder$OmeroWebClient.loadURLs(OmeroWebImageServerBuilder.java:246)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder$OmeroWebClient.create(OmeroWebImageServerBuilder.java:259)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder.supportLevel(OmeroWebImageServerBuilder.java:160)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder.checkImageSupport(OmeroWebImageServerBuilder.java:140)
at qupath.lib.images.servers.ImageServerProvider.getServerBuilders(ImageServerProvider.java:173)
at qupath.lib.images.servers.ImageServerProvider.getPreferredUriImageSupport(ImageServerProvider.java:198)
at qupath.lib.gui.commands.ProjectImportImagesCommand$1.lambda$call$0(ProjectImportImagesCommand.java:308)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
WARN: Unable to open UriImageSupport (class qupath.lib.images.servers.omero.OmeroWebImageServerBuilder) support=4.0, builders=1
WARN: Exception adding Image null
ERROR: Import images: Failed to load one image.
INFO:
INFO:
ERROR: QuPath exception
at java.base/java.net.URI$Parser.parse(Unknown Source)
at java.base/java.net.URI.(Unknown Source)
at java.base/java.net.URI.create(Unknown Source)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder$OmeroWebClient.keepAlive(OmeroWebImageServerBuilder.java:318)
at qupath.lib.images.servers.omero.OmeroWebImageServerBuilder$OmeroWebClient$1.run(OmeroWebImageServerBuilder.java:223)
at java.base/java.util.TimerThread.mainLoop(Unknown Source)
at java.base/java.util.TimerThread.run(Unknown Source)

I have also tried exporting the image as a .jpg or .tif but both also give the error ‘Failed to load one image’.

Previous I have been using .svs files from a hard drive for any QuPath projects.

QuPath doesn’t support the NDP.serve viewing portal, just local .ndpi files or remote images through OMERO.

In principle, QuPath can connect with other image hosting services - but this would require an extension to be written, and for the hosting service to have publicly-available documentation describing how to integrate with it. I’m not sure that exists for NDP.serve (I’ve no experience of it myself).

Okay thank you.

Is there any reason that the images which have been exported from the viewer either as .jpg .tif or .bmp are failing to load in QuPath.

Thank you for your help.

1 Like

I’d need to know any error message / have an example image to say with much confidence, but it may be that the images are just too big for those file formats.

NDPI images (and SVS and others) are stored in pyramidal formats that QuPath can handle well (see here). Very large JPEGs, TIFFs or BMPs that aren’t pyramidal aren’t very well supported (by QuPath, or most software).

1 Like

I have managed to reduce the image size and import the images into QuPath, thank you.

1 Like