feat: ohifv3整合

This commit is contained in:
mozzie 2023-08-21 13:45:07 +08:00
parent e34c559670
commit 39f9f4d923
7 changed files with 196 additions and 27 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

1
.env
View File

@ -19,3 +19,4 @@ POSTGRES_DB=orthanc
POSTGRES_PORT=5432
POSTGRES_USER=orthanc
POSTGRES_PASSWORD=orthanc

View File

@ -2,7 +2,7 @@
"Name": "DICOM PACS",
"StorageDirectory": "/var/lib/orthanc/db",
"IndexDirectory": "",
"StorageCompression": true,
"StorageCompression": false,
"MaximumStorageSize": 0,
"MaximumPatientCount": 0,
"LuaScripts": [],

View File

@ -1,15 +1,31 @@
version: '3.6'
version: "3.6"
services:
orthanc:
postgres:
image: postgres:13.1
container_name: postgres
restart: always
ports:
- "5432:5432"
volumes:
# postgrel->data 挂载出来
- ${POSTGRES_DATA_MNT}:${PGDATA}
environment:
- PGDATA=${PGDATA}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- TZ=Asia/Shanghai
pacs:
image: osimis/orthanc:20.11.2
container_name: orthanc
depends_on:
- postgres
restart: always
ports:
- '8042:8042'
- '4242:4242'
- "8042:8042"
- "4242:4242"
volumes:
# 挂载orthanc.json配置
- ${ORTHANC_CONFIG}:/etc/orthanc/orthanc.json:ro
@ -20,29 +36,18 @@ services:
- POSTGRESQL_PLUGIN_ENABLED=true
- TZ=Asia/Shanghai
command: /etc/orthanc/orthanc.json
logging:
driver: "json-file"
options:
max-size: "800m"
postgres:
image: postgres:13.1
container_name: postgres
ohifv3:
image: ohif/viewer
container_name: ohif
restart: always
ports:
- '5432:5432'
volumes:
# postgrel->data 挂载出来
- ${POSTGRES_DATA_MNT}:${PGDATA}
- "3000:80"
environment:
- PGDATA=${PGDATA}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- TZ=Asia/Shanghai
logging:
driver: "json-file"
options:
max-size: "800m"
- APP_CONFIG:/usr/share/nginx/html/app-config.js
volumes:
- ./ohifv3/ohif.conf:/etc/nginx/conf.d/default.conf:ro
- ./ohifv3/app-config.js:/usr/share/nginx/html/app-config.js:ro
- ./ohifv3/logo.png:/usr/share/nginx/html/logo.png:ro
depends_on:
- pacs

141
ohifv3/app-config.js Normal file
View File

@ -0,0 +1,141 @@
window.config = {
routerBasename: '/',
extensions: [],
showStudyList: true,
filterQueryParam: false,
servers: {
dicomWeb: [
{
name: 'Orthanc',
wadoUriRoot: '/orthanc/wado',
qidoRoot: '/orthanc/dicom-web',
wadoRoot: '/orthanc/dicom-web',
qidoSupportsIncludeField: true,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
supportsFuzzyMatching: true,
},
],
},
whiteLabeling: {
/* Used to replace the default Logo */
createLogoComponentFn: function (React) {
return React.createElement('a', {
target: '_self',
rel: 'noopener noreferrer',
className: 'header-brand',
href: '/',
style: {
display: 'block',
background: 'url(/logo.png)',
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
width: '200px',
},
});
},
},
// Extensions should be able to suggest default values for these?
// Or we can require that these be explicitly set
hotkeys: [
// ~ Global
{
commandName: 'incrementActiveViewport',
label: 'Next Viewport',
keys: ['right'],
},
{
commandName: 'decrementActiveViewport',
label: 'Previous Viewport',
keys: ['left'],
},
// Supported Keys: https://craig.is/killing/mice
// ~ Cornerstone Extension
{ commandName: 'rotateViewportCW', label: 'Rotate Right', keys: ['r'] },
{ commandName: 'rotateViewportCCW', label: 'Rotate Left', keys: ['l'] },
{ commandName: 'invertViewport', label: 'Invert', keys: ['i'] },
{
commandName: 'flipViewportVertical',
label: 'Flip Horizontally',
keys: ['h'],
},
{
commandName: 'flipViewportHorizontal',
label: 'Flip Vertically',
keys: ['v'],
},
{ commandName: 'scaleUpViewport', label: 'Zoom In', keys: ['+'] },
{ commandName: 'scaleDownViewport', label: 'Zoom Out', keys: ['-'] },
{ commandName: 'fitViewportToWindow', label: 'Zoom to Fit', keys: ['='] },
{ commandName: 'resetViewport', label: 'Reset', keys: ['space'] },
// clearAnnotations
{ commandName: 'nextImage', label: 'Next Image', keys: ['down'] },
{ commandName: 'previousImage', label: 'Previous Image', keys: ['up'] },
// firstImage
// lastImage
{
commandName: 'previousViewportDisplaySet',
label: 'Previous Series',
keys: ['pagedown'],
},
{
commandName: 'nextViewportDisplaySet',
label: 'Next Series',
keys: ['pageup'],
},
// ~ Cornerstone Tools
{ commandName: 'setZoomTool', label: 'Zoom', keys: ['z'] },
// ~ Window level presets
{
commandName: 'windowLevelPreset1',
label: 'W/L Preset 1',
keys: ['1'],
},
{
commandName: 'windowLevelPreset2',
label: 'W/L Preset 2',
keys: ['2'],
},
{
commandName: 'windowLevelPreset3',
label: 'W/L Preset 3',
keys: ['3'],
},
{
commandName: 'windowLevelPreset4',
label: 'W/L Preset 4',
keys: ['4'],
},
{
commandName: 'windowLevelPreset5',
label: 'W/L Preset 5',
keys: ['5'],
},
{
commandName: 'windowLevelPreset6',
label: 'W/L Preset 6',
keys: ['6'],
},
{
commandName: 'windowLevelPreset7',
label: 'W/L Preset 7',
keys: ['7'],
},
{
commandName: 'windowLevelPreset8',
label: 'W/L Preset 8',
keys: ['8'],
},
{
commandName: 'windowLevelPreset9',
label: 'W/L Preset 9',
keys: ['9'],
},
],
cornerstoneExtensionConfig: {},
// studyListFunctionsEnabled is set to true to enable DICOM uploading
studyListFunctionsEnabled: true
};

BIN
ohifv3/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

22
ohifv3/ohif.conf Normal file
View File

@ -0,0 +1,22 @@
server {
listen 80;
# set client body size to 500M, this is to allow uploading of DICOMs, throws '413 request entity too large nginx' error otherwise #
client_max_body_size 500M;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# https://book.orthanc-server.com/faq/nginx.html#nginx
location /orthanc/ {
proxy_pass http://pacs:8042;
proxy_set_header HOST $host;
proxy_set_header X-Real-IP $remote_addr;
rewrite /orthanc(.*) $1 break;
}
}