-
Notifications
You must be signed in to change notification settings - Fork 47
Configuration
Single-page documentation for the most important Slim configuration options.
The app is configured via a JavaScript file under public/config/ (for example
public/config/local.js). Select the file at build time with the
REACT_APP_CONFIG environment variable.
For the full type definitions, see src/AppConfig.d.ts.
Example configs live in public/config/.
Canonical copy in the repository: docs/CONFIGURATION.md.
- External DICOMweb server
- Runtime server selection (header button)
- Secondary GCP data source (
gcpquery parameter) - Annotation colors
- Read-only mode and worklist
- Local deployment tips
- Related documentation
Point Slim at any DICOMweb-conformant archive by setting servers in the config
file:
window.config = {
path: '/',
servers: [
{
id: 'local',
url: 'http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs',
write: true,
},
],
}Notes:
-
urlmust be the DICOMweb root (QIDO-RS / WADO-RS / STOW-RS base), not a study or series URL. -
write: trueenables storing annotations back to that server. - Optional path prefixes (
qidoPathPrefix,wadoPathPrefix,stowPathPrefix) andupgradeInsecureRequestsare documented in the README. - For Google Cloud Healthcare, see the GCP deployment section in the README (includes OIDC settings).
Slim can let users change the active DICOMweb endpoint at runtime without rebuilding the app. This is the feature described in issue #5 (“configurable servers” / external server via the UI).
Set enableServerSelection to true in the config:
window.config = {
path: '/',
servers: [
{
id: 'default',
url: 'https://example.com/dicomweb',
write: false,
},
],
enableServerSelection: true,
}When enabled, an API / server button appears in the header (Ant Design
ApiOutlined icon; often referred to as the “link” icon in discussions).
Clicking it opens the Select DICOMweb server dialog.
Reference configs that already enable this:
- Choose Use default server to restore the server from the config file, or Use custom server to enter another endpoint.
- For a custom server, paste either:
- a full DICOMweb URL, e.g.
https://healthcare.googleapis.com/v1/projects/.../dicomStores/.../dicomWeb - a GCP Healthcare path without the domain, e.g.
/projects/my-project/locations/us-central1/datasets/my-dataset/dicomStores/my-store(Slim prependshttps://healthcare.googleapis.com/v1and appends/dicomWeb; override the base withgcpBaseUrlif needed)
- a full DICOMweb URL, e.g.
- Leading/trailing spaces in the URL are trimmed automatically.
The selected custom URL is stored in localStorage (slim_selected_server) so
it persists across reloads. Authorization is re-applied when switching servers.
You can load images from the primary configured server and pull annotations /
derived datasets from a second Google Cloud Healthcare DICOMweb store by adding
a gcp query parameter to the viewer URL:
https://<slim-host>/studies/<StudyInstanceUID>/series/<SeriesInstanceUID>?gcp=https://healthcare.googleapis.com/v1/projects/<project>/locations/<location>/datasets/<dataset>/dicomStores/<store>/dicomWeb
Behavior:
- Slim registers a server with id
gcp_secondary_annotation_server. - That secondary server is limited to annotation / derived storage classes (Comprehensive SR, Segmentation, Microscopy Bulk Simple Annotations, Parametric Map, presentation states, etc.).
- The primary
serversentry remains the main image data source.
Optional: set gcpBaseUrl when path-only GCP URLs should resolve against a
non-default API version (defaults to https://healthcare.googleapis.com/v1):
window.config = {
gcpBaseUrl: 'https://healthcare.googleapis.com/v1beta1',
// ...
}Commented examples appear in public/config/example.js.
Related enhancement request for loading all data from both stores: issue #320.
Each entry in annotations can define a style used when drawing ROIs for that
finding code. Colors are RGBA arrays ([r, g, b, a] with channels 0–255 for
RGB and 0–1 for alpha):
window.config = {
annotations: [
{
finding: {
value: '85756007',
schemeDesignator: 'SCT',
meaning: 'Tissue',
},
geometryTypes: ['polygon', 'freehandpolygon'],
style: {
stroke: {
color: [255, 255, 0, 1],
width: 2,
},
fill: {
color: [255, 255, 255, 0.2],
},
},
},
{
finding: {
value: '108369006',
schemeDesignator: 'SCT',
meaning: 'Tumor',
},
geometryTypes: ['polygon', 'freehandpolygon'],
style: {
stroke: {
color: [255, 0, 255, 1],
width: 2,
},
fill: {
color: [255, 255, 255, 0.2],
},
},
},
],
}See public/config/local.js for a full working
example with several findings and colors.
If style is omitted for a finding, Slim falls back to the default ROI style
(yellow stroke) or assigns colors from an internal palette when formatting
loaded annotations.
While viewing a slide, users can change the color / opacity of individual annotations (or annotation groups) from the annotation panel. Those runtime changes update the on-screen style for the corresponding finding key.
The highlight style applied when an ROI is selected is currently fixed in
the viewer code (blue stroke [0, 153, 255]) and is not configurable via
window.config. Per-finding default colors above control the unselected
appearance.
Set disableAnnotationTools: true for a read-only deployment (view images and
existing annotations, but hide creation / editing tools):
window.config = {
// ...
disableAnnotationTools: true,
}Default is false (tools enabled).
Set disableWorklist: true to skip the study worklist and hide worklist
navigation. Useful when Slim is embedded with deep links to a specific study or
series:
window.config = {
// ...
disableWorklist: true,
}Default is false (worklist enabled).
Example combining both flags:
window.config = {
path: '/',
servers: [{ id: 'readonly', url: 'https://example.com/dicomweb', write: false }],
disableWorklist: true,
disableAnnotationTools: true,
enableServerSelection: false,
}docker-compose up -d serves Slim at http://localhost:8008 and exposes
DICOMweb at:
http://localhost:8008/dcm4chee-arc/aets/DCM4CHEE/rs
That URL is already set in public/config/local.js.
If you point Slim at Orthanc (or any other DICOMweb server) instead of the compose stack, use that server’s DICOMweb root, for example:
servers: [
{
id: 'orthanc',
url: 'http://localhost:8042/dicom-web',
write: true,
},
]If the browser shows a communication / search-for-studies error while curl
against the same URL succeeds, check:
-
CORS – the DICOMweb server must allow the Slim origin
(
http://localhost:3000in development, orhttp://localhost:8008when served from compose). Orthanc needs an explicit CORS configuration for cross-origin browser calls. -
Correct base URL – use the DICOMweb root (
.../dicom-webor.../rs), not a study page URL. - Mixed content – an HTTPS Slim deployment cannot call plain HTTP archives unless you terminate TLS in front of the archive or use a same-origin proxy.
-
Auth – secured endpoints need matching
oidcsettings in the config.