From 627a39a8e293885e1e4cf91c47846ae94108fa77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Fri, 17 May 2024 10:24:47 +0100 Subject: [PATCH 1/7] Update queries to load the image externalInfo and format --- .../omero/ms/pixelbuffer/TileRequestHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java b/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java index 8739e50..2dfec0f 100755 --- a/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java +++ b/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java @@ -228,9 +228,11 @@ protected Pixels getPixels(omero.client client, Long imageId) try { return (Pixels) client.getSession().getQueryService().findByQuery( "SELECT p FROM Pixels as p " + - "JOIN FETCH p.image " + + "JOIN FETCH p.image as i " + + "JOIN FETCH i.format " + + "LEFT OUTER JOIN FETCH i.details.externalInfo " + "JOIN FETCH p.pixelsType " + - "WHERE p.image.id = :id", + "WHERE i.id = :id", params, ctx ); } finally { From 0547ff6f128803bd6cd346208d8527c0cd92f02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Fri, 17 May 2024 10:25:20 +0100 Subject: [PATCH 2/7] Replace /OMERO/Pixels bean by configurable alias and use NoopQueryImpl --- src/main/resources/beanRefContext.xml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/main/resources/beanRefContext.xml b/src/main/resources/beanRefContext.xml index 6d28128..96dd77a 100755 --- a/src/main/resources/beanRefContext.xml +++ b/src/main/resources/beanRefContext.xml @@ -46,20 +46,9 @@ - - - - - - - - - - - - - + + + Date: Fri, 17 May 2024 10:45:28 +0100 Subject: [PATCH 3/7] Re-include org.apache.httpcomponents in micro-service libraries These libraries are a requirement for using ZarrPixelBuffer against OME-Zarr data hosted on AWS S3 --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index cc10b66..ad880c5 100755 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,6 @@ configurations.all { exclude group: 'gnu.getopt' exclude group: 'net.sf.ehcache' exclude group: 'org.apache.commons' - exclude group: 'org.apache.httpcomponents' exclude group: 'org.apache.pdfbox' exclude group: 'org.apache.xmlgraphics' exclude group: 'org.ini4j' From 4cb55c5a1478c521a227909dafe4128ca20540e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Fri, 17 May 2024 10:53:12 +0100 Subject: [PATCH 4/7] Extend micro-service configuration to specify pixelservice at runtime --- src/dist/conf/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dist/conf/config.yaml b/src/dist/conf/config.yaml index 071cf26..0b76c61 100755 --- a/src/dist/conf/config.yaml +++ b/src/dist/conf/config.yaml @@ -12,6 +12,7 @@ omero.server: omero.db.port: "5432" omero.db.user: "omero" omero.db.pass: "omero" + omero.pixeldata.pixels_service: "ZarrPixelsService" # OMERO_HOME/lib/scripts omero.script_repo_root: "/opt/omero/OMERO.current/lib/scripts" # Information about the session store. From 285979b1563053d23d106adece4cac1ec53f92c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Sat, 18 May 2024 11:05:42 +0100 Subject: [PATCH 5/7] Use left outer join when retrieving image.format --- .../omero/ms/pixelbuffer/TileRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java b/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java index 2dfec0f..76af24c 100755 --- a/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java +++ b/src/main/java/com/glencoesoftware/omero/ms/pixelbuffer/TileRequestHandler.java @@ -229,7 +229,7 @@ protected Pixels getPixels(omero.client client, Long imageId) return (Pixels) client.getSession().getQueryService().findByQuery( "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 " + "JOIN FETCH p.pixelsType " + "WHERE i.id = :id", From fcc250aa86a251852dad05395710a96ec4a9a7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Mon, 20 May 2024 11:18:14 +0100 Subject: [PATCH 6/7] Consumer 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 ad880c5..cca8059 100755 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,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' From cefbfcb4f847ae8d0f963e642844b510fa9a1b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Wed, 29 May 2024 11:33:13 +0100 Subject: [PATCH 7/7] Startup script: use wildcard for the classpath This pattern improves the extensibility of the micro-service as extension JARs can easily be added to lib/ folder and will be included at restart without the requirement to modify the CLASSPATH in the executable --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle b/build.gradle index cca8059..e5e38d9 100755 --- a/build.gradle +++ b/build.gradle @@ -96,3 +96,7 @@ distributions { applicationDefaultJvmArgs = [ "-Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory" ] + +startScripts { + classpath = files('$APP_HOME/lib/*') +}