2021-06-16 05:32:37 +02:00
|
|
|
---
|
2021-07-15 09:54:01 +02:00
|
|
|
sidebar_position: 3
|
|
|
|
|
sidebar_label: Configuration
|
2021-06-16 05:32:37 +02:00
|
|
|
---
|
2021-07-15 09:54:01 +02:00
|
|
|
|
2021-03-01 16:52:54 +01:00
|
|
|
# Viewer: Configuration
|
|
|
|
|
|
2021-07-15 09:54:01 +02:00
|
|
|
The OHIF Viewer Platform strives to be highly configurable and extensible. This
|
2021-06-16 05:32:37 +02:00
|
|
|
makes it easier for our community members to keep their "secret sauce" private,
|
2021-07-15 09:54:01 +02:00
|
|
|
and incentives contributions back to the platform. The `@ohif/viewer` project of
|
|
|
|
|
the platform is the lynchpin that combines everything to create our application.
|
2021-06-16 05:32:37 +02:00
|
|
|
|
2022-01-27 18:09:36 +01:00
|
|
|
There are two configuration mechanisms, one for run-time configuration, allowing
|
|
|
|
|
for changes to be decided based on including different configuration files as
|
|
|
|
|
specified by the 'theme' URL parameters. This mechanism is intended for
|
|
|
|
|
modifications of data exposed as configurable items by the existing code. See
|
|
|
|
|
sections below on configuring this type of value.
|
|
|
|
|
|
|
|
|
|
The other mechanism is the code-configuration mechanism that specifies load
|
|
|
|
|
time configuration. This is intended to load things that require code level
|
|
|
|
|
changes to OHIF such as adding a new viewer configuration. This is also used
|
|
|
|
|
for base definitions that are shared site-wide such as the data sources. This
|
|
|
|
|
was the original configuration mechanism provided, and some of the configurations
|
|
|
|
|
specified there are better suited to the run time loading, but are currently
|
|
|
|
|
left alone as there hasn't been time to move them.
|
|
|
|
|
|
2021-03-01 16:52:54 +01:00
|
|
|
We maintain a number of common viewer application configurations at
|
2021-06-16 01:14:37 +02:00
|
|
|
[`<root>/platform/viewer/public/configs`][config-dir].
|
|
|
|
|
|
2021-07-15 09:54:01 +02:00
|
|
|
You can take a look at how to use different configs in the
|
|
|
|
|
[Environment Variables](../platform/environment-variables)
|
2021-03-01 16:52:54 +01:00
|
|
|
|
2021-06-16 05:32:37 +02:00
|
|
|
```js title="<root>/platform/viewer/public/configs"
|
2021-03-01 16:52:54 +01:00
|
|
|
window.config = {
|
|
|
|
|
routerBasename: '/',
|
|
|
|
|
/**
|
|
|
|
|
* "White Labeling" is used to change the branding, look, and feel of the OHIF
|
|
|
|
|
* Viewer. These settings, and the color variables that are used by our components,
|
|
|
|
|
* are the easiest way to rebrand the application.
|
|
|
|
|
*
|
|
|
|
|
* More extensive changes are made possible through swapping out the UI library,
|
|
|
|
|
* Viewer project, or extensions.
|
|
|
|
|
*/
|
|
|
|
|
whiteLabeling: {
|
2021-06-16 01:14:37 +02:00
|
|
|
/** ... **/
|
2021-03-01 16:52:54 +01:00
|
|
|
},
|
2021-06-16 01:14:37 +02:00
|
|
|
httpErrorHandler: {
|
|
|
|
|
/** coming soon **/
|
2021-03-01 16:52:54 +01:00
|
|
|
},
|
|
|
|
|
extensions: [],
|
|
|
|
|
showStudyList: true,
|
|
|
|
|
filterQueryParam: false,
|
2021-06-16 01:14:37 +02:00
|
|
|
dataSources: [
|
|
|
|
|
{
|
|
|
|
|
friendlyName: 'dcmjs DICOMWeb Server',
|
2022-04-06 19:28:42 +02:00
|
|
|
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
|
2021-06-16 01:14:37 +02:00
|
|
|
sourceName: 'dicomweb',
|
|
|
|
|
configuration: {
|
2021-03-01 16:52:54 +01:00
|
|
|
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,
|
2021-06-16 01:14:37 +02:00
|
|
|
supportsReject: true,
|
2021-03-01 16:52:54 +01:00
|
|
|
imageRendering: 'wadors',
|
|
|
|
|
thumbnailRendering: 'wadors',
|
|
|
|
|
enableStudyLazyLoad: true,
|
2021-06-16 01:14:37 +02:00
|
|
|
supportsFuzzyMatching: true,
|
|
|
|
|
supportsWildcard: true,
|
2021-03-01 16:52:54 +01:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
```
|
|
|
|
|
|
2022-01-27 18:09:36 +01:00
|
|
|
|
2021-03-01 16:52:54 +01:00
|
|
|
<!--
|
|
|
|
|
LINKS
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<!-- prettier-ignore-start -->
|
|
|
|
|
[config-dir]: https://github.com/OHIF/Viewers/tree/master/platform/viewer/public/config
|
|
|
|
|
<!-- prettier-ignore-end -->
|