ohif-viewer/extensions/cornerstone
Danny Brown 2a51d75f77
[OHIF-339] - workflow changes (#1931)
* workflow changes

* Cherry pick OHIF-310 into this PR.

* fix label bug and dead code

* remove comment

* Wire up CreateReportButton

* fix additionalFindingTypes + save interaction

* Remove unused createReportAsync call

* stub for report hydration prompt

* Update PR

* Remove debuggers

* push updated code

* Push updates

* push

* fix sidebar save

* enable tracking of new study or series

* fix for duplicate created report series in sidebard

* fix for unexpected viewport dialog after visiting study list then a new study

* Fix for hydration not marking multiple series as active

* Reviewer changes.

* Respond to final review comment, add series description setting for export.

Co-authored-by: James A. Petts <jamesapetts@gmail.com>
2020-08-04 10:11:23 +01:00
..
.webpack fix: Add some code splitting for PWA build (#937) 2019-09-26 11:35:13 +02:00
src [OHIF-339] - workflow changes (#1931) 2020-08-04 10:11:23 +01:00
babel.config.js Make thumbnails display 2020-05-18 23:21:41 +02:00
CHANGELOG.md chore(release): publish [skip ci] 2020-05-12 14:49:58 +00:00
jest.config.js feat: 🎸 MeasurementService (#1314) 2020-02-10 14:15:05 -05:00
LICENSE Chore/kill yalc with fire (#629) 2019-08-13 15:36:46 -04:00
package.json OHIF-67: Fix Magnify issues by updating CornerstoneTools (#1923) 2020-07-24 21:51:52 +02:00
README.md feat: 🎸 Configuration so viewer tools can nix handles (#1304) 2019-12-20 12:15:40 -05:00

@ohif/extension-cornerstone

npm (scoped)

This extension adds support for viewing and manipulating 2D medical images via a viewport. The underlying implementation wraps the cornerstonejs/react-cornerstone-viewport, and provides basic commands and toolbar buttons for common actions.

Index

Extension Id: cornerstone

Commands Module

This extensions includes the following Commands and Command Definitions. These can be registered with @ohif/core's CommandManager. After registering the commands, they can be bound to hotkeys using the HotkeysManager and listed in the UserPreferences modal.

You can read more about [Commands][docs-commands], [Hotkeys][docs-hotkeys], and the [UserPreferences Modal][docs-userprefs] in their respective locations in the OHIF Viewer's documentation.

Command Name Description Store Contexts
rotateViewportCW viewports
rotateViewportCCW viewports
invertViewport viewports
flipViewportVertical viewports
flipViewportHorizontal viewports
scaleUpViewport viewports
scaleDownViewport viewports
fitViewportToWindow viewports
resetViewport viewports
clearAnnotations TODO
next/previous Image TODO
first/last Image TODO
nextViewportDisplaySet
previousViewportDisplaySet
setToolActive Activates tool for primary button/touch

Toolbar Module

Our toolbar module contains definitions for:

  • StackScroll
  • Zoom
  • Wwwc
  • Pan
  • Length
  • Angle
  • Reset
  • Cine

All use the ACTIVE_VIEWPORT::CORNERSTONE context.

Viewport Module

Our Viewport wraps [cornerstonejs/react-cornerstone-viewport][react-viewport] and is connected the redux store. This module is the most prone to change as we hammer out our Viewport interface.

Tool Configuration

Tools can be configured through extension configuration using the tools key:

  ...
  cornerstoneExtensionConfig: {
    tools: {
      ArrowAnnotate: {
        configuration: {
          getTextCallback: (callback, eventDetails) => callback(prompt('Enter your custom annotation')),
        },
      },
    },
  },
  ...

Annotate Tools Configuration

We currently support one property for annotation tools.

Hide handles

This extension configuration allows you to toggle on/off handle rendering for all annotate tools:

  ...
  cornerstoneExtensionConfig: {
    hideHandles: true,
  },
  ...

## Resources

### Repositories

- [cornerstonejs/react-cornerstone-viewport][react-viewport]
- [cornerstonejs/cornerstoneTools][cornerstone-tools]
- [cornerstonejs/cornerstone][cornerstone]

<!--
  Links
  -->

<!-- prettier-ignore-start -->
[docs-commands]: https://www.com
[docs-hotkeys]: https://www.com
[docs-userprefs]: htt
[react-viewport]: https://github.com/cornerstonejs/react-cornerstone-viewport
[cornerstone-tools]: https://github.com/cornerstonejs/cornerstoneTools
[cornerstone]: https://github.com/cornerstonejs/cornerstone
<!-- prettier-ignore-end -->