- prevent non-cornerstone viewports from showing the image download dialogue
- passing the rendering engine id to ToolGroup.addViewport
- fixed the keep/dismiss aspect feature
* fix(DICOM PDF and Video)
- added retrieve.directURL for local DICOM load data source; it returns a data URL
- fixed various checks for video using transfer syntaxes and SOP class UID with number of frames
- added call to 'rendered' endpoint for those data sources that support it; others get BulkDataURI
* Added DOC (PDF) and OT (for video in particular) to list of non-image thumbnail modalities.
* Fixed broken e2e tests.
* choe(modes, components): improved readability
This commit includes changes to improve performance in the basic-dev-mode and Thumbnail components.
Additionally, a change in the webpack configuration file was made to ignore ".min.js.map" files.
The defaultDataSourceName was also added to several configuration files, and whiteLabeling code was removed
from the local_orthanc configuration file.
* fix(cli): better path management and add dependencies
* better docs
* add default tool group to the templates
* add review comments
* apply review comments
* try to fix test
* fix thumbnail in tests
* fix: Jump to measurement after presentation store
* Fix initial load of DICOM SR
* Fix measurement highlight issues
* Clear measurements changed to array
* Fix merge issues
* PR comments
* Removed unused formatting. Change to single event
* Fix the unit test
* PR review comments
* refactor(viewport): simplify imports, align destructuring
Simplify import statements by removing unused imports, organize existing imports, and align destructured imports consistently across the component.
---------
* feat(DICOM Upload)
OHIF #3297
- DicomWebDataSource.store.dicom now accepts an ArrayBuffer of data sets to store
- DicomWebDataSource.store.dicom now also accepts optional callbacks to track upload and an AbortSignal object to cancel upload
- Added DicomFileUploader class that performs and tracks the upload of a DICOM file
- Added various UI pieces for the upload: DicomUpload, DicomUploadProgress, DicomUploadProgressItem
- ProgressLoadingBar was extracted from LoadingIndicatorProgress so it can be reused
- Modal dialogues can now optionally prevent an outside click from closing the Modal
* Passing an XMLHttpRequest to the dataSource.store.dicom method instead of callbacks and AbortSignal.
Cleanup of various UI pieces to minimize code and increase readability.
* Made the DicomUpload component a customization module exported by the cornerstone extension.
* Exposed a copy of the data source configuration via the IWebApiDataSource interface.
Added dicomUploadEnabled to a data source's configuration.
* Code clean up.
* Upgraded the dicomweb-client version to one that provides the ability to
pass a custom HTTP request. DICOM upload uses that custom HTTP request
to track progress and cancel requests.
* Distinguished between failed and cancelled uploads.
* Allow no selection in the upload dialogue.
Fixed the styling of various progress information so that everything aligns.
* Switched from cornerstone wado image loader to cornerstone dicom image loader for DICOM upload.
* Added special cancelled icon to differentiate from failed.
* Added a bit of spacing between the upload progress bar and percentage.
* Fixed minor issue with upload rejection.
* Performance improvement for cancel all uploads:
- use React memo for each upload item progress (row)
- do not await each request of a cancel all
* Fixed various padding/spacing for the DICOM upload drop zone component.
Changed the border dashing for the DICOM upload drop zone to be a background image gradient.
Added hover and active effects to the 'Cancel All Uploads' text.
* fix: viewportdialoge not appearing in non-tracked viewports
* feat(viewports): Introduce useViewportDialog and remove deprecated API
This commit introduces the `useViewportDialog` hook and replaces the deprecated `viewportDialogApi` with the new `viewportDialogState`. Additionally, the notifications in `OHIFCornerstoneRTViewport` and `OHIFCornerstoneViewport` have been removed. Finally, the `CinePlayer` component now accepts optional parameters.
* fix tests
* feat(storybook): Refactor Storybook to use Typescript
This commit updates the Storybook configuration to use Typescript, including renaming `main.js` to `main.ts`, updating `core.builder` and `framework.name` to use `@storybook/builder-webpack5` and `@storybook/react-webpack5`, respectively. The code also adds options to `addon-docs` to enable adding GFM support to the generated docs. Additionally, the commit modifies `staticDir`, removes outdated addons, and makes various devDependencies and PostCSS updates to align with Storybook 7.x.x. Finally, the commit removes some unused code and relocates `Button` and `AboutModal` story files.
* apply review comments
* update yarn lock
* feat: initial RT support
* make the segmentation service work with representation data
* feat: make segmentation service work with representations
* fix rtss vis
* fix: rt hydration
* fix the rendering of rt names
* fix imports
* refactor: Modify status and click handling for hydration of RTStructures
Modify status and click handling for hydration of RTStructures by renaming `onPillClick` to `onStatusClick` in `OHIFCornerstoneRTViewport.tsx` and `_getStatusComponent.tsx` files. Also, update initial segmentation configurations in `PanelSegmentation.tsx` and simplify configuration changes and values for segmentation service in `SegmentationService.ts`. Finally, remove console debug in `CornerstoneViewportService.ts`.
* wip for highlighting contours
* refactor rt displayset code
* review code update
* update cornerstone dependencies
* refactor: Update license year, version number, and minor code cleanup
This commit updates the license year in several files, updates the version number in package.json, and contains minor code cleanup in two files.
* add bulkdataURI retrieve for RT
* fix package version
* apply review comments
* apply review comments
* apply review comments
* feat(panels): refactor and streamline segmentation configuration and inputs
Rewrote state hooks and streamlined the configuration input for `PanelSegmentation` to be more verbose and reusable. Included several new input types, including the `InputRange` component which now shows a fixed floating value based on the step provided. The `SegmentationConfig` component now works with dynamic values controlled by `initialConfig`. These changes should improve function usability and make the code more maintainable going forward.
* fix various bugs
* fix contour delete by upgrade cs3d version
* feat(viewport, inputNumber, segmentationConfig, orthanc): Implement minimum and maximum values for input number components, and useBulkDataURI for Orthanc configuration. Compare measurement view planes with absolute viewport view planes in Cornerstone viewport.
* update yarn lock
* Use more consistent type/structure for services
* Fix restoring SR so the tests described work
* One more typed service
* Added types for the Cornerstone library
* Couple more type fixes
* fix: The display of linked viewports during drag and drop has a race
* PR review comments
* fix: Segmentation display two up
* Removing console logs
* Fix the blank viewport can have stuff added to it
* Fix the null name on HP module
* Fix the navigate to initial image
* Fix the nth interleave loader
* Fix the unit tests
* PR comments - docs mostly
* fix: Exception thrown on change displayset after double click
* feat(DoubleClick): double click a viewport to one up and back
Added a toggleOneUp command that puts the active viewport into a 1x1 grid layout
and it toggles out of 'one-up' by restoring its saved 'toggleOneUpViewportGridStore'
from the StateSyncService.
Added double click customization for the Cornerstone extension with the
default double click handling being the toggleOneUp command.
Added a cypress test for the double click functionality.
* PR feedback:
- tracked viewport measurements no longer show as dashed when toggling one up
- disallowed double clicking near a measurement
- updated cornerstone3D dependencies to fix double click of TMTV and volume viewport 3D
- created ViewportGridService.getLayoutOptionsFromState
* Updated the ViewportGridService docs.
* Switched to using 'cornerstoneViewportClickCommands' and consistency with the context menu clicks.
* feat: Allow customizing the measurements panel.
Also includes default display of the site/finding values from the DICOM
SR object.
Update fixes
PR review comments - move the recordInteraction to COmmandsManager.run
PR fixes
fix: Dependency updates to allow right click to be recognized
PR fixes
* Use newer CSWIL
* Make both the base measurements and the tracking measurements show codes
* Fix the right click context menu bringing up menu
* feat: Context menu
feat: Custom context menu
Adding documentation
PR updates
* fix: Capture tool exception
* PR updates
* Add fully worked out examples in the basic test mode/extension
* Fix the menu display
* fix: Make the commands on clicks much more configurable
* Wait for load before double clicking
* docs
* PR changes - nothing functional, just moving things endlessly
* PR comments
* PR changes - rename the default context menu
* Renamed the cornerstoneContextMenu to measurementsContextMenu
* Add chevron right to the sub-menus
* fix: Some residual issues with hanging protocol after state sync
fix: Some issues introduced by the state syncing changes
* fix: PR fixes, mostly code cleanup
* Improve a race condition in an automated test
* Remove obsolete code
* PR fixes
* feat: Add state sync and use it to remember viewport grid info
fix: Version updates
Fixes for toggling MPR mode
Fix the display when the interleaved load module fails
Fix the memory of the state to restore correctly
PR fixes for the state sync service
PR fixes
PR fixes
PR fixes
Added a hack warning to remove volumeDeactivate
Fixes for TMTV colormap setting
Fix the casing
Missed renames
fix: tests not running due to variance in ordering
Reverting some fixes to change case
PR changes - mostly comments and minor improvements
fix: All display sets were being updated on drag and drop
PR fixes - mostly renames
PR fixes
Test support for OHIF, for HP branch
test: Add at least a minimal set of automated tests for hanging protocols
Docs
PR fixes
Merge fixes
DOCS updates
Add an example of the mn hanging protocol
PR fixes
PR fixes
PR fixes
* Fix the drag and drop
PR fixes
* PR changes - update default keys for next/previous stage
* fix: Was storing the custom viewport grid too aggressively
Caused by a PR change misspelling a variable
* feat(SidePanel)
OHIF issue #3135
- Added a method to set a callback for a Panel to invoke when it is ready
to be shown (e.g. its data is loaded).
- Implemented such methods for both the segmentation and measurement panels.
- The SidePanel component now adds a callback to Panel components so that
it will automatically open a Panel that was initially closed and yet to
be opened.
- Updated the OHIF documentation accordingly.
* PR feedback
- added a PanelService that centralized much of the logic that existed in panel PanelModule
- the SidePanel subscribes to PanelService.EVENTS.ACTIVATE_PANEL for each of its child panels
* Removed the PanelMeasurementTableTracking setMeasurementPanelContentReadyCallback method.
* Made the forceActive flag in the PanelService optional and defaulted it to false.
* Fixed failing top level exports unit test.
* - PanelService subscriptions are now per panel (id) so subscribers do not
necessarily need to check the panel id in the event when it is fired
- PanelService activate panel trigger subscriptions are now returned
so that they can be (better) managed outside of the service
- updated/created the various documentation for panels and PanelService
* Clarified various documentation.
Moved the code to add the activate panel triggers out of the extensions
and into the longitudinal mode.
* Removed the openWhenPanelActivated flag.
PanelService now conforms to extending PubSubService like the other services.
Updated various documentation.
* Fixed failing e2e, mpr test.
* Renamed the ActivatePanelTriggers type properties.
The ExtensionManager now sets the id of various modules as a property on each of those modules.
* overlay customization
* custom overlay definition and examples
* minor fix - import statement difference between cornerstone and cornerstone3D
* move "VOI" and "Zoom" calulation to the ViewportOverlay component, make OverlayItem fairly dull
* type specifications
* follow up fixes for CustomizationService changes on upstream
* [fix] various fixes related to custom overlays (formatting, toggling)
* [fix] various fixes related to custom overlays (formatting, toggling)
* right side overlay panels - align right
* [fix] remove "notification" from toggleOverlay command
* comments
* [refactor] remove unused imports
* documentation of customizable overlay configuration
* prettify
* review of documentation of customization service
* fix useCallback() dependencies
* fix useCallback dependencies
* documentation for customization service
* documentation for customization service
* feat(ViewportActionBar): OHIF issue #3123 (#3186)
* feat(ViewportActionBar): OHIF issue #3123
- Renamed previous viewport action bar to be LegacyViewportActionBar
- Components LegacyViewportActionBar depends on also renamed: LegacyCinePlayer and LegacyPatientInfo
- New Viewport coded to specs in issue
- added React hook useResizeObserver
- added some tailwind classes
* Updated tailwind to 3.2.7.
Put external imports like React at the top of the import list.
* feat(CinePlayer and ViewportActionBar) (#3198)
* feat(CinePlayer and ViewportActionBar)
- OHIF issue 3123
- new look cine control implemented
- new custom blue color in tailwind config for various hover backgrounds in the cine control
- new icons added for cine
- Tooltip component now can be placed top (center) on hover
- Tooltip component border colour now consistent with specs
- fixed NPE in ViewportActionBar
- upgraded tailwind to 3.2.7 in platform/ui
- fixed issues in various button components brought by tailwind 3.2.7 where classes now need important flag
- fixed issue with InputRange component so that the tracked value property can change externally
- InputRange component can now optionally show its label
- added new measurement tracking state service to hydrate SR without prompting
- segmentation can also now be hydrated without prompting
* PR feedback:
- cine centralized to OHIFCornerstoneViewport
- introduced a type for the CinePlayer properties
* Addressed PR comments and concerns...
The DOM ref for the root component of the ViewportActionBar is now added to state
so that the various callbacks and ResizeObserver are updated with it.
The CinePlayer FPS slider tooltip was moved up so that its arrow does not
intersect the FPS text.
The hover area for the CinePlayer slider tooltip is now the FPS < > buttons and text.
The tracked measurements are now filtered to only include those of the active
viewport series when the tracked measurement navigation arrows are used.
* Addressed PR comments...
The update to tailwind 3.2.7 caused several look-and-feel, UI regressions,
so we are rolling back to 3.2.4.
* tests: add various e2e tests for MPR and measurements
wip
add cypress config
feat: add mode and extension for testing
add hp applied through search params
add MPR tests
apply review comments
add more e2e tests
update yarn lock
* fix unit tests failing
* fix(ViewportGrid): In ViewportGrid, fill blank viewports with display sets not yet in grid.
ViewportGridService now allows off-screen viewports to remain so that
so as to maintain continuity if they were filled by the UI/user.
* PR feedback: moved getNumViewportPanes into the ViewportGridService API.
* PR feedback:
- renamed some variables
- proper import/export of IDisplaySet
- added some comments for clarification
- fixed broken e2e tests
* Some missed rename of Services.
* fix(misc):Update the data source name, provide a /datasources
Update the imports for a few things to match, to avoid 2 versions
Fix the datasources name
pr:Make the data source selector configurable
* Updated data source selector page as requested
* PR fixes
* feat: Combine the layout grid selector tool with the toggle MPR button into a split button.
The primary button will always be the layout grid selector and the MPR toggle is in the drop down menu.
This is the first step to later adding other (e.g. 3D) layout HPs to the menu.
Summary of changes/fixes:
- SplitButton now allows for its primary button to be any button component specified by a UI type.
- SplitButton passes a className to its primary button component to dictate how it should be rendered
based on its active/toggle status, hovering, menu visibility etc.
- The default menu item renderer for the SplitButton, renders acitve toggle items correctly.
- Items/buttons in the toolbar are now all the correct and same size.
- Added ToolbarService.getButtonComponentForUIType to fetch a button component for a given UI type.
- Spacing between toolbar items is now done at the Toolbar level to avoid double spacing and to ensure
uniform spacing.
- The drop down menu closes when clicking the primary button.
- Show a mouse down click effect when clicking the primary button.
Items to investigate still:
The following are all slightly contrary to the design specs of the UI:
- Is the click effect on the primary button satisfactory because with the hover border effect, the
button appears slightly smaller during the mouse down/up operation? (MEDIUM)
- On hover over the drop down button, the right-hand-side corners of the primary button appear
rounded and NOT square. Also the hover over the drop down button border effects make the primary
button appear smaller. (MEDIUM)
- Should there be hover effects when hovering over either tooltip of the SplitButton? (LOW)
* feat: Combine the layout grid selector tool with the toggle MPR button into a split button.
Fixed broken e2e tests.
data-cy and data-tool properties now passed down to primary button component.
* feat: Combine the layout grid selector tool with the toggle MPR button into a split button.
On drop down button hover, the primary button now stretches all the way right with no right border
and with square corners in the top and bottom right as per the toolbar spec.
The mouse down effect gives a full button look (i.e. no borders) with rounded corners all around and black text icon.
* feat: Combine the layout grid selector tool with the toggle MPR button into a split button.
Documented that the primary button of a split button can specify a UI type.
* feat: Combine the layout grid selector tool with the toggle MPR button into a split button.
Feedback from PR review to fix prettier formatting issue.
* feat: Combine the layout grid selector tool with the toggle MPR button into a split button.
Added TODOs as per Bill's request in the PR.
* feat: Combine the layout grid selector tool with the toggle MPR button into a split button.
Feedback from Alireza: reverted the layout selector and MPR tools to be separate toolbar items.
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
* fix(grid):Grid service wasn't being reset
* fix(service):Fix the initial service state
Services with mode specific state differed in internal state between
initial and subsequent load. This fix address that structurally by
allows the mode to store/manage service state, but makes the
responsibility of service state central to the service.
* feat(customization):Add a customization service
Update UICustomizationService to v3-stable.
Also, adds an example customization for tab colors
* moved the customization service to ui category
* feat: warn for overlapping segments
* fix: typo
* refactor mpr toggle and stack sync
* fix: wip for more general mpr
* fix: tool groups for mpr
* fix: changing of viewport id
* fix: viewport Id for the seg viewports
* fix
* update cornerstone version