Skip to content

Commit 7ca90c9

Browse files
koebelmmattelphil-davis
authored
update documentation (#66)
* update description of the app * adding pics to the description * add table of content * add paragraph about how to add web app to installation * add links to assets * adding draft for yaml & fix link * update installation section * update contributing and copyright section * update prerequisites * update development section * Apply suggestions from code review Co-authored-by: Martin <[email protected]> * fix minor typos and update table of content * update order of steps for development * adding section on how to add dicom viewer to the ocis deployment example * adding path to yml file * minor text changes and fixing anchor links * Apply suggestions from code review Co-authored-by: Martin <[email protected]> * Apply suggestions from code review Co-authored-by: Phil Davis <[email protected]> * adding point about CSP * Apply suggestions from code review Co-authored-by: Martin <[email protected]> --------- Co-authored-by: Martin <[email protected]> Co-authored-by: Phil Davis <[email protected]>
1 parent 950f0c7 commit 7ca90c9

File tree

1 file changed

+107
-26
lines changed

1 file changed

+107
-26
lines changed

README.md

+107-26
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,121 @@
66

77
The ownCloud Web DICOM Viewer app is an extension of [ownCloud Web](https://github.com/owncloud/web) to preview DICOM files (medical images and their corresponding metadata) in the browser. The preview of the medical images is based on MIT licensed [cornerstone3D](https://github.com/cornerstonejs/cornerstone3D).
88

9-
The current implementation allows to preview .dcm files and display their corresponding metadata in a sidebar on request. It offers image manipulation operations such as zoom, rotate, flip, invert and reset of the image preview. The UI is implemented in responsive manner and adapts the size of the image preview and the way how metadata is displayed to the screen size of the device.
109

11-
## Quick reference
10+
## Table of Contents
1211

13-
- **Where to file issues:**\
14-
[owncloud/web-app-dicom-viewer](https://github.com/owncloud/web-app-dicom-viewer/issues)
12+
* [Functionalities of DICOM Viewer Web Extension](#functionalities-of-dicom-viewer-web-extension)
13+
* [Adding DICOM Viewer to Your oCIS Installation](#adding-dicom-viewer-to-your-ocis-installation)
14+
* [Adding DICOM Viewer to the oCIS Deployment Example](#adding-dicom-viewer-to-the-ocis-deployment-example)
15+
* [Manual App Installation](#manual-app-installation)
16+
* [Build and Run DICOM Viewer for Development](#build-and-run-dicom-viewer-for-development)
17+
* [Contributing to DICOM Viewer Web Extension](#contributing-to-dicom-viewer-web-extension)
18+
* [Copyright](#copyright)
1519

16-
- **Supported architectures:**\
17-
`amd64`
1820

19-
## Installation
21+
## Functionalities of DICOM Viewer Web Extension
2022

21-
### 1. Install dependencies
23+
The current release allows previewing .dcm files within oCIS and displaying their corresponding metadata in a sidebar on request. It offers image manipulation operations such as zoom in and out, rotation, flipping, colour inversion and reset on the image preview. The app UI is implemented in a responsive manner and adapts the size of the image preview and the way that metadata is displayed to the screen size of the device.
2224

23-
```
25+
<img src="https://github.com/owncloud/awesome-ocis/blob/main/webApps/owncloud/web-app-dicom-viewer/screenshots/1.png" alt="app functionalities" style="width:48%; height:auto;"> &nbsp; &nbsp; <img src="https://github.com/owncloud/awesome-ocis/blob/main/webApps/owncloud/web-app-dicom-viewer/screenshots/4.png" alt="display of metadata" style="width:48%; height:auto;">
26+
27+
_The extension allows previewing a DICOM image and it's most important metadata. On request, all corresponding metadata of the file are displayed in the sidebar._
28+
29+
<img src="https://github.com/owncloud/awesome-ocis/blob/main/webApps/owncloud/web-app-dicom-viewer/screenshots/2.png" alt="app functionalities" style="width:48%; height:auto;"> &nbsp; &nbsp; <img src="https://github.com/owncloud/awesome-ocis/blob/main/webApps/owncloud/web-app-dicom-viewer/screenshots/3.png" alt="display of metadata" style="width:48%; height:auto;">
30+
31+
_The extension allows the user to zoom, rotate and flip the preview of the image. Inverting the colors of the preview is also supported._
32+
33+
34+
## Adding DICOM Viewer to Your oCIS Installation
35+
As oCIS administrator, you can add custom web applications for your users. By adding the DICOM Viewer to the oCIS WebUI, you enable your users to take advantage of the [functionalities of this web extension](#functionalities-of-dicom-viewer-web-extension).
36+
37+
38+
### Adding DICOM Viewer to the oCIS Deployment Example
39+
oCIS provides some [deployment examples](https://github.com/owncloud/ocis/tree/master/deployments/examples/) including detailed configuration step by step guides for [local production setup](https://doc.owncloud.com/ocis/next/depl-examples/ubuntu-compose/ubuntu-compose-prod.html) and [deployment of Infinite Scale on the Hetzner Cloud](https://doc.owncloud.com/ocis/next/depl-examples/ubuntu-compose/ubuntu-compose-hetzner.html).
40+
In both cases, it only takes a few very small and simple steps to add the DICOM Viewer Web Extension to the [`ocis_full` deployment example](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_full/) of your own installation:
41+
42+
1. Navigate to the `/opt/compose/ocis/ocis_full` folder of your installation and copy [`dicom-viewer.yml`](https://github.com/owncloud/web-app-dicom-viewer/blob/main/dicom-viewer.yml) into the [`web_extensions`](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_full/web_extensions) subfolder.
43+
44+
2. Add `DICOMVIEWER=:web_extensions/dicom-viewer.yml` to the `## oCIS Web Extensions ##` section of the `.env` file of your installation (file is located in `/opt/compose/ocis/ocis_full`).\
45+
Your `.env` file should now look like this:
46+
```
47+
## oCIS Web Extensions ##
48+
# It is possible to use the oCIS Web Extensions to add custom functionality to the oCIS frontend.
49+
# For more details see https://github.com/owncloud/web-extensions/blob/main/README.md
50+
51+
<list of all web extensions>
52+
53+
DICOMVIEWER=:web_extensions/dicom-viewer.yml
54+
```
55+
56+
3. Append `${DICOMVIEWER:-}` to the `COMPOSE_FILE` variable at the very end of the last line of the `.env` file. This variable combines the configs of all the components that need to be loaded.
57+
58+
`COMPOSE_FILE=docker-compose.yml${OCIS:-} ... <variables of lots of other configs that are added to docker compose> ... ${DICOMVIEWER:-}`
59+
60+
After appending `${DICOMVIEWER:-}`, your `.env` file should look like this:
61+
```
62+
## IMPORTANT ##
63+
# This MUST be the last line as it assembles the supplemental compose files to be used.
64+
# ALL supplemental configs must be added here, whether commented or not.
65+
# Each var must either be empty or contain :path/file.yml
66+
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${MONITORING:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${INBUCKET:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${DICOMVIEWER:-}
67+
```
68+
69+
4. Update the `csp.yaml` file located in `/config/ocis/csp.yaml` by adding the
70+
`"id": "com.github.owncloud.web-app-dicom-viewer"` block as shown in the [webApps/apps.json](https://github.com/owncloud/awesome-ocis/blob/main/webApps/apps.json) example.
71+
72+
Done! Have fun using the [functionalities of the DICOM Viewer web extension](#functionalities-of-dicom-viewer-web-extension) on your installation!
73+
74+
75+
### Manual App Installation
76+
77+
1. Download the zip file from the [releases page](https://github.com/owncloud/web-app-dicom-viewer/releases).
78+
2. Extract the zip file to the `apps` directory of your oCIS server. The `apps` directory is set using the `WEB_ASSET_APPS_PATH` environment variable.
79+
80+
#### Prerequisites
81+
82+
- Supported oCIS and Web Versions: oCIS (>= 6.2.x), Web (>= 9.x.x)
83+
- Supported Architectures: `amd64`
84+
85+
#### Additional Information
86+
87+
Have a look at the ownCloud Infinite Scale Deployment documentation to learn how to [extend the WebUI with apps](https://doc.owncloud.com/ocis/next/deployment/webui/webui-customisation.html#extend-web-ui-with-apps). You will find instructions how to [load custom applications](https://doc.owncloud.com/ocis/next/deployment/webui/webui-customisation.html#loading-applications) into your installation and get a better understanding of the web extension [application structure](https://doc.owncloud.com/ocis/next/deployment/webui/webui-customisation.html#application-structure) and [application configuration](https://doc.owncloud.com/ocis/next/deployment/webui/webui-customisation.html#application-configuration).
88+
89+
90+
## Build and Run DICOM Viewer for Development
91+
92+
### Prerequisites
93+
94+
- [Node.js `v18`](https://nodejs.org/en/)
95+
- [pnpm `v8`](https://pnpm.io/)
96+
- [Docker Compose](https://docs.docker.com/compose/)
97+
98+
99+
### 1. Install Dependencies
100+
101+
```bash
24102
pnpm install
25103
```
26104

27-
### 2. Build extension
105+
### 2. Run oCIS Server
106+
107+
```bash
108+
docker compose up
109+
```
110+
111+
### 3. Build the Extension
28112

29113
Build the extension using watch for development.
30114

31-
```
115+
```bash
32116
pnpm build:w
33117
```
34118

35-
### 3. Load apps
119+
### 4. Load the Extension
36120

37121
We can load the app into the oCIS server in two different ways, depending on the version of oCIS:
38122

39-
#### 1. For oCIS 5.0.0 (Seperate extension server)
123+
#### For oCIS 5.0.0 (Separate Extension Server)
40124

41125
Configure the extension in `web.config.json`
42126

@@ -61,31 +145,28 @@ Configure the extension in `web.config.json`
61145

62146
```
63147

64-
#### 2. For oCIS >= 5.1
148+
#### For oCIS >= 5.1
65149

66150
Copy `docker-compose.override.example.yml` to `docker-compose.override.yml`.
67151

68-
### 4. Run oCIS server
69152

70-
```
71-
docker compose up
72-
```
153+
### 5. Have Fun
73154

74-
## Docker Tags and respective Dockerfile links
155+
You can access oCIS WebUI with the DICOM Viewer extension through [localhost:9200](https://localhost:9200).
75156

76-
- [`latest`](https://github.com/owncloud/web-app-dicom-viewer/blob/master/docker/Dockerfile) available as `registry.owncloud.com/internal/web-app-dicom-viewer:latest`
77157

78-
## Default volumes
158+
### Docker Tags and Respective Dockerfile Links
79159

80-
None
160+
- [`latest`](https://github.com/owncloud/web-app-dicom-viewer/blob/master/docker/Dockerfile) available as `registry.owncloud.com/internal/web-app-dicom-viewer:latest`
161+
- Default volumes: None
162+
- Exposed ports: `8080`
163+
- Environment variables: None
81164

82-
## Exposed ports
83165

84-
- 8080
166+
## Contributing to DICOM Viewer Web Extension
85167

86-
## Environment variables
168+
Contribution in the form of bug reports, user feedback or actual code is always welcome! Please file issues [here](https://github.com/owncloud/web-app-dicom-viewer/issues).
87169

88-
None
89170

90171
## Copyright
91172

0 commit comments

Comments
 (0)