2018-12-14 15:23:48 +01:00
|
|
|
import React from 'react';
|
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
|
import { BrowserRouter } from 'react-router-dom';
|
|
|
|
|
import { Provider } from 'react-redux';
|
2018-12-19 09:41:30 +01:00
|
|
|
import { createStore, combineReducers } from 'redux';
|
2018-12-14 15:23:48 +01:00
|
|
|
import App from './App.js';
|
2018-12-17 17:23:03 +01:00
|
|
|
import OHIF from 'ohif-core';
|
2018-12-14 15:23:48 +01:00
|
|
|
import './config';
|
2018-12-19 09:41:30 +01:00
|
|
|
import ui from './redux/ui.js'
|
2019-01-07 11:18:59 +01:00
|
|
|
import Icons from "./images/icons.svg"
|
2018-12-14 15:23:48 +01:00
|
|
|
|
2018-12-19 09:41:30 +01:00
|
|
|
const reducers = OHIF.redux.reducers;
|
|
|
|
|
reducers.ui = ui;
|
|
|
|
|
|
|
|
|
|
const combined = combineReducers(reducers)
|
|
|
|
|
const store = createStore(combined);
|
2018-12-14 15:23:48 +01:00
|
|
|
|
2019-01-06 21:59:25 +01:00
|
|
|
const defaultButtons = [
|
|
|
|
|
{
|
2019-01-07 14:00:54 +01:00
|
|
|
command: 'StackScroll',
|
2019-01-06 21:59:25 +01:00
|
|
|
type: 'tool',
|
2019-01-07 14:00:54 +01:00
|
|
|
text: 'Stack Scroll',
|
|
|
|
|
svgUrl: `${Icons}#icon-tools-stack-scroll`,
|
2019-01-06 21:59:25 +01:00
|
|
|
active: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
command: 'Zoom',
|
|
|
|
|
type: 'tool',
|
|
|
|
|
text: 'Zoom',
|
2019-01-07 11:18:59 +01:00
|
|
|
svgUrl: `${Icons}#icon-tools-zoom`,
|
2019-01-06 21:59:25 +01:00
|
|
|
active: false
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-01-07 14:00:54 +01:00
|
|
|
command: 'Wwwc',
|
2019-01-06 21:59:25 +01:00
|
|
|
type: 'tool',
|
2019-01-07 14:00:54 +01:00
|
|
|
text: 'Levels',
|
|
|
|
|
svgUrl: `${Icons}#icon-tools-levels`,
|
|
|
|
|
active: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
command: 'Pan',
|
|
|
|
|
type: 'tool',
|
|
|
|
|
text: 'Pan',
|
|
|
|
|
svgUrl: `${Icons}#icon-tools-pan`,
|
2019-01-06 21:59:25 +01:00
|
|
|
active: false
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-01-07 14:00:54 +01:00
|
|
|
command: 'Length',
|
2019-01-06 21:59:25 +01:00
|
|
|
type: 'tool',
|
2019-01-07 14:00:54 +01:00
|
|
|
text: 'Length',
|
|
|
|
|
svgUrl: `${Icons}#icon-tools-measure-temp`,
|
|
|
|
|
active: false
|
|
|
|
|
},
|
|
|
|
|
/*{
|
|
|
|
|
command: 'Annotate',
|
|
|
|
|
type: 'tool',
|
|
|
|
|
text: 'Annotate',
|
|
|
|
|
svgUrl: `${Icons}#icon-tools-measure-non-target`,
|
|
|
|
|
active: false
|
|
|
|
|
},*/
|
|
|
|
|
{
|
|
|
|
|
command: 'Angle',
|
|
|
|
|
type: 'tool',
|
|
|
|
|
text: 'Angle',
|
|
|
|
|
iconClasses: 'fa fa-angle-left',
|
|
|
|
|
active: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
command: 'Bidirectional',
|
|
|
|
|
type: 'tool',
|
|
|
|
|
text: 'Bidirectional',
|
|
|
|
|
svgUrl: `${Icons}#icon-tools-measure-target`,
|
2019-01-06 21:59:25 +01:00
|
|
|
active: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
command: 'reset',
|
|
|
|
|
type: 'command',
|
|
|
|
|
text: 'Reset',
|
2019-01-07 11:18:59 +01:00
|
|
|
svgUrl: `${Icons}#icon-tools-reset`,
|
2019-01-06 21:59:25 +01:00
|
|
|
active: false
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
store.dispatch({
|
|
|
|
|
type: 'SET_AVAILABLE_BUTTONS',
|
|
|
|
|
buttons: defaultButtons
|
|
|
|
|
});
|
|
|
|
|
|
2018-12-17 17:23:03 +01:00
|
|
|
const servers = {
|
|
|
|
|
dicomWeb: [
|
|
|
|
|
{
|
|
|
|
|
"name": "DCM4CHEE",
|
2018-12-31 13:26:38 +01:00
|
|
|
//"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",
|
|
|
|
|
"wadoUriRoot": "https://dcm4che.ohif.club/dcm4chee-arc/aets/DCM4CHEE/wado",
|
|
|
|
|
"qidoRoot": "https://dcm4che.ohif.club/dcm4chee-arc/aets/DCM4CHEE/rs",
|
|
|
|
|
"wadoRoot": "https://dcm4che.ohif.club/dcm4chee-arc/aets/DCM4CHEE/rs",
|
2018-12-17 17:23:03 +01:00
|
|
|
"qidoSupportsIncludeField": true,
|
|
|
|
|
"imageRendering": "wadors",
|
|
|
|
|
"thumbnailRendering": "wadors",
|
|
|
|
|
"requestOptions": {
|
|
|
|
|
"requestFromBrowser": true,
|
|
|
|
|
"logRequests": true,
|
|
|
|
|
"logResponses": false,
|
|
|
|
|
"logTiming": true,
|
2018-12-31 13:26:38 +01:00
|
|
|
//"auth": "admin:admin"
|
|
|
|
|
"auth": "cloud:healthcare"
|
2018-12-17 17:23:03 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
OHIF.utils.addServers(servers, store);
|
|
|
|
|
|
2018-12-14 15:23:48 +01:00
|
|
|
// TODO[react] Use a provider when the whole tree is React
|
|
|
|
|
window.store = store;
|
|
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
|
<Provider store={store}>
|
|
|
|
|
<BrowserRouter>
|
|
|
|
|
<App store={store}/>
|
|
|
|
|
</BrowserRouter>
|
|
|
|
|
</Provider>,
|
|
|
|
|
document.getElementById('root')
|
|
|
|
|
);
|