* feat: Add extensibility for tmtv and segmentation modes * Fixes for ordering issues on laod * Remove unnecessary reference lookup * Chane side panel timing to fix tests * PR comments - change how mode definitions get created * Improvements to mode customizations * Start organizing customizations * Misc fixes for a customization demo page * Security fixes * PR requested changes to naming
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
// URL-loaded customization: segmentationAnnotationTools
|
|
//
|
|
// Enables the measurement/annotation tools inside the segmentation mode by
|
|
// composing capability packs the cornerstone extension already exports:
|
|
//
|
|
// - the annotation buttons are already registered by the mode (its
|
|
// `toolbarButtons` composition 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.annotationTools`,
|
|
// - and the measurement panel is appended so annotations can be reviewed.
|
|
//
|
|
// Everything is per-mode, so it all lives in the `mode` phase keyed by the
|
|
// segmentation mode's route name. The section tweak patches the mode's toolbar
|
|
// layout pack at Mode scope (reset on mode exit), and the tools/panels `$push`
|
|
// onto the values the mode seeds on enter.
|
|
//
|
|
// Load it with `?customization=segmentation/segmentationAnnotationTools`.
|
|
{
|
|
"mode": {
|
|
"segmentation": {
|
|
"cornerstone.segmentationModeToolbarSections": {
|
|
"primary": { "$unshift": ["MeasurementTools"] },
|
|
"MeasurementTools": {
|
|
"$set": [
|
|
"Length",
|
|
"Bidirectional",
|
|
"ArrowAnnotate",
|
|
"EllipticalROI",
|
|
"RectangleROI",
|
|
"CircleROI",
|
|
"PlanarFreehandROI",
|
|
"SplineROI",
|
|
"LivewireContour"
|
|
]
|
|
}
|
|
},
|
|
"toolGroupAdditions": {
|
|
"default": { "$push": [{ "$reference": "cornerstone.annotationTools" }] },
|
|
"mpr": { "$push": [{ "$reference": "cornerstone.annotationTools" }] }
|
|
},
|
|
"rightPanels": {
|
|
"$push": ["@ohif/extension-cornerstone.panelModule.panelMeasurement"]
|
|
}
|
|
}
|
|
}
|
|
}
|