Commit Graph

4678 Commits

Author SHA1 Message Date
Joe Boccanfuso
c0fd4416ed
fix(Measurement): fixed line dashing of measurements in various scenarios (#3407)
* fix(Measurement): fixed line dashing of measurements in various scenarios

For a StackViewport simply rely on the SeriesInstanceUID being part of the
tracked measurements or not.

For a VolumeViewport first check the image id of the current image in the viewport
and then check the SeriesInstanceUID (like for a StackViewport) if an id is returned.
To reliably get the id of the current image, listen for the VOLUME_VIEWPORT_NEW_VOLUME event.

* Changes for PR comments.
2023-05-18 20:59:33 -04:00
Mateus Freira dos Santos
f2004aee9e
fix(headers): Add all extra headers to WADO image loader (#3405) 2023-05-18 13:04:14 -04:00
Joe Boccanfuso
856538537d
fix(Video): Added fallback checks for DICOM video (#3402)
* fix(Video): Added fallback checks for DICOM video
Added some docs for video, pdf and upload.

* Added separate headings for DICOM PDF, DICOM Video and DICOM Upload in the docs.

* Updated docs for singlepart data source configuration.
2023-05-17 16:50:27 -04:00
Alireza
f1c0581313
fix(thumbnail): it was commented out by mistake (#3403) 2023-05-17 14:13:19 -04:00
Alireza
e055f25ea6
fix(local): should use dicomlocal for localbasic (#3397)
* fix(local): should use dicomlocal for localbasic

* chore(github): styling for issues forms

* try to fix netlify

* apply review comments

* apply review comments
2023-05-17 12:45:06 -04:00
Alireza
dab6db3244
docs(migration): add migration guides for v2 to v3 (#3387)
* wip

* more on migration guides

* review

* review

* apply review comments

* Update docs for sop class handler

* Updated notes on display sets

* Docs note

---------

Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
2023-05-16 17:36:29 -04:00
Joe Boccanfuso
052653f3b2
fix(Image Download): various bug fixes for image download (#3396)
- prevent non-cornerstone viewports from showing the image download dialogue
- passing the rendering engine id to ToolGroup.addViewport
- fixed the keep/dismiss aspect feature
2023-05-16 14:50:34 -04:00
Alireza
1881ce5cbc
feat(custom displayOptions): add custom options to every level of hp (#3372)
* feat(custom displayOptions): add custom options to every level of hanging protocols

* move set preset down to cornerstone3d

* works

* fix tmtv based on new api

* fix unit test

* close

* review1

* upgrade packages

* update packages

* apply review comments

* recursive call

* less copy

* apply review comments

* fix e2e tests

* apply review comments

* revert

* apply review comments

* apply review comments

---------

Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
2023-05-16 13:07:37 -04:00
Joe Boccanfuso
045e54aa02
fix(Measurement): Use dashed lines for measurments of viewports where getCurrentImageId returns undefined (#3392)
* fix(Measurement): Use dashed lines for measurments of viewports where getCurrentImageId returns undefined

* Updated cornerstone3d packages

* Fixed code comment.

* Removed unused imports.
2023-05-16 10:02:10 -04:00
Joe Boccanfuso
52eb0edd6f
fix(dicomlocal): navigate /local to the work list and /localbasic to the (basic) viewer (#3389)
* fix(dicomlocal): navigate /local to the work list and /localbasic to the (basic) viewer
For TMTV, consider both the forward and back slash separator for modalities.

* Fix to TMTV isValidMode method.

* PR feedback:
- replace forward slashes with back slashes for modalities in the WorkList instead of in the Mode.

* Added query.series to DicomLocalDataSource.
2023-05-15 16:23:53 -04:00
Ashish Narnoli
af8bb27575
feat: query string dynamic app config (#3391)
* feat: query string dynamic app config

* fix: bug fix and couple of very small improvements
2023-05-15 14:52:48 -04:00
Bill Wallace
f4be73b5cf Fix jest config for newer jest 2023-05-15 10:09:54 -04:00
Bill Wallace
d5c5951e57
fix(SR): KO series being displayed in browser list (#3382)
* fix: KO series being displayed in browser list

* fix sr for volume viewports

* move highlight labelmap to RAF

* remove commented code

* fix the hydration bug for the SR

* apply review comments

* revert the key images for sr

* Remove some obsolete changes

* set initial image for sr instead of jump

* Remove viewportType stack

---------

Co-authored-by: Alireza <ar.sedghi@gmail.com>
2023-05-15 08:23:13 -04:00
Joe Boccanfuso
4172d0427b
fix(Measurements): in MeasurementService keep a separate set of unmapped measurements (#3385)
* fix(Measurements): return {} instead of undefined for getSOPInstanceAttributes

* PR feedback:
- separated measurements from non-acquisition plane
- reverted to previous behaviour of returning undefined in getSOPInstanceAttributes

* Added unit tests for unmapped measurements.

* PR feedback: added comments to the unmappedMeasurement used in the unit tests.
2023-05-12 16:24:00 -04:00
Alireza
4fd81b5cd2
fix(local): fix modalities not showing in local (#3388)
* fix various bugs

* revert back docusaurus for styling issues
2023-05-12 15:04:19 -04:00
Alireza
84cb709b44
feat(panel and auth): fix study panel to not rely on priors and add token param to url (#3381)
* fix: multiframe

* fix the unnecessary use of prior since some servers dont like it

* add authentication via token in url

* add data citation

* add resources

* upgrade packages

* yarn lock

* apply review comments
2023-05-11 10:01:33 -04:00
Joe Boccanfuso
cba57a1b65
fix(UI): fixed results per page select menu (#3384) 2023-05-11 09:52:32 -04:00
dxlin
656f9cf761
docs(HP): update for sameAs attribute doc (#3383)
Update HangingProtocolService doc to include example and instructions to use custom attributes included in @ohif/extension-test. Example shows usage of sameAs for frame of reference check in tmtv hanging protocol.
2023-05-10 15:04:49 -04:00
Joe Boccanfuso
8eaa1877fd
fix(DICOM PDF and Video): fixes for local DICOM load and remote data sources (#3374)
* 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.
2023-05-10 12:42:48 -04:00
Joe Boccanfuso
0eda151418
fix(UI) - fixed the spacing and positioning of the close button in the SnackbarItem component (#3380) 2023-05-10 09:07:17 -04:00
Pavan Kumar Jadda
55f996cf48
fix(service-worker): fixes service worker issue in init-service-worke… (#3378) 2023-05-09 17:10:09 -04:00
Alireza
0b4c3649e7
fix(dynamic load): make sure required extensions are loaded (#3377)
* fixes some bugs

* make cornerstone default for now
2023-05-09 12:26:16 -04:00
Joe Boccanfuso
98d966514a
fix(Measurements): edit measurement while SEG loaded (#3375) 2023-05-09 12:15:26 -04:00
Bill Wallace
a688f03fdb
feat(App): Loads mode extensions on demand (#3312)
* feat: Dynamic plugin imports

* Remove unused file

* Fix basic dev mode

* Fix the modes issue that Joe requested

* Merge fixes

* Add the ability to publish directory contents

* PR review changes

---------
2023-05-08 21:18:35 -04:00
Alireza
2f355fa158
fix(cli): better support for external modules and toolGroups in templates (#3364)
* 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
2023-05-08 15:49:28 -04:00
Pedro H. Köhler
187e6b5f30
chore(packages): bump deps to fix vulnerabilities (#3366) 2023-05-08 14:05:03 -04:00
Pedro H. Köhler
285dff31c5
chore(packages): bump deps to fix vulnerabilities (#3366) 2023-05-08 14:04:39 -04:00
Alireza
969e7698fa
chore(bump cs3d): bump package and add caching to webpack (#3353)
* chore(bump cs3d): bump package and add caching to webpack

* remove test for now
2023-05-03 12:30:02 -04:00
Alireza
3cd01c7264
chore(lerna): add lerna caching to build and tests (#3350) 2023-05-02 15:39:16 -04:00
Alireza
ef24d89930
fix(HangingProtocolService): Add callback property & update description (#3349)
The description for the numberOfDisplaySetsWithImages property was corrected. The update also involves adding a callback property that returns several objects (matchedViewports, viewportMatchDetails, displaySetMatchDetails) and returning them from the method 'findViewportProtocols'. The refactored code also has better readability.
2023-05-02 13:31:51 -04:00
Joe Boccanfuso
0f85b1a681
fix(DICOM Upload): Decreased the minimum height for the upload dialog contents to better fit some laptops. (#3347) 2023-05-02 09:24:53 -04:00
Pavan Kumar Jadda
89936a5b50
chore(lerna): upgrades lerna to 6.x (#3215)
* feat(core): upgrades lerna to 6.x.x

* feat(core): upgrades lerna to 6.5.1

* feat(core): updates lerna to 6.x.x

* feat(core): updates default config
2023-05-01 20:32:07 -04:00
David Smith
0e3491d6bb
feat(proxy datasource): JSON server configuration launch (#2791)
* feat: delegating dicom web proxy datasource

* fix: configurably allow WADO image loader to issue preflight OPTIONS request

* Added documentation and fixed up some error handling from PR review

* review comments changes

* another small code review fix
2023-05-01 12:58:53 -04:00
Bill Wallace
b5b936b53e
fix(jump): Jump to measurement wasn't jumping when presentation already existed (#3318)
* 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.

---------
2023-05-01 12:54:33 -04:00
Joe Boccanfuso
66f6e3eade
feat(DICOM Upload): Added new DICOM upload dialogue launched from the worklist page (#3326)
* 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.
2023-04-28 16:13:47 -04:00
Alireza
f377153b60
fix(viewportDialog): viewportDialoge not appearing in non-tracked viewports (#3071)
* 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
2023-04-28 11:06:03 -04:00
Alireza
c9d3c08cb6
feat(cst): Add new command to get nearby annotation tools (#3327)
* feat(cst): Add new command to get nearby annotation tools
This commit adds a new command `getNearbyAnnotation` to the `commandsModule.ts` file that identifies nearby annotation tools excluding Crosshairs and ReferenceLines. It also removes an unused mapping to `Crosshairs` in `initMeasurementService.js` and changes the command run in `findNearbyToolData.ts` to `getNearbyAnnotation`.

* perf(cornerstone): Improve performance by optimizing tools

Removes unnecessary imports to improve app's performance. Changes how annotations are detected on the `commandsModule.js` file by fetching the `isAnnotation` property of the tool instance if available. Updates `CrosshairsTool` and `ReferenceLinesTool` to not be annotations anymore. Adjusts the `localhost` URL ports for the `dcm4chee-arc` service interface on `local_dcm4chee.js` to allow for more efficient server communication.

* feat(cornerstone): Add CornerstoneServices type and ToolGroupService.getToolGroup to get tool group by ID or active viewport

This commit introduces the new CornerstoneServices interface to the code and adds the ToolGroupService.getToolGroup method, which can retrieve a specific tool group by ID or from the active viewport. The older _getToolGroup method has also been removed from commandsModule. When no tool group ID is provided, this method now retrieves the tool group from the currently active viewport with the help of getActiveViewportEnabledElement. Additionally, the required reference to @ohif/core has been removed.
2023-04-28 10:14:14 -04:00
Braden Morley
fe7fa6e5bf
fix(ui): updated input fields to match new color scheme (#3323)
* Updated input fields to match new color scheme

Added small input text fields and fixed coloring

* Added tailwind changes to viewers file
2023-04-27 21:01:53 -04:00
M.D
075008c674
feat(microscopy): add dicom microscopy extension and mode (#3247)
* skeleton for dicom-microscopy extension

* skeleton for microscopy mode

* [feat] ported @radicalimaging/microscopy-dicom to OHIF's default extension

* [feat] ported microscopy mode from private repo

* added new definitions to the package.json

* webpack configuration update for microscopy extension

* register new icons for microscopy tools

* fixes to the microscopy extension and mode

* trivial error fix - typescript type import error

* link microscopy extension with default OHIF app plugin config

* demo config fix

* fix logs

* remove unsed imports

* [fix] loading of microscopy

* [fix] webworker script loading, normalizing denaturalized dataset

* found the latest version of dicom-microscopy-viewer that works with current OHIF extension : 0.35.2

* hide thumbnail pane by default, as we have issues with

* comments

* remove unused code

* [feat] microscopy - annotation selection

* [feat] microscopy - edit annotation label

* wip

* [bugfix] dicom-microscopy tool

* [bugfix] dicom microscopy annotations

* [fix] mixed-content blocking caused by BulkDataURI

* [fix] microscopy measurements panel - center button

* [fix] microscopy measurements panel - styling

* [fix] microscopy - controls

* fix local loading of microscopy

* fix local loading of dicom microscopy

* fix typo - indexof to indexOf

* [fix] remove unused icons

* remove commented out lines from webpack configuration

* platform/viewer/public/config/default.js - revert accidental changes

* [refactor] redirecting to microscopy mode on Local mode

* attribution to DMV and SLIM viewer

* [fix] code review feedbacks

* fix thumbnails

* [fix] microscopy - fix old publisher.publish() to PubSubService._broadcastEvent()

* [fix] interactions, webpack config, roi selection

* [feat] microscopy - remove select tool  from UI

* microscopy author

* [fix] saving and loading SR

* [bugfix] - missing publish() function in MicroscopyService, replace with _broadcastEvent

* remove author section from readme

* refactor SR saving feature

* fix webpack config after merge

* [bugfix] repeated import

* fix e2e

* webpack configuration

* hide "Create report" button for microscopy
2023-04-27 20:53:52 -04:00
Alireza
dd3944a87c
feat(storybook): Refactor Storybook to use Typescript (#3341)
* 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
2023-04-27 12:13:27 -04:00
Joe Boccanfuso
51cb0519fc
fix(Browser history): fixed NPE when navigating a study via browser history and history navigation is now available via the navigateHistory command (#3337)
* fix(Browser history):
- fixed an NPE when navigating to a different study via the URL
- exposed browser history navigation via a command

* Added documentation for the navigateHistory command.
Moved the history object from UI to viewer.
2023-04-27 10:46:23 -04:00
Alireza
eea0ed487b
feat(dicomImageLoader): replace wado image loader with the new library (#3339)
* use new dicom image loader instead of cswil

new dicom image loader fails

update dicom image loader

update yarn lock

modify webpack

* update webpack

* fix webpack

* update package versions

* update package versions
2023-04-26 20:55:56 -04:00
Alireza
66863281c4
feat(RT): add dicom RT support via volume viewports (#3310)
* 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
2023-04-26 12:21:08 -04:00
Bill Wallace
69d8e6a191
fix(SR): When loading DICOM SR, only one measurement is shown with no way to show others (#3228)
* fix: Make the cornerstone sR viewport show all measurements

* PR fixes

* PR fixes

* Add a DICOM SR hanging protocol

* Duplicate the hanging protocol for seg as well

* PR requested change

* PR requested changes

* PR fixes plus merge update fixes

* PR fixes and integration test fix

* PR - documentation
2023-04-25 17:25:10 -04:00
Leonardo Campos
dc61d87238
chore(version): updated Orthanc from 1.5.7 to 1.11.0 (#3330) 2023-04-20 12:39:37 -04:00
Bill Wallace
c508a2b6bc
feat: Add a new hanging protocol @ohif/mn (#3305)
* feat: Add a new hanging protocol @ohif/mn

* Add @ohif/seg example

* PR comments and a couple more fixes to make things cleaner

* PR comment

* Added an example to cause the PR checks to rerun
2023-04-18 11:55:25 -04:00
Bill Wallace
6cf271d006
fix: Service consistency typing (#3309)
* 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
2023-04-18 11:17:50 -04:00
M.D
47c25f4364
feat(measurements): add CircleROI Tool (#3211)
* [refactor] measurement service mapping files - rename to .ts files

* [fix] RectangleROI - measurement service mapping _getReport() function - tool name fix

* [feat] added CircleROI tool from updated cornerstone3D

* [refactor] fix for typescript strong typing warnings

* [feat] cornerstone-dicom-sr extension - added CircleROI tool

* [feat] added toolbar button for CircleROI tool

* [doc] doc updates for CircleROI tool

* [update] library - dcmjs to 0.29.5

* [fix] roundNumber() function when given strings

* [fix] refactor after upgrading conerstonejs library 0.49.0

* yarn.lock file change
2023-04-17 08:23:03 -04:00
Sofien-Sellami
83b4606357
fix(hp): Add displaySetMatchDetails and displaySets to options in (#3320)
The sameAs function requires displaySetMatchDetails and displaySets to compare attributes between display sets, but these properties were not being passed into the options object. This commit adds the necessary lines of code to include displaySetMatchDetails and displaySets in the options object, fixing the issue where the  custom attribute function 'sameAs' was missing required data.
2023-04-13 23:08:13 -04:00
dxlin
1173e7de6c
fix(ROIThreshold): fix setWeight not updating properly for ROIThreshold panel (#3315) 2023-04-06 14:05:46 -04:00