Skip to content

Commit

Permalink
Merge pull request #23 from sbesson/omero_zarr_pixel-buffer_0.3.0
Browse files Browse the repository at this point in the history
Expose omero-zarr-pixel-buffer in pixel-buffer micro-service
  • Loading branch information
sbesson authored May 17, 2024
2 parents bc9288a + 0c27de2 commit 3bb126a
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Requirements
* OMERO 5.6.x+
* OMERO.web 5.6.x+
* Redis backed sessions
* Java 8+
* Java 11+

Workflow
========
Expand Down
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
}

group = 'com.glencoesoftware.omero'
version = '0.6.5-SNAPSHOT'
version = '0.7.0-SNAPSHOT'

mainClassName = 'io.vertx.core.Launcher'

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.11
targetCompatibility = 1.11

repositories {
mavenCentral()
Expand Down Expand Up @@ -56,11 +56,12 @@ 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-ms-core:0.7.0'
implementation 'com.glencoesoftware.omero:omero-zarr-pixel-buffer:0.4.0'
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'
implementation 'io.vertx:vertx-config-yaml:3.8.1'
implementation 'org.openmicroscopy:omero-blitz:5.7.2'
implementation 'org.openmicroscopy:omero-blitz:5.7.3'
implementation 'io.prometheus.jmx:collector:0.12.0'
implementation 'io.prometheus:simpleclient_hotspot:0.8.0'
implementation 'com.zeroc:icegrid:3.6.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext(
"classpath:ome/config.xml",
"classpath:ome/services/datalayer.xml",
"classpath*:blitz/*PixelBuffer.xml",
"classpath*:beanRefContext.xml");
PixelsService bean = (PixelsService) context.getBean("/OMERO/Pixels");
System.err.println("Bean: " + bean);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ public void deploy(JsonObject config, Promise<Void> prom) {
context = new ClassPathXmlApplicationContext(
"classpath:ome/config.xml",
"classpath:ome/services/datalayer.xml",
"classpath*:beanRefContext.xml",
"classpath*:service-ms.core.PixelsService.xml");
"classpath*:blitz/*PixelBuffer.xml",
"classpath*:beanRefContext.xml");

JsonObject httpTracingConfig =
config.getJsonObject("http-tracing", new JsonObject());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.glencoesoftware.omero.ms.core.OmeroMsAbstractVerticle;
import com.glencoesoftware.omero.ms.core.OmeroRequest;
import com.glencoesoftware.omero.ms.core.PixelsService;
import com.glencoesoftware.omero.zarr.ZarrPixelsService;

import Glacier2.CannotCreateSessionException;
import Glacier2.PermissionDeniedException;
Expand All @@ -53,7 +53,7 @@ public class PixelBufferVerticle extends OmeroMsAbstractVerticle {
"omero.pixel_buffer.get_tile";

/** OMERO server pixels service. */
private final PixelsService pixelsService;
private final ZarrPixelsService pixelsService;

/** OMERO server host */
private String host;
Expand All @@ -66,7 +66,7 @@ public class PixelBufferVerticle extends OmeroMsAbstractVerticle {
* @param host OMERO server host.
* @param port OMERO server port.
*/
public PixelBufferVerticle(PixelsService pixelsService) {
public PixelBufferVerticle(ZarrPixelsService pixelsService) {
this.pixelsService = pixelsService;
}

Expand Down
18 changes: 17 additions & 1 deletion src/main/resources/beanRefContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<bean name="filesystem" abstract="true">
<constructor-arg index="0" value="${omero.data.dir}"/>
<constructor-arg index="1" type="boolean" value="true"/>
</bean>

<bean id="omeroFilePathResolver" class="ome.services.OmeroFilePathResolver">
Expand Down Expand Up @@ -43,8 +44,23 @@
<property name="graphiteAddress" value="${omero.metrics.graphite}"/>
</bean>

<bean id="nullMetrics" class="ome.system.metrics.NullMetrics"/>
<bean id="metrics" class="ome.system.metrics.NullMetrics"/>

<bean name="/OMERO/Pixels" class="com.glencoesoftware.omero.ms.image.region.PixelsService"
parent="filesystem">
<!-- index=0 "path" comes from parent -->
<constructor-arg index="2" value="${omero.pixeldata.memoizer.dir}"/>
<constructor-arg index="3" ref="MemoizerWait"/>
<constructor-arg index="4" ref="omeroFilePathResolver"/>
<constructor-arg index="5" ref="backOff"/>
<constructor-arg index="6" ref="tileSizes"/>
<constructor-arg index="7" ><null /></constructor-arg>
<constructor-arg index="8" value="${omero.pixeldata.zarr_cache_size:500}" />
<constructor-arg index="9" value="${omero.pixeldata.max_plane_width:3192}" />
<constructor-arg index="10" value="${omero.pixeldata.max_plane_height:3192}" />
<property name="metrics" ref="metrics"/>
</bean>

<bean id="omero-ms-pixel-buffer-verticle"
class="com.glencoesoftware.omero.ms.pixelbuffer.PixelBufferVerticle"
scope="prototype">
Expand Down

0 comments on commit 3bb126a

Please sign in to comment.