Skip to content

Commit

Permalink
Merge pull request #96 from RationAI/development
Browse files Browse the repository at this point in the history
Improving annotation visuals setting, consistent swapping & bugfixing.
  • Loading branch information
Aiosa authored Nov 26, 2024
2 parents 72ddddf + 5be29bf commit 5fa936e
Show file tree
Hide file tree
Showing 26 changed files with 770 additions and 258 deletions.
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*
!*.html
!*.js
!*.json
!*.md
!docs/assets
!docs/*.js
!src
!server
!plugins
!modules
!env
!/tmp/openseadragon/build
!docker/php/apache-dev.conf
!docker/php/apache.conf
!.htaccess
!*php
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ The changelog file describes changes made since v2.0.0, which made significant c
to the versions 1.x.x.

### Unreleased 2.1.0
**Features:** new system for module/plugin building
**Features:** new system for module/plugin building, improvements of annotation listing features,
support for generic annotation visual style changes.

**Maintenance:** removed outdated plugins
**Maintenance:** removed outdated plugins.

**Bugfixes:** plugins use also Cache API, annotation visuals updated also with history.

### 2.0.4
**Features:** vertical magnification slider, allow 2x artificial zoom, annotation areas
**Features:** vertical magnification slider, allow 2x artificial zoom, annotation areas.

**Bugfixes:** OIDC module, magic wand annotation tool, stacktrace capture.

Expand Down
52 changes: 52 additions & 0 deletions docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
##################
# VIEWER: BUILD###
##################
FROM node:20 AS viewer-build
WORKDIR /tmp
RUN git clone https://github.com/RationAI/openseadragon.git \
&& cd openseadragon \
&& git reset --hard ea54427f42a076e1a7a33f8590e0de22e7a335f4 \
&& npm i \
&& cd ..

#############################
# VIEWER: PROD GIT ####
#############################
# Viewer that creates php runtime but does not include code - it must be fetched by the container on startup.
FROM node:20 AS viewer-git

ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get install --no-install-recommends --fix-missing -y \
curl \
locales \
tzdata \
git \
ca-certificates \
vim \
nano \
&& ln -fs /usr/share/zoneinfo/Europe/Prague /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /usr/app

RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh \
# User Id 1000 for kubernetes
&& usermod --non-unique --uid 1000 node

EXPOSE 9000
USER node
WORKDIR /app

###############################
# VIEWER: PROD STANDALONE ####
###############################
# Viewer with all the necessities
FROM viewer-git AS viewer-standalone
COPY --chown=node:1000 . /app
RUN cd /app && npm install
49 changes: 49 additions & 0 deletions docker/node/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
services:
xopat-node:
build:
context: ../../
dockerfile: docker/node/Dockerfile
target: viewer-standalone
entrypoint: ["node", "index.js"]
ports:
- "9001:9000"
environment:
XOPAT_ENV: >-
{
"core": {
"gateway": "https://xopat.readthedocs.io",
"active_client": "localhost",
"client": {
"localhost": {
"domain": "http://localhost:9001",
"path": "/",
"image_group_server": "http://localhost:9002",
"image_group_protocol": "`$${path}/v3/batch/info?slides=$${data}`",
"image_group_preview": "`$${path}/v3/batch/thumbnail/max_size/250/250?slides=$${data}`",
"data_group_server": "http://localhost:9002",
"data_group_protocol": "`$${path}/v3/batch/info?slides=$${data.join(\",\")}`",
"headers": {},
"js_cookie_expire": 365,
"js_cookie_path": "/",
"js_cookie_same_site": "",
"js_cookie_secure": "",
"secureMode": false,
}
},
"setup": {
"locale": "en",
"customBlending": false,
"debugMode": false,
"webglDebugMode": false,
},
"openSeadragonPrefix": "https://cdn.jsdelivr.net/npm/openseadragon@4.1.1/build/openseadragon/",
"openSeadragon": "openseadragon.min.js"
},
"plugins": {
},
"modules": {
"empaia-wsi-tile-source": {
"permaLoad": true
}
}
}
46 changes: 46 additions & 0 deletions docker/php/docker-compose-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
services:
xopat-php:
image: ghcr.io/rationai/xopat:dev2.0.4
ports:
- "9001:8000"
environment:
XOPAT_ENV: >-
{
"core": {
"gateway": "https://xopat.readthedocs.io",
"active_client": "localhost",
"client": {
"localhost": {
"domain": "http://localhost:9001",
"path": "/",
"image_group_server": "http://localhost:9002",
"image_group_protocol": "`$${path}/v3/batch/info?slides=$${data}`",
"image_group_preview": "`$${path}/v3/batch/thumbnail/max_size/250/250?slides=$${data}`",
"data_group_server": "http://localhost:9002",
"data_group_protocol": "`$${path}/v3/batch/info?slides=$${data.join(\",\")}`",
"headers": {},
"js_cookie_expire": 365,
"js_cookie_path": "/",
"js_cookie_same_site": "",
"js_cookie_secure": "",
"secureMode": false,
}
},
"setup": {
"locale": "en",
"customBlending": false,
"debugMode": false,
"webglDebugMode": false,
},
"openSeadragonPrefix": "https://cdn.jsdelivr.net/npm/openseadragon@4.1.1/build/openseadragon/",
"openSeadragon": "openseadragon.min.js"
},
"plugins": {
},
"modules": {
"empaia-wsi-tile-source": {
"permaLoad": true
}
}
}
18 changes: 18 additions & 0 deletions docker/wsi-service/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
wsi_service:
image: ghcr.io/rationai/wsi-service:test0.15
environment:
- WS_CORS_ALLOW_CREDENTIALS=False
- WS_CORS_ALLOW_ORIGINS=["*"]
- WS_DEBUG=False
- WS_DISABLE_OPENAPI=True
- WS_MAPPER_ADDRESS=http://localhost:8080/slides/storage?slide={slide_id}
- WS_LOCAL_MODE=wsi_service.simple_mapper:SimpleMapper
- WS_ENABLE_VIEWER_ROUTES=False
- WS_INACTIVE_HISTO_IMAGE_TIMEOUT_SECONDS=600
- WS_MAX_RETURNED_REGION_SIZE=25000000
volumes:
- /home/novby/Documents/RationAI/test_wsis:/data
ports:
- 9002:8080

4 changes: 3 additions & 1 deletion docs/include.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/**
* TODO - Move to utils
*
* Generates list of source files for documentation out of the ENV configuration.
* For now, static only.
*/


