From 7e6192b3e45223adcc132bd10d4d399098f03853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Sat, 18 May 2024 10:58:40 +0100 Subject: [PATCH 1/2] Use left outer join fetch when retrieving the image.format For image where there is no associated format e.g. images that will be read by the RomioPixelBuffer, this is a requirement for the query to return a Pixels object and avoid a Cannot find Image: 404 error when using a micro-service endpoint --- .../omero/ms/image/region/ImageDataRequestHandler.java | 2 +- .../omero/ms/image/region/ImageRegionRequestHandler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageDataRequestHandler.java b/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageDataRequestHandler.java index 51c8d58c..47573622 100644 --- a/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageDataRequestHandler.java +++ b/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageDataRequestHandler.java @@ -629,7 +629,7 @@ protected Image queryImageData(IQueryPrx iQuery, Long imageId) .findByQuery("select i from Image as i" + " left outer join fetch i.details.externalInfo " + " join fetch i.pixels as p" - + " join fetch i.format" + + " left outer join fetch i.format" + " left outer JOIN FETCH i.datasetLinks as links " + " left outer join fetch links.parent as dataset " + " left outer join fetch dataset.projectLinks as plinks " diff --git a/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageRegionRequestHandler.java b/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageRegionRequestHandler.java index 2b72fd3a..e11e0740 100644 --- a/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageRegionRequestHandler.java +++ b/src/main/java/com/glencoesoftware/omero/ms/image/region/ImageRegionRequestHandler.java @@ -152,7 +152,7 @@ protected Map retrievePixDescription( iQuery.findAllByQuery( "select p from Pixels as p " + "join fetch p.image as i " - + "join fetch i.format " + + "left outer join fetch i.format " + "left outer join fetch i.details.externalInfo " + "left outer join fetch i.wellSamples as ws " + "left outer join fetch ws.well as w " From 3eba52f67f3c26aa4ed316445e10f7f1f8c11c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Mon, 20 May 2024 11:17:37 +0100 Subject: [PATCH 2/2] Consume omero-zarr-pixel-buffer 0.4.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6ca3ba35..5ea3a0f2 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'io.zipkin.reporter2:zipkin-sender-okhttp3:2.10.0' implementation 'ch.qos.logback:logback-classic:1.3.14' implementation 'org.slf4j:log4j-over-slf4j:1.7.32' - implementation 'com.glencoesoftware.omero:omero-zarr-pixel-buffer:0.4.0' + implementation 'com.glencoesoftware.omero:omero-zarr-pixel-buffer:0.4.1' implementation 'com.glencoesoftware.omero:omero-ms-core:0.9.0' implementation 'io.vertx:vertx-web:3.8.1' implementation 'io.vertx:vertx-config:3.8.1'