Compare commits

...
Author SHA1 Message Date
ohif-bot 144a173306 chore(release): publish [skip ci]
- @ohif/extension-cornerstone@1.1.0
 - @ohif/extension-vtk@0.50.12
 - @ohif/ui@0.51.0
 - @ohif/viewer@1.1.0
2019-09-12 03:07:49 +00:00
Romulo Bordezani e40cbae113 feat(BidirectionalTool): Add BidrectionalTool to "more" menu (#911)
* feat(Bidirectional Tool)

* feat(Bidirectional Tool)
2019-09-11 22:53:06 -04:00
Romulo Bordezani 698d274c64 feat(EraserTool): add eraserTool to @ohif/extension-cornerstone (#912)
This includes `ui` changes in the same commit, so it will see a feature bump as well
2019-09-11 16:28:14 -04:00
ladeirarodolfo c221dd86d2 feat: 🎸 Load local file or folder using native dialog (#870)
Created to specialized dropzone elements to take care of loading local
file/folder from dialog

Closes: 847
2019-09-10 23:30:53 -04:00
Danny Brown a8c3d1b9a2 docs: runtime extensions (#908)
* docs: runtime extensions

* docs: small readability changes

* docs: clarity
2019-09-10 22:50:13 -04:00
14 changed files with 171 additions and 17 deletions

No files matched your search

@@ -49,7 +49,7 @@ window.config = {
};
```
<ol start="5"><li>
<ol start="3"><li>
Render the viewer in the web page's target <code>div</code>
</li></ol>
@@ -66,7 +66,41 @@ window.OHIFViewer.installViewer(
);
```
#### Tips & Tricks
You can see a live example of this recipe in [this CodeSandbox][code-sandbox].
## Add Extensions
The UMD build of the OHIF Viewer is a "light weight" build that only contains
the core extensions required for basic 2D image viewing. It's possible to add
other extensions at runtime.
This only requires us to include a single script tag, and add it using the
`extensions` key to our config. In this practical example, we register our
popular whole slide microscopy extension:
```html
<script
src="https://unpkg.com/@ohif/extension-dicom-microscopy@0.50.5/dist/index.umd.js"
crossorigin
></script>
<!-- --->
<script>
window.config = {
// ...
extensions: [OHIFExtDicomMicroscopy],
};
</script>
```
You can see an example of a slide microscopy study in the viewer [with the
extension enabled here][whole-slide-ext-demo] ([source code][ext-code-sandbox])
and [without it here][whole-slide-base-demo] ([source code][code-sandbox]).
You can read more about extensions and how to create your own in our
[extensions guide](/advanced/extensions.md).
#### FAQ
> I'm having trouble getting this to work. Where can I go for help?
@@ -99,4 +133,9 @@ conflict issues.
LINKS
-->
<!-- prettier-ignore-start -->
[code-sandbox]: https://codesandbox.io/s/ohif-script-tag-v103-iniiu
[whole-slide-base-demo]: https://iniiu.csb.app/viewer/1.2.392.200140.2.1.1.1.2.799008771.2020.1519719354.757
[ext-code-sandbox]: https://codesandbox.io/s/ohif-script-tag-v103-runtime-extensions-34bw5
[whole-slide-ext-demo]: https://34bw5.csb.app/viewer/1.2.392.200140.2.1.1.1.2.799008771.2448.1519719572.518
<!-- prettier-ignore-end -->
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.1.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.0.1...@ohif/extension-cornerstone@1.1.0) (2019-09-12)
### Features
* **BidirectionalTool:** Add BidrectionalTool to "more" menu ([#911](https://github.com/OHIF/Viewers/issues/911)) ([e40cbae](https://github.com/OHIF/Viewers/commit/e40cbae))
* **EraserTool:** add eraserTool to @ohif/extension-cornerstone ([#912](https://github.com/OHIF/Viewers/issues/912)) ([698d274](https://github.com/OHIF/Viewers/commit/698d274))
## [1.0.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.0.0...@ohif/extension-cornerstone@1.0.1) (2019-09-10)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "1.0.1",
"version": "1.1.0",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -186,6 +186,24 @@ const definitions = [
type: TOOLBAR_BUTTON_TYPES.COMMAND,
commandName: 'clearAnnotations',
},
{
id: 'Bidirectional',
label: 'Bidirectional',
icon: 'measure-target',
//
type: TOOLBAR_BUTTON_TYPES.COMMAND,
commandName: 'setToolActive',
commandOptions: { toolName: 'Bidirectional' },
},
{
id: 'Eraser',
label: 'Eraser',
icon: 'eraser',
//
type: TOOLBAR_BUTTON_TYPES.COMMAND,
commandName: 'setToolActive',
commandOptions: { toolName: 'Eraser' },
},
],
},
];
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.11...@ohif/extension-vtk@0.50.12) (2019-09-12)
**Note:** Version bump only for package @ohif/extension-vtk
## [0.50.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.10...@ohif/extension-vtk@0.50.11) (2019-09-10)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-vtk",
"version": "0.50.11",
"version": "0.50.12",
"description": "OHIF extension for VTK.js",
"author": "OHIF",
"license": "MIT",
@@ -52,7 +52,7 @@
},
"devDependencies": {
"@ohif/core": "^0.50.8",
"@ohif/ui": "^0.50.4",
"@ohif/ui": "^0.51.0",
"cornerstone-tools": "^4.0.0",
"cornerstone-wado-image-loader": "^3.0.0",
"dcmjs": "^0.6.0",
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.51.0](https://github.com/OHIF/Viewers/compare/@ohif/ui@0.50.4...@ohif/ui@0.51.0) (2019-09-12)
### Features
* **EraserTool:** add eraserTool to @ohif/extension-cornerstone ([#912](https://github.com/OHIF/Viewers/issues/912)) ([698d274](https://github.com/OHIF/Viewers/commit/698d274))
## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/ui@0.50.3...@ohif/ui@0.50.4) (2019-09-06)
**Note:** Version bump only for package @ohif/ui
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui",
"version": "0.50.4",
"version": "0.51.0",
"description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors",
"license": "MIT",
+2
View File
@@ -30,6 +30,7 @@ import edit from './icons/edit.svg';
import ellipseCircle from './icons/ellipse-circle.svg';
import ellipseH from './icons/ellipse-h.svg';
import ellipseV from './icons/ellipse-v.svg';
import eraser from './icons/eraser.svg';
import exclamationCircle from './icons/exclamation-circle.svg';
import exclamationTriangle from './icons/exclamation-triangle.svg';
import fastBackward from './icons/fast-backward.svg';
@@ -110,6 +111,7 @@ const ICONS = {
'create-comment': createComment,
'create-screen-capture': createScreenCapture,
edit,
eraser,
'fast-backward': fastBackward,
'fast-forward': fastForward,
'object-group': objectGroup,
@@ -0,0 +1,15 @@
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 2048 1792"
aria-labelledby="eraser"
width="1em"
height="1em"
fill="currentColor"
>
<title id="title">Eraser</title>
<path transform="translate(0,1792) scale(1,-1)" fill="ACTIVE_COLOR" d="M960 1408l336-384h-768l-336 384h768zm1013-1077q15
34 9.5 71.5t-30.5 65.5l-896 1024q-38 44-96 44h-768q-38
0-69.5-20.5t-47.5-54.5q-15-34-9.5-71.5t30.5-65.5l896-1024q38-44 96-44h768q38
0 69.5 20.5t47.5 54.5z"
/>
</svg>

After

Width:  |  Height:  |  Size: 492 B

+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.1.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@1.0.5...@ohif/viewer@1.1.0) (2019-09-12)
### Features
* 🎸 Load local file or folder using native dialog ([#870](https://github.com/OHIF/Viewers/issues/870)) ([c221dd8](https://github.com/OHIF/Viewers/commit/c221dd8))
## [1.0.5](https://github.com/OHIF/Viewers/compare/@ohif/viewer@1.0.4...@ohif/viewer@1.0.5) (2019-09-10)
**Note:** Version bump only for package @ohif/viewer
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "1.0.5",
"version": "1.1.0",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -45,13 +45,13 @@
"dependencies": {
"@babel/runtime": "^7.5.5",
"@ohif/core": "^0.50.8",
"@ohif/extension-cornerstone": "^1.0.1",
"@ohif/extension-cornerstone": "^1.1.0",
"@ohif/extension-dicom-html": "^0.50.6",
"@ohif/extension-dicom-microscopy": "^0.50.5",
"@ohif/extension-dicom-pdf": "^0.50.4",
"@ohif/extension-vtk": "^0.50.11",
"@ohif/extension-vtk": "^0.50.12",
"@ohif/i18n": "^0.50.4",
"@ohif/ui": "^0.50.4",
"@ohif/ui": "^0.51.0",
"@tanem/react-nprogress": "^1.1.25",
"classnames": "^2.2.6",
"core-js": "^3.2.1",
@@ -13,3 +13,8 @@
.drag-drop-instructions h4 {
color: var(--text-secondary-color);
}
.link-dialog {
color: var(--active-color);
cursor: pointer;
}
@@ -12,6 +12,44 @@ import { withTranslation } from 'react-i18next';
const { OHIFStudyMetadata } = metadata;
const { studyMetadataManager, updateMetaDataManager } = utils;
const dropZoneLinkDialog = (onDrop, i18n, dir) => {
return (
<Dropzone onDrop={onDrop} noDrag>
{({ getRootProps, getInputProps }) => (
<span {...getRootProps()} className="link-dialog">
{dir ? (
<span>
{i18n('Load folders')}
<input
{...getInputProps()}
webkitdirectory="true"
mozdirectory="true"
/>
</span>
) : (
<span>
{i18n('Load files')}
<input {...getInputProps()} />
</span>
)}
</span>
)}
</Dropzone>
);
};
const linksDialogMessage = (onDrop, i18n) => {
return (
<>
{i18n('Or click to ')}
{dropZoneLinkDialog(onDrop, i18n)}
{i18n(' or ')}
{dropZoneLinkDialog(onDrop, i18n, true)}
{i18n(' from dialog')}
</>
);
};
class ViewerLocalFileData extends Component {
static propTypes = {
studies: PropTypes.array,
@@ -73,7 +111,7 @@ class ViewerLocalFileData extends Component {
}
return (
<Dropzone onDrop={onDrop}>
<Dropzone onDrop={onDrop} noClick>
{({ getRootProps, getInputProps }) => (
<div {...getRootProps()} style={{ width: '100%', height: '100%' }}>
{this.state.studies ? (
@@ -96,15 +134,10 @@ class ViewerLocalFileData extends Component {
'Drag and Drop DICOM files here to load them in the Viewer'
)}
</h3>
<h4>
{this.props.t(
"Or click to load the browser's file selector"
)}
</h4>
<h4>{linksDialogMessage(onDrop, this.props.t)}</h4>
</>
)}
</div>
<input {...getInputProps()} style={{ display: 'none' }} />
</div>
)}
</div>