@ohif/extension-cornerstone 2.12.16 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -142
- package/dist/ohif-extension-cornerstone.css +4 -0
- package/dist/ohif-extension-cornerstone.umd.js +3 -0
- package/dist/ohif-extension-cornerstone.umd.js.LICENSE.txt +74 -0
- package/dist/ohif-extension-cornerstone.umd.js.map +1 -0
- package/package.json +37 -29
- package/CHANGELOG.md +0 -965
- package/dist/index.umd.js +0 -3
- package/dist/index.umd.js.LICENSE +0 -3300
- package/dist/index.umd.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,142 +1 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
This extension adds support for viewing and manipulating 2D medical images via a
|
|
6
|
-
viewport. The underlying implementation wraps the
|
|
7
|
-
`cornerstonejs/react-cornerstone-viewport`, and provides basic commands and
|
|
8
|
-
toolbar buttons for common actions.
|
|
9
|
-
|
|
10
|
-
<!-- TODO: Simple image or GIF? -->
|
|
11
|
-
|
|
12
|
-
#### Index
|
|
13
|
-
|
|
14
|
-
Extension Id: `cornerstone`
|
|
15
|
-
|
|
16
|
-
- [Commands Module](#commands-module)
|
|
17
|
-
- [Toolbar Module](#toolbar-module)
|
|
18
|
-
- [Viewport Module](#viewport-module)
|
|
19
|
-
|
|
20
|
-
## Commands Module
|
|
21
|
-
|
|
22
|
-
This extensions includes the following `Commands` and `Command Definitions`.
|
|
23
|
-
These can be registered with `@ohif/core`'s `CommandManager`. After registering
|
|
24
|
-
the commands, they can be bound to `hotkeys` using the `HotkeysManager` and
|
|
25
|
-
listed in the `UserPreferences` modal.
|
|
26
|
-
|
|
27
|
-
You can read more about [`Commands`][docs-commands], [`Hotkeys`][docs-hotkeys],
|
|
28
|
-
and the [`UserPreferences` Modal][docs-userprefs] in their respective locations
|
|
29
|
-
in the OHIF Viewer's documentation.
|
|
30
|
-
|
|
31
|
-
| Command Name | Description | Store Contexts |
|
|
32
|
-
| ---------------------------- | --------------------------------------- | -------------- |
|
|
33
|
-
| `rotateViewportCW` | | viewports |
|
|
34
|
-
| `rotateViewportCCW` | | viewports |
|
|
35
|
-
| `invertViewport` | | viewports |
|
|
36
|
-
| `flipViewportVertical` | | viewports |
|
|
37
|
-
| `flipViewportHorizontal` | | viewports |
|
|
38
|
-
| `scaleUpViewport` | | viewports |
|
|
39
|
-
| `scaleDownViewport` | | viewports |
|
|
40
|
-
| `fitViewportToWindow` | | viewports |
|
|
41
|
-
| `resetViewport` | | viewports |
|
|
42
|
-
| clearAnnotations | TODO | |
|
|
43
|
-
| next/previous Image | TODO | |
|
|
44
|
-
| first/last Image | TODO | |
|
|
45
|
-
| `nextViewportDisplaySet` | | |
|
|
46
|
-
| `previousViewportDisplaySet` | | |
|
|
47
|
-
| `setToolActive` | Activates tool for primary button/touch | |
|
|
48
|
-
|
|
49
|
-
## Toolbar Module
|
|
50
|
-
|
|
51
|
-
Our toolbar module contains definitions for:
|
|
52
|
-
|
|
53
|
-
- `StackScroll`
|
|
54
|
-
- `Zoom`
|
|
55
|
-
- `Wwwc`
|
|
56
|
-
- `Pan`
|
|
57
|
-
- `Length`
|
|
58
|
-
- `Angle`
|
|
59
|
-
- `Reset`
|
|
60
|
-
- `Cine`
|
|
61
|
-
|
|
62
|
-
All use the `ACTIVE_VIEWPORT::CORNERSTONE` context.
|
|
63
|
-
|
|
64
|
-
## Viewport Module
|
|
65
|
-
|
|
66
|
-
Our Viewport wraps [cornerstonejs/react-cornerstone-viewport][react-viewport]
|
|
67
|
-
and is connected the redux store. This module is the most prone to change as we
|
|
68
|
-
hammer out our Viewport interface.
|
|
69
|
-
|
|
70
|
-
## Tool Configuration
|
|
71
|
-
|
|
72
|
-
Tools can be configured through extension configuration using the tools key:
|
|
73
|
-
|
|
74
|
-
```js
|
|
75
|
-
...
|
|
76
|
-
cornerstoneExtensionConfig: {
|
|
77
|
-
tools: {
|
|
78
|
-
ArrowAnnotate: {
|
|
79
|
-
configuration: {
|
|
80
|
-
getTextCallback: (callback, eventDetails) => callback(prompt('Enter your custom annotation')),
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
...
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Stack prefetch configuration
|
|
89
|
-
|
|
90
|
-
Stack prefetch can be configured through extension configuration using the
|
|
91
|
-
stackPrefetch key:
|
|
92
|
-
|
|
93
|
-
```js
|
|
94
|
-
...
|
|
95
|
-
cornerstoneExtensionConfig: {
|
|
96
|
-
stackPrefetch: {
|
|
97
|
-
enabled: true,
|
|
98
|
-
maxImagesToPrefetch: Infinity,
|
|
99
|
-
preserveExistingPool: false,
|
|
100
|
-
maxSimultaneousRequests: 20,
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
...
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Annotate Tools Configuration
|
|
107
|
-
|
|
108
|
-
_We currently support one property for annotation tools._
|
|
109
|
-
|
|
110
|
-
### Hide handles
|
|
111
|
-
|
|
112
|
-
This extension configuration allows you to toggle on/off handle rendering for
|
|
113
|
-
all annotate tools:
|
|
114
|
-
|
|
115
|
-
```js
|
|
116
|
-
...
|
|
117
|
-
cornerstoneExtensionConfig: {
|
|
118
|
-
hideHandles: true,
|
|
119
|
-
},
|
|
120
|
-
...
|
|
121
|
-
|
|
122
|
-
## Resources
|
|
123
|
-
|
|
124
|
-
### Repositories
|
|
125
|
-
|
|
126
|
-
- [cornerstonejs/react-cornerstone-viewport][react-viewport]
|
|
127
|
-
- [cornerstonejs/cornerstoneTools][cornerstone-tools]
|
|
128
|
-
- [cornerstonejs/cornerstone][cornerstone]
|
|
129
|
-
|
|
130
|
-
<!--
|
|
131
|
-
Links
|
|
132
|
-
-->
|
|
133
|
-
|
|
134
|
-
<!-- prettier-ignore-start -->
|
|
135
|
-
[docs-commands]: https://www.com
|
|
136
|
-
[docs-hotkeys]: https://www.com
|
|
137
|
-
[docs-userprefs]: htt
|
|
138
|
-
[react-viewport]: https://github.com/cornerstonejs/react-cornerstone-viewport
|
|
139
|
-
[cornerstone-tools]: https://github.com/cornerstonejs/cornerstoneTools
|
|
140
|
-
[cornerstone]: https://github.com/cornerstonejs/cornerstone
|
|
141
|
-
<!-- prettier-ignore-end -->
|
|
142
|
-
```
|
|
1
|
+
# Cornerstone
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
.dicom-upload-drop-area-border-dash{background-image:repeating-linear-gradient(90deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000),repeating-linear-gradient(90deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000),repeating-linear-gradient(180deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000),repeating-linear-gradient(180deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000);background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;background-size:20px 3px,20px 3px,3px 20px,3px 20px}
|
|
2
|
+
.cornerstone-viewport-element,.viewport-wrapper{height:100%;position:relative;width:100%}.cornerstone-viewport-element{background-color:#000;outline:0!important;overflow:hidden}
|
|
3
|
+
.viewport-overlay{max-width:40%}.viewport-overlay span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.viewport-overlay.left-viewport{text-align:left}.viewport-overlay.right-viewport-scrollbar{text-align:right}.viewport-overlay.right-viewport-scrollbar .flex.flex-row{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}
|
|
4
|
+
.ViewportOrientationMarkers{--marker-width:100px;--marker-height:100px;--scrollbar-width:20px;font-size:15px;line-height:18px;pointer-events:none}.ViewportOrientationMarkers .orientation-marker{position:absolute}.ViewportOrientationMarkers .top-mid{left:50%;top:.6rem}.ViewportOrientationMarkers .left-mid{left:5px;top:47%}.ViewportOrientationMarkers .right-mid{left:calc(100% - var(--marker-width) - var(--scrollbar-width));top:47%}.ViewportOrientationMarkers .bottom-mid{left:47%;top:calc(100% - var(--marker-height) - .6rem)}.ViewportOrientationMarkers .right-mid .orientation-marker-value{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;min-width:var(--marker-width)}.ViewportOrientationMarkers .bottom-mid .orientation-marker-value{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;min-height:var(--marker-height)}
|