feat: Add extensibility for tmtv and segmentation modes
This commit is contained in:
22 files changed
+1192
-879
No files matched your search
@@ -3,17 +3,20 @@
|
||||
// Local development configuration.
|
||||
//
|
||||
// This is the default config for the dev server (`pnpm run dev`, `dev:fast`,
|
||||
// `start`). Like config/netlify.js it is full-featured — every data source is
|
||||
// enabled and the `?customization=` URL feature is ON via
|
||||
// `customizationUrlPrefixes` — so the whole app can be exercised locally. The
|
||||
// locked-down config/default.js is what a plain production build emits instead.
|
||||
// `start`). It is intentionally kept at parity with config/netlify.js (the
|
||||
// public demo deploy): every data source is enabled, the `?customization=` URL
|
||||
// feature is ON via `customizationUrlPrefixes`, and the same startup
|
||||
// `customizationService` modules are loaded — so the whole app, including
|
||||
// customizations, can be exercised locally exactly as it runs on the demo.
|
||||
// The locked-down config/default.js is what a plain production build emits
|
||||
// instead.
|
||||
window.config = {
|
||||
name: 'config/dev.js',
|
||||
routerBasename: null,
|
||||
// whiteLabeling: {},
|
||||
extensions: [],
|
||||
modes: [],
|
||||
customizationService: {},
|
||||
customizationService: ['@ohif/extension-default.customizationModule.theme'],
|
||||
|
||||
// URL-driven customizations (?customization=). The `default` prefix (no
|
||||
// slashes) is used for values without a leading slash; every other prefix
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// URL-loaded customization: segmentationAnnotationTools
|
||||
//
|
||||
// Enables the measurement/annotation tools inside the segmentation mode by
|
||||
// composing capability blocks the cornerstone extension already exports:
|
||||
//
|
||||
// - the annotation buttons are already registered by the mode (its button
|
||||
// list includes `cornerstone.toolbarButtons`), so the toolbar only needs a
|
||||
// `MeasurementTools` section added to the primary bar,
|
||||
// - the annotation tools themselves are added to the mode's tool groups via
|
||||
// `cornerstone.annotationToolGroupTools`,
|
||||
// - and the measurement panel is appended so annotations can be reviewed.
|
||||
//
|
||||
// Load it with `?customization=segmentationAnnotationTools`.
|
||||
{
|
||||
"global": {
|
||||
"cornerstone.segmentationModeToolbarSections": {
|
||||
"primary": { "$unshift": ["MeasurementTools"] },
|
||||
"MeasurementTools": {
|
||||
"$set": [
|
||||
"Length",
|
||||
"Bidirectional",
|
||||
"ArrowAnnotate",
|
||||
"EllipticalROI",
|
||||
"RectangleROI",
|
||||
"CircleROI",
|
||||
"PlanarFreehandROI",
|
||||
"SplineROI",
|
||||
"LivewireContour"
|
||||
]
|
||||
}
|
||||
},
|
||||
"segmentation.toolGroupAdditions": {
|
||||
"default": { "$push": ["cornerstone.annotationToolGroupTools"] },
|
||||
"mpr": { "$push": ["cornerstone.annotationToolGroupTools"] }
|
||||
},
|
||||
"segmentation.rightPanels": {
|
||||
"$push": ["@ohif/extension-cornerstone.panelModule.panelMeasurement"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// URL-loaded customization: segmentationEditing
|
||||
//
|
||||
// Adds segmentation editing to the basic and longitudinal (viewer) modes by
|
||||
// composing the capability blocks the cornerstone extension already exports:
|
||||
//
|
||||
// - the segmentation editing toolbar buttons and toolbox section wiring
|
||||
// (`cornerstone.segmentationToolbarButtons` / `cornerstone.segmentationToolbarSections`),
|
||||
// - the segmentation editing tools for the modes' tool groups
|
||||
// (`cornerstone.segmentationToolGroupTools`),
|
||||
// - the segmentation panels that render the editing toolbox
|
||||
// (`panelSegmentationWithToolsLabelMap` / `panelSegmentationWithToolsContour`),
|
||||
// - and enables editing in the segmentation panel.
|
||||
//
|
||||
// Both modes read the `basic.*` toolbar/tool-group customizations (longitudinal
|
||||
// extends the basic mode instance), so a single set of commands covers both;
|
||||
// only the right-panel lists are mode specific.
|
||||
//
|
||||
// Load it with `?customization=segmentationEditing`.
|
||||
{
|
||||
"global": {
|
||||
"basic.toolbarButtons": {
|
||||
"$push": ["cornerstone.segmentationToolbarButtons"]
|
||||
},
|
||||
"basic.toolbarSections": {
|
||||
"$push": ["cornerstone.segmentationToolbarSections"]
|
||||
},
|
||||
"basic.toolGroupAdditions": {
|
||||
"default": { "$push": ["cornerstone.segmentationToolGroupTools"] },
|
||||
"mpr": { "$push": ["cornerstone.segmentationToolGroupTools"] }
|
||||
},
|
||||
"basic.rightPanels": {
|
||||
"$set": [
|
||||
"@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsLabelMap",
|
||||
"@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsContour",
|
||||
"@ohif/extension-cornerstone.panelModule.panelMeasurement"
|
||||
]
|
||||
},
|
||||
"longitudinal.rightPanels": {
|
||||
"$set": [
|
||||
"@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsLabelMap",
|
||||
"@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsContour",
|
||||
"@ohif/extension-measurement-tracking.panelModule.trackedMeasurements"
|
||||
]
|
||||
},
|
||||
// The basic/longitudinal modes disable segmentation panel editing only
|
||||
// when no customization has expressed a preference, so this enables it.
|
||||
"panelSegmentation.disableEditing": { "$set": false }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user