'use strict';
var fs =require("fs");
var fs = require("fs");
const { parse } = require('comment-json');
const parseJsonFile = (file, ...args) => {
try {
Expand Down
9 changes: 7 additions & 2 deletions modules/annotations/EVENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

##### factory-registered | e: `{factory: OSDAnnotations.AnnotationObjectFactory}`

##### opacity-changed | ``{opacity: float}``
##### visual-property-changed | ``{[name]: any}``
Common visual property changed.

##### osd-interactivity-toggle

Expand All @@ -24,7 +25,7 @@ This event is fired when annotation is replaced, e.g. free-form-tool edit. Such
in fact replace annotation with a new one. This event is called only once per update,
at the end.

##### annotation-replace-helper | ``{previous: fabric.Object, next: fabric.Object}``
##### annotation-replace-doppelganger | ``{previous: fabric.Object, next: fabric.Object}``
This event is fired when annotations are replaced, but only temporarily (e.g. via free form tool).
It can be called several times during one edit action.

Expand All @@ -43,6 +44,10 @@ This event is fired when user performs direct annotation editing.

##### preset-meta-add | ``{preset: OSDAnnotations.Preset, key: string}``

##### annotation-preset-change | ``{object: fabric.Object, presetID: string}``

##### history-select | ``{incrementId: number, originalEvent: MouseEvent}``

##### import | ``{options: object, clear: boolean, data: object}``

##### export-partial | ``{options: object, data: object}``
Expand Down
Loading

0 comments on commit 5fa936e

Please sign in to comment.