ohif-viewer/platform/app/public/customizations/tools/smoothRotate.jsonc
Bill Wallace b266c0a86a
feat: Add extensibility for tmtv and segmentation modes (#6128)
* 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
2026-07-10 12:43:17 -04:00

43 lines
1.3 KiB
Plaintext

// Example URL-loaded customization: smoothRotate
//
// Adds a "Smooth Rotate" tool button to the More Tools menu of the basic and
// longitudinal viewers. It activates the cornerstone `PlanarRotate` tool, which
// rotates the image freely as you drag (unlike the fixed 90° "Rotate Right").
//
// It extends the default toolbar customizations registered by the cornerstone
// extension (`cornerstone.toolbarButtons` / `cornerstone.toolbarSections`) using
// immutability-helper `$push` commands, so the built-in buttons are preserved.
//
// Load it with `?customization=tools/smoothRotate`.
{
"global": {
"cornerstone.toolbarButtons": {
"$push": [
{
"id": "SmoothRotate",
"uiType": "ohif.toolButton",
"props": {
"type": "tool",
// Re-use the existing rotate icon.
"icon": "tool-rotate-right",
"label": "Smooth Rotate",
"tooltip": "Smooth Rotate (drag to rotate the image freely)",
"commands": {
"commandName": "setToolActiveToolbar",
"commandOptions": {
"toolName": "PlanarRotate"
}
},
"evaluate": "evaluate.cornerstoneTool"
}
}
]
},
"cornerstone.toolbarSections": {
"MoreTools": {
"$push": ["SmoothRotate"]
}
}
}
}