moving config files from json to js objects and injecting them at example page
This commit is contained in:
parent
ceafbbcdb8
commit
7991b41287
@ -1,31 +0,0 @@
|
||||
{
|
||||
"servers": {
|
||||
"dicomWeb": [
|
||||
{
|
||||
"name": "DCM4CHEE",
|
||||
"wadoUriRoot": "https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
"qidoRoot": "https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"wadoRoot": "https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"qidoSupportsIncludeField": true,
|
||||
"imageRendering": "wadors",
|
||||
"thumbnailRendering": "wadors",
|
||||
"requestOptions": {
|
||||
"requestFromBrowser": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"oidc": [{
|
||||
"authServerUrl": "https://cancer.crowds-cure.org/auth/realms/dcm4che",
|
||||
"authRedirectUri": "http://localhost:5000/callback",
|
||||
"clientId": "crowds-cure-cancer",
|
||||
"postLogoutRedirectUri": "http://localhost:5000/logout-redirect.html",
|
||||
"responseType": "id_token token",
|
||||
"scope": "email profile openid",
|
||||
"revokeAccessTokenOnSignout": true,
|
||||
"extraQueryParams": {
|
||||
"kc_idp_hint": "crowds-cure-cancer-auth0-oidc",
|
||||
"client_id": "crowds-cure-cancer"
|
||||
}
|
||||
}]
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
{
|
||||
"servers": {
|
||||
"dicomWeb": [
|
||||
{
|
||||
"name": "DCM4CHEE",
|
||||
"wadoUriRoot": "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
"qidoRoot": "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"wadoRoot": "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"qidoSupportsIncludeField": true,
|
||||
"imageRendering": "wadors",
|
||||
"thumbnailRendering": "wadors",
|
||||
"requestOptions": {
|
||||
"requestFromBrowser": true,
|
||||
"auth": "admin:admin"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
{
|
||||
"servers": {
|
||||
"dicomWeb": [
|
||||
{
|
||||
"name": "Orthanc",
|
||||
"wadoUriRoot": "http://localhost:8042/wado",
|
||||
"qidoRoot": "http://localhost:8042/dicom-web",
|
||||
"wadoRoot": "http://localhost:8042/dicom-web",
|
||||
"qidoSupportsIncludeField": false,
|
||||
"imageRendering": "wadors",
|
||||
"thumbnailRendering": "wadors",
|
||||
"requestOptions": {
|
||||
"auth": "orthanc:orthanc",
|
||||
"logRequests": true,
|
||||
"logResponses": false,
|
||||
"logTiming": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"servers": {
|
||||
"dicomWeb": [
|
||||
{
|
||||
"name": "DCM4CHEE",
|
||||
"wadoUriRoot": "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
"qidoRoot": "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"wadoRoot": "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"qidoSupportsIncludeField": true,
|
||||
"imageRendering": "wadors",
|
||||
"thumbnailRendering": "wadors",
|
||||
"requestOptions": {
|
||||
"requestFromBrowser": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
36
config/ccc.js
Normal file
36
config/ccc.js
Normal file
@ -0,0 +1,36 @@
|
||||
dicomWebServers = {
|
||||
servers: {
|
||||
dicomWeb: [
|
||||
{
|
||||
name: "DCM4CHEE",
|
||||
wadoUriRoot:
|
||||
"https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
qidoRoot:
|
||||
"https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
wadoRoot:
|
||||
"https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
qidoSupportsIncludeField: true,
|
||||
imageRendering: "wadors",
|
||||
thumbnailRendering: "wadors",
|
||||
requestOptions: {
|
||||
requestFromBrowser: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
oidc: [
|
||||
{
|
||||
authServerUrl: "https://cancer.crowds-cure.org/auth/realms/dcm4che",
|
||||
authRedirectUri: "http://localhost:5000/callback",
|
||||
clientId: "crowds-cure-cancer",
|
||||
postLogoutRedirectUri: "http://localhost:5000/logout-redirect.html",
|
||||
responseType: "id_token token",
|
||||
scope: "email profile openid",
|
||||
revokeAccessTokenOnSignout: true,
|
||||
extraQueryParams: {
|
||||
kc_idp_hint: "crowds-cure-cancer-auth0-oidc",
|
||||
client_id: "crowds-cure-cancer"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
19
config/local_dcm4chee.js
Normal file
19
config/local_dcm4chee.js
Normal file
@ -0,0 +1,19 @@
|
||||
dicomWebServers = {
|
||||
servers: {
|
||||
dicomWeb: [
|
||||
{
|
||||
name: "DCM4CHEE",
|
||||
wadoUriRoot: "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
qidoRoot: "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
wadoRoot: "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
qidoSupportsIncludeField: true,
|
||||
imageRendering: "wadors",
|
||||
thumbnailRendering: "wadors",
|
||||
requestOptions: {
|
||||
requestFromBrowser: true,
|
||||
auth: "admin:admin"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
21
config/local_orthanc.js
Normal file
21
config/local_orthanc.js
Normal file
@ -0,0 +1,21 @@
|
||||
dicomWebServers = {
|
||||
servers: {
|
||||
dicomWeb: [
|
||||
{
|
||||
name: "Orthanc",
|
||||
wadoUriRoot: "http://localhost:8899/wado",
|
||||
qidoRoot: "http://localhost:8899/dicom-web",
|
||||
wadoRoot: "http://localhost:8899/dicom-web",
|
||||
qidoSupportsIncludeField: false,
|
||||
imageRendering: "wadors",
|
||||
thumbnailRendering: "wadors",
|
||||
requestOptions: {
|
||||
auth: "orthanc:orthanc",
|
||||
logRequests: true,
|
||||
logResponses: false,
|
||||
logTiming: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
18
config/public_dicomweb.js
Normal file
18
config/public_dicomweb.js
Normal file
@ -0,0 +1,18 @@
|
||||
dicomWebServers = {
|
||||
servers: {
|
||||
dicomWeb: [
|
||||
{
|
||||
name: "DCM4CHEE",
|
||||
wadoUriRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
qidoRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
wadoRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
qidoSupportsIncludeField: true,
|
||||
imageRendering: "wadors",
|
||||
thumbnailRendering: "wadors",
|
||||
requestOptions: {
|
||||
requestFromBrowser: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -1,29 +1,53 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="description" content="Open Health Imaging Foundation DICOM Viewer">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<link rel="shortcut icon" type="image/png" href="/images/logo.png" sizes="16x16 32x32 64x64">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta
|
||||
name="description"
|
||||
content="Open Health Imaging Foundation DICOM Viewer"
|
||||
/>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no"
|
||||
/>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
type="image/png"
|
||||
href="/images/logo.png"
|
||||
sizes="16x16 32x32 64x64"
|
||||
/>
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta http-equiv="cleartype" content="on" />
|
||||
<meta name="MobileOptimized" content="320" />
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
||||
<link rel="manifest" href="./manifest.json">
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="manifest" href="./manifest.json" />
|
||||
<link rel="stylesheet" href="index.css" />
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
|
||||
<!-- WEB FONTS -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Sanchez" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
|
||||
<!-- WEB FONTS -->
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Sanchez"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
|
||||
integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
|
||||
<title>OHIF Standalone Viewer</title>
|
||||
<base href="http://localhost:5000/">
|
||||
<base href="http://localhost:5000/" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -37,168 +61,49 @@
|
||||
<!-- Note: when deploying, replace "development.js" with "production.min.js". -->
|
||||
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
|
||||
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
|
||||
<!--<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
|
||||
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>!-->
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
var process = {
|
||||
"env": {
|
||||
"NODE_ENV": "production"
|
||||
}
|
||||
};
|
||||
var process = {
|
||||
env: {
|
||||
NODE_ENV: "production"
|
||||
}
|
||||
};
|
||||
|
||||
window.process = process;
|
||||
window.process = process;
|
||||
</script>
|
||||
<!--<script src="https://unpkg.com/ohif-viewer/dist/index.umd.js" crossorigin></script>!-->
|
||||
|
||||
<script src="deps/index.umd.js" crossorigin></script>
|
||||
<!--<script src="/node_modules/ohif-viewer/dist/index.umd.js" crossorigin></script>!-->
|
||||
|
||||
<!-- Load our React component. -->
|
||||
<script src="servers.js"></script>
|
||||
<script>
|
||||
var props = {"routerBasename": "/", rootUrl: "http://localhost:5000"};
|
||||
/* props.servers = {
|
||||
"dicomWeb": [{
|
||||
"name": "DCM4CHEE",
|
||||
"wadoUriRoot": "https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
"qidoRoot": "https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"wadoRoot": "https://cancer.crowds-cure.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"qidoSupportsIncludeField": true,
|
||||
"imageRendering": "wadors",
|
||||
"thumbnailRendering": "wadors",
|
||||
"requestOptions": {
|
||||
"requestFromBrowser": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"oidc": [{
|
||||
"authServerUrl": "https://cancer.crowds-cure.org/auth/realms/dcm4che",
|
||||
"authRedirectUri": "http://localhost:5000/callback",
|
||||
"postLogoutRedirectUri": "http://localhost:5000/logout-redirect.html",
|
||||
"clientId": "crowds-cure-cancer",
|
||||
"responseType": "id_token token",
|
||||
"scope": "email profile openid",
|
||||
"revokeAccessTokenOnSignout": true,
|
||||
"extraQueryParams": {
|
||||
"kc_idp_hint": "crowds-cure-cancer-auth0-oidc",
|
||||
"client_id": "crowds-cure-cancer"
|
||||
}
|
||||
}]
|
||||
}; */
|
||||
</script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
Example config with OIDC
|
||||
*/
|
||||
// Uncomment the next two blocks, comment out the config without OIDC
|
||||
// Try going to:
|
||||
// http://localhost:5000/viewer/1.3.6.1.4.1.25403.345050719074.3824.20170126082328.1
|
||||
// http://ohif-viewer-react.s3-website-us-east-1.amazonaws.com/viewer/1.3.6.1.4.1.25403.345050719074.3824.20170126082328.1
|
||||
|
||||
/* Example config without OIDC */
|
||||
// Try going to:
|
||||
// http://localhost:5000/viewer/1.3.6.1.4.1.14519.5.2.1.1706.4996.216859690032335293073513900362
|
||||
props.servers = {
|
||||
"dicomWeb": [
|
||||
{
|
||||
"name": "DCM4CHEE",
|
||||
"wadoUriRoot": "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
"qidoRoot": "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"wadoRoot": "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
"qidoSupportsIncludeField": true,
|
||||
"imageRendering": "wadors",
|
||||
"thumbnailRendering": "wadors",
|
||||
"requestOptions": {
|
||||
"requestFromBrowser": true
|
||||
}
|
||||
}
|
||||
]
|
||||
// "dicomWeb": [
|
||||
// {
|
||||
// "name": "Orthanc",
|
||||
// "wadoUriRoot": "http://localhost:8899/wado",
|
||||
// "qidoRoot": "http://localhost:8899/dicom-web",
|
||||
// "wadoRoot": "http://localhost:8899/dicom-web",
|
||||
// "qidoSupportsIncludeField": false,
|
||||
// "imageRendering": "wadors",
|
||||
// "thumbnailRendering": "wadors",
|
||||
// "requestOptions": {
|
||||
// "auth": "orthanc:orthanc",
|
||||
// "logRequests": true,
|
||||
// "logResponses": false,
|
||||
// "logTiming": true
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// "dicomWeb": [
|
||||
// {
|
||||
// "name": "DCM4CHEE",
|
||||
// "wadoUriRoot": "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
// "qidoRoot": "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
// "wadoRoot": "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
// "qidoSupportsIncludeField": true,
|
||||
// "imageRendering": "wadors",
|
||||
// "thumbnailRendering": "wadors",
|
||||
// "requestOptions": {
|
||||
// "requestFromBrowser": true,
|
||||
// "auth": "admin:admin"
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
UI settings
|
||||
Plugins
|
||||
- Custom tools / buttons
|
||||
- Custom Sidebar module thing
|
||||
- Custom Viewports
|
||||
- Custom Sop Class Interpreters
|
||||
*/
|
||||
|
||||
/*"PUBLIC_SETTINGS": {
|
||||
"ui": {
|
||||
"studyListFunctionsEnabled": true,
|
||||
"leftSidebarOpen": false,
|
||||
"displaySetNavigationLoopOverSeries": false,
|
||||
"displaySetNavigationMultipleViewports": true,
|
||||
"autoPositionMeasurementsTextCallOuts": "TRLB"
|
||||
},
|
||||
"prefetch": {
|
||||
"order": "topdown",
|
||||
"displaySetCount": 1
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
let props = { routerBasename: "/", rootUrl: "http://localhost:5000" };
|
||||
props.servers = dicomWebServers.servers;
|
||||
/*
|
||||
|
||||
White labelling example
|
||||
|
||||
// Note that you can't write JSX here, so you can use the online JSX compiler:
|
||||
// https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=GYVwdgxgLglg9mABACwKYBt1wBQEpEDeAUIogE6pQhlIA8AholPWQOaUC8ARAPoBG6emADWXchm5g4cAA6owqMoikVgiimTERBAZx0A5egFtU3NPQAmigLR8yQi2OSqzUKDIBcAei_2LMCHp0GCN6VhgwVgA6CDgjLgA-ElIU1LS02hDWRB0yCA4AcmQ3Tx8_AKCQsIjo2KMvAHcZa1iwKHkoLxAZLEsdLwAmAAYARgB2LxGRrwgyWTkLFrmZBetwMGNURYGomUiCxC8k9JOU2i96BIBuIgBfIiA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=react&prettier=false&targets=&version=6.26.0&envVersion=
|
||||
*/
|
||||
function RadicalImagingLogo() {
|
||||
return React.createElement(
|
||||
"a",
|
||||
{ target: "_blank", rel: "noopener noreferrer", className: "header-brand", href: "http://radicalimaging.com" },
|
||||
React.createElement("h5", {}, 'RADICAL IMAGING')
|
||||
);
|
||||
}
|
||||
function RadicalImagingLogo() {
|
||||
return React.createElement(
|
||||
"a",
|
||||
{
|
||||
target: "_blank",
|
||||
rel: "noopener noreferrer",
|
||||
className: "header-brand",
|
||||
href: "http://radicalimaging.com"
|
||||
},
|
||||
React.createElement("h5", {}, "RADICAL IMAGING")
|
||||
);
|
||||
}
|
||||
const Viewer = window.OHIFStandaloneViewer.App;
|
||||
const app = React.createElement(Viewer, props, null);
|
||||
|
||||
/*props.whiteLabelling = {
|
||||
logoComponent: RadicalImagingLogo()
|
||||
}*/
|
||||
|
||||
// TODO: Why do we need to do this? Something is wrong with our rollup settings
|
||||
var Viewer = window.OHIFStandaloneViewer.App;
|
||||
var app = React.createElement(Viewer, props, null);
|
||||
|
||||
ReactDOM.render(app, document.getElementById('root'));
|
||||
ReactDOM.render(app, document.getElementById("root"));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
19
example/servers.js
Normal file
19
example/servers.js
Normal file
@ -0,0 +1,19 @@
|
||||
// default public server
|
||||
dicomWebServers = {
|
||||
servers: {
|
||||
dicomWeb: [
|
||||
{
|
||||
name: "DCM4CHEE",
|
||||
wadoUriRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado",
|
||||
qidoRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
wadoRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
|
||||
qidoSupportsIncludeField: true,
|
||||
imageRendering: "wadors",
|
||||
thumbnailRendering: "wadors",
|
||||
requestOptions: {
|
||||
requestFromBrowser: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user