diff --git a/README.md b/README.md index a9a2de8..791d858 100644 --- a/README.md +++ b/README.md @@ -45,11 +45,12 @@ Configuring aspects of the hosted ALVINN PWA is done through the `conf.yaml` fil The following site settings are avaible: | name | description | values | default | | --- | --- | --- | --- | -| `agreeExpire` | number of months before users are shown the site agreement dialog again - set to 0 to display dialog on every reload | integer >= 0 | 3 | +| `agreeExpire` | number of months before users are shown the site agreement dialog again
set to 0 to display dialog on every reload | integer >= 0 | 3 | | `demo` | set to **true** to enable demo mode by default | boolean | false | `regions` | array of regions names to enable | thorax, abdomen, limbs, head | [thorax, abdomen, limbs, head] | | `useExternal` | detemines the ability to use an external detection server:
**none** - external server cannot be configured
**optional** - external server can be configured in the app's settings page
**list** - external server can be selected in the app's settings page but only the configured server(s) may be selected
**required** - external server settings from conf file will be used by default and disable server options in the settings page | none, optional, list, required | **optional** | -| `external` | properties of the external server(s) ALVINN may connect t.
This setting must be a single element array if **useExternal** is set to **required**.
This setting must be an array of one or more elements if **useExternal** is set to **list** | external server settings array | []| +| `external` | properties of the external server(s) ALVINN may connect to
This setting must be a single element array if **useExternal** is set to **required**.
This setting must be an array of one or more elements if **useExternal** is set to **list** | external server settings array | []| +| `infoUrl` | root url for links to information about identified structures
Structure labels with spaces replaced by underscores will be appended to this value for full information links (*e.g.,* Abdominal_diapragm) | string | info link not shown | ### External server settings ALVINN can use an external object detection server instead of the built in models; settings for that external server are configured here. These settings must be configured if **site - useExternal** is set to **list** or **required**. diff --git a/public/conf/conf.yaml b/public/conf/conf.yaml index 33dc9dc..3b93e9e 100644 --- a/public/conf/conf.yaml +++ b/public/conf/conf.yaml @@ -10,4 +10,5 @@ external: port: 9001 - name: Georgi lab server address: "10.188.0.98" - port: 9001 \ No newline at end of file + port: 9001 +infoUrl: http://anatlabwiki.midwestern.edu/vetlab/index.php/ \ No newline at end of file diff --git a/src/components/app.vue b/src/components/app.vue index 29833c1..0e6e869 100644 --- a/src/components/app.vue +++ b/src/components/app.vue @@ -96,6 +96,7 @@ } store().set('enabledRegions',this.siteConf?.regions) store().set('siteDemo',this.siteConf?.demo) + store().set('infoUrl',this.siteConf?.infoUrl) const loadServerSettings = localStorage.getItem('serverSettings') if (this.siteConf?.useExternal) { if (!['none','list','optional','required'].includes(this.siteConf.useExternal)) { diff --git a/src/css/detect.css b/src/css/detect.css index 0c401f7..3070cd9 100644 --- a/src/css/detect.css +++ b/src/css/detect.css @@ -127,6 +127,15 @@ align-self: center; } +.structure-info { + position: absolute; + transform: translate(-50%,-50%); + z-index: 3; + color: rgb(15, 32, 108); + background: yellow; + border-radius: 100%; +} + /*Additional styles for small format landscape orientation*/ @media (max-height: 450px) and (orientation: landscape) { .detect-grid { diff --git a/src/js/store.js b/src/js/store.js index abfc8b6..7540885 100644 --- a/src/js/store.js +++ b/src/js/store.js @@ -8,7 +8,8 @@ const state = reactive({ fullscreen: false, useExternal: 'optional', siteDemo: false, - externalServerList: [] + externalServerList: [], + infoUrl: false }) const set = (config, confObj) => { @@ -48,6 +49,7 @@ export default () => ({ getRegions: computed(() => state.enabledRegions), getVersion: computed(() => state.version), getIconSet: computed(() => state.regionIconSet), + getInfoUrl: computed(() => state.infoUrl), set, agree, getServerList, diff --git a/src/pages/detect.vue b/src/pages/detect.vue index 7ffada9..8761971 100644 --- a/src/pages/detect.vue +++ b/src/pages/detect.vue @@ -16,6 +16,15 @@ Capture +
r.resultIndex == this.selectedChip) + return this.getInfoUrl + structure.label.replaceAll(' ','_') } }, methods: { @@ -343,10 +358,12 @@ } const boxCoords = this.box2cvs(this.resultData.detections[iChip])[0] + this.infoLinkPos.x = boxCoords.cvsLeft + this.infoLinkPos.y = boxCoords.cvsTop - var boxLeft = boxCoords.cvsLeft - var boxTop = boxCoords.cvsTop - var boxWidth = boxCoords.cvsRight - boxCoords.cvsLeft + let boxLeft = boxCoords.cvsLeft + let boxTop = boxCoords.cvsTop + let boxWidth = boxCoords.cvsRight - boxCoords.cvsLeft var boxHeight = boxCoords.cvsBottom - boxCoords.cvsTop imageCtx.strokeRect(boxLeft,boxTop,boxWidth,boxHeight) this.selectedChip = iChip