feat: ohifv3整合
This commit is contained in:
parent
e34c559670
commit
39f9f4d923
1
.env
1
.env
|
@ -19,3 +19,4 @@ POSTGRES_DB=orthanc
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
POSTGRES_USER=orthanc
|
POSTGRES_USER=orthanc
|
||||||
POSTGRES_PASSWORD=orthanc
|
POSTGRES_PASSWORD=orthanc
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"Name": "DICOM PACS",
|
"Name": "DICOM PACS",
|
||||||
"StorageDirectory": "/var/lib/orthanc/db",
|
"StorageDirectory": "/var/lib/orthanc/db",
|
||||||
"IndexDirectory": "",
|
"IndexDirectory": "",
|
||||||
"StorageCompression": true,
|
"StorageCompression": false,
|
||||||
"MaximumStorageSize": 0,
|
"MaximumStorageSize": 0,
|
||||||
"MaximumPatientCount": 0,
|
"MaximumPatientCount": 0,
|
||||||
"LuaScripts": [],
|
"LuaScripts": [],
|
||||||
|
|
|
@ -1,15 +1,31 @@
|
||||||
version: '3.6'
|
version: "3.6"
|
||||||
|
|
||||||
services:
|
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
|
image: osimis/orthanc:20.11.2
|
||||||
container_name: orthanc
|
container_name: orthanc
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '8042:8042'
|
- "8042:8042"
|
||||||
- '4242:4242'
|
- "4242:4242"
|
||||||
volumes:
|
volumes:
|
||||||
# 挂载orthanc.json配置
|
# 挂载orthanc.json配置
|
||||||
- ${ORTHANC_CONFIG}:/etc/orthanc/orthanc.json:ro
|
- ${ORTHANC_CONFIG}:/etc/orthanc/orthanc.json:ro
|
||||||
|
@ -20,29 +36,18 @@ services:
|
||||||
- POSTGRESQL_PLUGIN_ENABLED=true
|
- POSTGRESQL_PLUGIN_ENABLED=true
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
command: /etc/orthanc/orthanc.json
|
command: /etc/orthanc/orthanc.json
|
||||||
logging:
|
|
||||||
driver: "json-file"
|
|
||||||
options:
|
|
||||||
max-size: "800m"
|
|
||||||
|
|
||||||
postgres:
|
ohifv3:
|
||||||
image: postgres:13.1
|
image: ohif/viewer
|
||||||
container_name: postgres
|
container_name: ohif
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '5432:5432'
|
- "3000:80"
|
||||||
volumes:
|
|
||||||
# postgrel->data 挂载出来
|
|
||||||
- ${POSTGRES_DATA_MNT}:${PGDATA}
|
|
||||||
environment:
|
environment:
|
||||||
- PGDATA=${PGDATA}
|
- APP_CONFIG:/usr/share/nginx/html/app-config.js
|
||||||
- POSTGRES_DB=${POSTGRES_DB}
|
volumes:
|
||||||
- POSTGRES_USER=${POSTGRES_USER}
|
- ./ohifv3/ohif.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
- ./ohifv3/app-config.js:/usr/share/nginx/html/app-config.js:ro
|
||||||
- TZ=Asia/Shanghai
|
- ./ohifv3/logo.png:/usr/share/nginx/html/logo.png:ro
|
||||||
logging:
|
depends_on:
|
||||||
driver: "json-file"
|
- pacs
|
||||||
options:
|
|
||||||
max-size: "800m"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
141
ohifv3/app-config.js
Normal file
141
ohifv3/app-config.js
Normal 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
BIN
ohifv3/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
22
ohifv3/ohif.conf
Normal file
22
ohifv3/ohif.conf
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user