Files
ohif-viewer/platform/docs/versioned_docs/version-3.0/configuration/configuration.md
T

83 lines
3.0 KiB
Markdown
Raw Normal View History

2021-06-15 23:32:37 -04:00
---
2021-07-15 09:54:01 +02:00
sidebar_position: 3
sidebar_label: Configuration
2021-06-15 23:32:37 -04:00
---
2021-07-15 09:54:01 +02: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-15 23:32:37 -04: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-15 23:32:37 -04: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.
We maintain a number of common viewer application configurations at
2021-06-15 19:14:37 -04: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-06-15 23:32:37 -04:00
```js title="<root>/platform/viewer/public/configs"
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-15 19:14:37 -04:00
/** ... **/
},
2021-06-15 19:14:37 -04:00
httpErrorHandler: {
/** coming soon **/
},
extensions: [],
showStudyList: true,
filterQueryParam: false,
2021-06-15 19:14:37 -04:00
dataSources: [
{
friendlyName: 'dcmjs DICOMWeb Server',
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
2021-06-15 19:14:37 -04:00
sourceName: 'dicomweb',
configuration: {
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-15 19:14:37 -04:00
supportsReject: true,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
2021-06-15 19:14:37 -04:00
supportsFuzzyMatching: true,
supportsWildcard: true,
},
},
],
};
```
<!--
LINKS
-->
<!-- prettier-ignore-start -->
[config-dir]: https://github.com/OHIF/Viewers/tree/master/platform/viewer/public/config
<!-- prettier-ignore-end -->