-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode #3664
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* fix(volumeLoad): should not have missing slices when loading (OHIF#3287) * fix(volumeLoad): should not have missing slices when loading * add review comments * feat(DoubleClick): double click a viewport to one up and back (OHIF#3285) * 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(tmtv): add more stages to pt/ct (OHIF#3290) * feat(tmtv): add more stages to pt/ct * make error stage change to info * apply review comments * fix(viewports): The display of linked viewports during drag and drop has a race (OHIF#3286) * 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(multiframe): enhanced support for multiframe dicom (OHIF#3164) * Changes in cswil version and multiframe * Minor changes * wip * Adding support for NM multiframe images * Applying PR suggestions * fixing package versions * Restoring default.js config file * Check if NM subtype is reconstructable * Restore default.js values * refactore code * feat: add flag for strict zspacing --------- Co-authored-by: Alireza <[email protected]> * feat(URL): add param for initial series and sop uids to display (OHIF#3265) * feat: Allow navigating to a specified series and sop instance This was a feature in OHIF v2, so adding it to v3, albeit with new parameters. feat: Allow comma separated as well as repeated args params * docs * Test fixes * feat: Navigate to SOP selected - PR fixes * Updated docs * PR fixes * fix(crosshairs): suppressed error for crosshair (OHIF#3237) * fix(SRTool): Ellipse Display for DICOMSR Tool (OHIF#3307) * feat(App): support async config function (OHIF#3313) * fix(URL): allow multi filter query (OHIF#3314) * fix(viewport): Initial blank image on SR/SEG initial display (OHIF#3304) * fix: Blank display area on initial DICOM SR load * Docs * Fix a NPE * fix(ROIThreshold): fix setWeight not updating properly for ROIThreshold panel (OHIF#3315) * fix(hp): Add displaySetMatchDetails and displaySets to options in (OHIF#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. * feat(measurements): add CircleROI Tool (OHIF#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 * fix: Service consistency typing (OHIF#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 * feat: Add a new hanging protocol @ohif/mn (OHIF#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
* added PET_IMAGE_MODULE + getDynamicVolumeInfoDevMode * feat(4d): synced cine from all 4D viewports * feat(4d): hanging protocols * updated HP and tools * fixed conflicts after rebasing with v3-stable * moved synced cine logic from viewport to provider * fix(cine): PT/CT viewport with a 4D volume loaded * feat(4D): workflow stages panel * update tools initialization * changed tools to make it similar to TMTV * added cine toolbar button * feat(4D): code review * @cornerstonejs/streaming-image-volume-loader 0.17.0
…ical-4d-base-merge (OHIF#3368) * fix(volumeLoad): should not have missing slices when loading (OHIF#3287) * fix(volumeLoad): should not have missing slices when loading * add review comments * feat(DoubleClick): double click a viewport to one up and back (OHIF#3285) * 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(tmtv): add more stages to pt/ct (OHIF#3290) * feat(tmtv): add more stages to pt/ct * make error stage change to info * apply review comments * fix(viewports): The display of linked viewports during drag and drop has a race (OHIF#3286) * 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(multiframe): enhanced support for multiframe dicom (OHIF#3164) * Changes in cswil version and multiframe * Minor changes * wip * Adding support for NM multiframe images * Applying PR suggestions * fixing package versions * Restoring default.js config file * Check if NM subtype is reconstructable * Restore default.js values * refactore code * feat: add flag for strict zspacing --------- Co-authored-by: Alireza <[email protected]> * feat(URL): add param for initial series and sop uids to display (OHIF#3265) * feat: Allow navigating to a specified series and sop instance This was a feature in OHIF v2, so adding it to v3, albeit with new parameters. feat: Allow comma separated as well as repeated args params * docs * Test fixes * feat: Navigate to SOP selected - PR fixes * Updated docs * PR fixes * fix(crosshairs): suppressed error for crosshair (OHIF#3237) * fix(SRTool): Ellipse Display for DICOMSR Tool (OHIF#3307) * feat(App): support async config function (OHIF#3313) * fix(URL): allow multi filter query (OHIF#3314) * fix(viewport): Initial blank image on SR/SEG initial display (OHIF#3304) * fix: Blank display area on initial DICOM SR load * Docs * Fix a NPE * fix(ROIThreshold): fix setWeight not updating properly for ROIThreshold panel (OHIF#3315) * fix(hp): Add displaySetMatchDetails and displaySets to options in (OHIF#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. * feat(measurements): add CircleROI Tool (OHIF#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 * fix: Service consistency typing (OHIF#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 * feat: Add a new hanging protocol @ohif/mn (OHIF#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 * chore(version): updated Orthanc from 1.5.7 to 1.11.0 (OHIF#3330) * fix(SR): When loading DICOM SR, only one measurement is shown with no way to show others (OHIF#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 * feat(RT): add dicom RT support via volume viewports (OHIF#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 * feat(dicomImageLoader): replace wado image loader with the new library (OHIF#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 * fix(Browser history): fixed NPE when navigating a study via browser history and history navigation is now available via the navigateHistory command (OHIF#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. * feat(storybook): Refactor Storybook to use Typescript (OHIF#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 * feat(microscopy): add dicom microscopy extension and mode (OHIF#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 * fix(ui): updated input fields to match new color scheme (OHIF#3323) * Updated input fields to match new color scheme Added small input text fields and fixed coloring * Added tailwind changes to viewers file * feat(cst): Add new command to get nearby annotation tools (OHIF#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. * fix(viewportDialog): viewportDialoge not appearing in non-tracked viewports (OHIF#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 * feat(DICOM Upload): Added new DICOM upload dialogue launched from the worklist page (OHIF#3326) * feat(DICOM Upload) OHIF 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(jump): Jump to measurement wasn't jumping when presentation already existed (OHIF#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. --------- * feat(proxy datasource): JSON server configuration launch (OHIF#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 * chore(lerna): upgrades lerna to 6.x (OHIF#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 * fix(DICOM Upload): Decreased the minimum height for the upload dialog contents to better fit some laptops. (OHIF#3347) * fix(HangingProtocolService): Add callback property & update description (OHIF#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. * chore(lerna): add lerna caching to build and tests (OHIF#3350) * chore(bump cs3d): bump package and add caching to webpack (OHIF#3353) * chore(bump cs3d): bump package and add caching to webpack * remove test for now * fix: conflicts ---------
… workflow stages (OHIF#3475)
…l-4d-base (OHIF#3654) Signed-off-by: Andres <[email protected]> Co-authored-by: Sofien-Sellami <[email protected]> Co-authored-by: ohif-bot <[email protected]> Co-authored-by: m00n620 <[email protected]> Co-authored-by: Joe Boccanfuso <[email protected]> Co-authored-by: Bill Wallace <[email protected]> Co-authored-by: Alireza <[email protected]> Co-authored-by: Wenqi Li <[email protected]> Co-authored-by: Andres Diaz-Pinto <[email protected]> Co-authored-by: Igor Octaviano <[email protected]> Co-authored-by: rodrigobasilio2022 <[email protected]> Co-authored-by: Patrick D. Lloyd <[email protected]> Co-authored-by: dxlin <[email protected]> Co-authored-by: mccle <[email protected]> Co-authored-by: M.D <[email protected]> Co-authored-by: Joe Boccanfuso <[email protected]> Co-authored-by: Salim Kanoun <[email protected]> Co-authored-by: lokeshnano <[email protected]> Co-authored-by: Yaroslav Halchenko <[email protected]> Co-authored-by: Ibrahim <[email protected]>
✅ Deploy Preview for ohif-platform-docs canceled.
|
✅ Deploy Preview for ohif-dev canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3664 +/- ##
=======================================
Coverage 44.37% 44.37%
=======================================
Files 80 80
Lines 1334 1334
Branches 327 327
=======================================
Hits 592 592
Misses 589 589
Partials 153 153
Continue to review full report in Codecov by Sentry.
|
sedghi
changed the title
Merge branch 'master' of github.com:OHIF/Viewers into feat/preclinical-4d-base
[DRAFT]: Add 4D dynamic volume preclinical mode
Sep 20, 2023
sedghi
changed the title
[DRAFT]: Add 4D dynamic volume preclinical mode
feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode
Apr 5, 2024
…/preclinical-4d-base
…mprove tool name retrieval
…ornerstone, measurement-tracking, app, and core packages
…m-seg, cornerstone-dicom-sr, cornerstone, measurement-tracking, app, and core packages
…r, cornerstone, measurement-tracking, app, and core packages
…eToolbar, OHIFStudyList, and app packages
…/preclinical-4d-base
sedghi
approved these changes
Apr 10, 2024
5 tasks
thanh-nguyen-dang
pushed a commit
to uc-cdis/Viewers
that referenced
this pull request
May 1, 2024
…ct mode (OHIF#3664) Co-authored-by: Alireza <[email protected]> Co-authored-by: Neil <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alireza:
💯 👏👏
This work is published under the set aside funding U24 for enhancing the Open Health Imaging Foundation (OHIF) Viewer to support preclinical 4D imaging datasets and integrating it with the Preclinical Imaging XNAT-enabled Informatics (PIXI) platform at Washington University in St. Louis by Dr. Kooresh Shoghi.
Big shoutout to @lscoder and @NeilMacPhee for kicking off the work on this fantastic PR! 💯 👏👏
Breaking Changes
leftPanelDefaultClosed
is now calledleftPanelClosed
, same for rightNew Features
New Mode (4D PT/CT)
This work introduces a new preclinical 4D PET/CT mode that allows visualization, navigation, and analysis of 4D preclinical imaging data, including features like multi-modality image fusion, drawing 2D/3D ROIs across time points, and exporting voxel data within ROIs over time.
Basic 4D support via enhanced CINE player in basic viewer
You can also view your 4D data in the basic viewer. We have enhanced our CINE player to automatically detect the 4D series and show the splitting tag
(Note the CINE player in the bottom of the viewport)
CleanShot.2024-04-09.at.15.28.25.mp4
dd.mp4
New Chart Viewport
We have added a new Chart viewport that you can utilize to show relevant information. To use this type of viewport you need to create an instance and add it to the
DICOMMetadataStore
so that a displaySet is created after. Take a look at how we do so in theextensions/cornerstone-dynamic-volume/src/actions/updateSegmentationsChartDisplaySet.ts
We will simplify this component usage in the future
and use a hanging protocol to render it (extensions/cornerstone-dynamic-volume/src/getHangingProtocolModule.ts)
Workflow Step Service
This service allows you to manage your workflow in smaller steps. It provides a structured way to define and navigate through different stages
or phases of a larger process or workflow. Each step can have its own configuration, layout, toolbar buttons, and other settings tailored to the specific requirements of that stage.
Anatomy of a Workflow Step
The anatomy of a workflow step refers to the different components or properties that define and configure each individual step within the workflow. Each step can be customized with various settings to tailor the user interface, available tools, and behavior of the application for that specific stage of the workflow. Here are the key components that make up a workflow step:
id
: A unique identifier for the stepname
: A human-readable name or title for the step, which can be displayed in the user interface to help users understand the current stage of the workflow.hangingProtocol
: The hanging protocol configuration specifies the protocol and stage ID to be used for displaying the images. This ensures that the appropriate data viewports and presentation are used for the current workflow step.layout
: The layout configuration defines the arrangement and visibility of various panels or viewports within the application's user interface for the specific step. This can include specifying which panels should be visible on the left or right side of the screen, as well as any options for panel visibility or behavior.toolbarButtons
: Each step can define a set of toolbar buttons that should be available and displayed in the application's toolbar during that step. Remember the button definitions should already be registered to toolbarService beforehand, here we are just referencing the buttons id in each section.info
: An optional description or additional information about the current workflow step can be provided. whichwill be displayed as tooltip in the UI.
Step Callbacks or Commands: Some workflow steps may require specific actions or commands to be executed when the step is entered or exited. These callbacks or commands can be defined within the step configuration and can be used to update the application's state, perform data processing, or trigger other relevant actions. For instance you have access to
onEnter
hook to run a command right after the step is entered.For instance, a simplified example of our pre-clinical 4D workflow steps configuration might look like this:
Integration
After you have defined your workflow steps, you can integrate them into your application by using the
workflowStepsService
.These steps should be called on
onSetupRouteComplete
in your mode factory.Note: onModeEnter is too soon to call these steps as the mode is not yet fully initialized.
check out the
modes/preclinical-4d/src/index.tsx
for a complete example.User Interface
We have developed a simple dropdown UI element that you can use to navigate between the different steps of your workflow. This dropdown can be added to the toolbar like below:
It will appear in the
secondary
location in the toolbar.Re-usable Segmentation Panel and Stackable Panels
We've cleaned up a bunch of duplicated code related to the segmentation panel that was being repeatedly used with various settings. You can now work with the original segmentation panel in your modes and tweak its behavior. Currently, there's just one PanelSegmentation implementation, and tmtv, viewer, and pre-clinical all make use of this panel with distinct behaviors.
For instance we modify the behaviour of the seg panel in tmtv mode like
You can now stack different panel modules on top of each other. Just provide the ids in an array
For instance in the tmtv mode we have
Note the
rightPanels: [[tmtv.toolbox, cs3d.segPanel, tmtv.export], tmtv.petSUV],
specially the first item which is now an array[tmtv.toolbox, cs3d.segPanel, tmtv.export]
So go ahead and only create parts of the panels that you want specific to your workflow and use OHIF's implementation on more general panels.
New Window Level Component
There is a new window level component that you can use to view the histogram of the viewport window level, and then manipulate it. Use it like a panel sub component and stack it in your panels. We plan to make it more general so that you can put it in a modal or etc
CleanShot.2024-04-09.at.16.39.44.mp4
Using webworkers for computationally heavy task
We have started to move computationally heavy tasks to workers, and as start you can look how we calculate
histogram
in such wayextensions/cornerstone/src/components/ViewportWindowLevel/histogramWorker.js