Commands
Measurements
- The
deleteMeasurement
command has been completely removed from the codebase It has been replaced byremoveMeasurement
command with enhanced functionality
- Replace any usage of
deleteMeasurement
withremoveMeasurement
in your custom code
- commandsManager.run('deleteMeasurement', { uid });
+ commandsManager.run('removeMeasurement', { uid });
Important Notes:
- This change is part of a broader refactoring of the measurement system to provide more consistent and powerful APIs
- The new command structure follows a more consistent pattern throughout the codebase
- If you were using
measurementServiceSource.remove(uid)
directly, you should now usemeasurementService.remove(uid)
instead - The changes affect both UI components and any extensions that integrate with the measurement system
- Removal functionality now works with both individual UIDs and arrays of UIDs for batch operations
setSourceViewportForReferenceLinesTool
setSourceViewportForReferenceLinesTool
has been replaced by the more genericsetViewportForToolConfiguration
- The new API allows configuration of any tool, not just the ReferenceLinesTool
- Tool name is now a required parameter, not hardcoded to ReferenceLinesTool
Migration Steps:
- Update command references from
setSourceViewportForReferenceLinesTool
tosetViewportForToolConfiguration
- {
- commandName: 'setSourceViewportForReferenceLinesTool',
- context: 'CORNERSTONE',
- }
+ {
+ commandName: 'setViewportForToolConfiguration',
+ commandOptions: {
+ toolName: 'ReferenceLines'
+ },
+ context: 'CORNERSTONE',
+ }