-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(measurements): Provide for the Load (SR) measurements button to optionally clear existing measurements prior to loading the SR. #4586
Conversation
…optionally clear existing measurements prior to loading the SR. Refactored the load measurements code in OHIFCornerstoneSRMeasurementViewport.tsx to a new loadMeasurements command. The SR measurements viewport status bar now extracts the Load button from the 'loadMeasurements' toolbar. The Load button added to the toolbar defines the commands to be run. Typically this includes the loadMeasurements command and optionally the clearMeasurements command.
✅ Deploy Preview for ohif-dev canceled.
|
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some reformatting that was just done automagically. Hopefully it is all cool.
extensions/cornerstone-dicom-sr/src/components/OHIFCornerstoneSRMeasurementViewport.tsx
Outdated
Show resolved
Hide resolved
extensions/cornerstone-dicom-sr/src/components/OHIFCornerstoneSRMeasurementViewport.tsx
Outdated
Show resolved
Hide resolved
extensions/cornerstone-dicom-sr/src/components/OHIFCornerstoneSRMeasurementViewport.tsx
Outdated
Show resolved
Hide resolved
Append the various command options for loadMeasurements to the arguments to onInteraction. Moved the toolbar buttons and section out of the modes and into the cornerstone-dicom-sr extension onModeEnter hook. RT struct viewport status now uses ViewportActionButton.
…-measurements-to-be-added-to-loaded-SR-measurements
…ionally clear measurements for the non-tracked measurements' load.
extensions/cornerstone-dicom-rt/src/viewports/_getStatusComponent.tsx
Outdated
Show resolved
Hide resolved
extensions/cornerstone-dicom-seg/src/viewports/_getStatusComponent.tsx
Outdated
Show resolved
Hide resolved
extensions/cornerstone-dicom-sr/src/components/OHIFCornerstoneSRMeasurementViewport.tsx
Show resolved
Hide resolved
…ault load measurements button and toolbar are defined.
platform/ui/src/components/ViewportActionButton/ViewportActionButton.tsx
Show resolved
Hide resolved
extensions/cornerstone-dicom-seg/src/viewports/_getStatusComponent.tsx
Outdated
Show resolved
Hide resolved
extensions/cornerstone-dicom-rt/src/viewports/_getStatusComponent.tsx
Outdated
Show resolved
Hide resolved
extensions/cornerstone-dicom-sr/src/components/OHIFCornerstoneSRMeasurementViewport.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great addition, see my comments please
…-measurements-to-be-added-to-loaded-SR-measurements
… add a loadSRMeasurements button, but each defines different commands to run. The button added by the measurement-tracking is prioritized. The command for loading tracked measurements is defined in TrackedMeasurementsContext because it must be bound to the function that sends the measurement tracking event. Changes in ToolbarService include optionally replacing existing buttons in addButtons and avoiding duplicate buttons in a toolbar section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks much better, thanks minor comment
…-measurements-to-be-added-to-loaded-SR-measurements
forget about it 😉 |
…ed-to-loaded-SR-measurements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition
…nsion that was accidentally removed by PR OHIF#4586
Context
Prior to these changes, the load of SR measurements was confined to the
OHIFCornerstoneSRMeasurementViewport
. This meant that actions such as clearing the measurements prior to load were not easy to customize. Now the command(s) to run for the load are defined in a command and associated with a toolbar button.Changes & Results
Refactored the load measurements code in
OHIFCornerstoneSRMeasurementViewport.tsx
to a newloadMeasurements
command. The SR measurements viewport status bar now extracts the Load button to use from the 'loadMeasurements' toolbar. The Load button added to the toolbar defines the commands to be run. Typically this includes the (new)loadMeasurements
command and optionally theclearMeasurements
command.Moved the load measurements toolbar buttons and section out of the modes and into the
cornerstone-dicom-sr
extensiononModeEnter
hook.Refactored the HTML for the Load button out of
OHIFCornerstoneSRMeasurementViewport.tsx
into its own component namedViewportActionButton
. The load measurements toolbar button uses this new component.RT struct and SEG viewport statuses now use
ViewportActionButton
as well.Testing
Test A
The load of measurements, SEG and RT struct should work as before.
Test B
LoadMeasurements
button in the mode to not clear the measurements prior to load. Alternatively, create a custom list of commands to execute instead.Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment