Compare commits

..
Author SHA1 Message Date
ohif-bot 7eb8c4c641 chore(release): publish [skip ci]
- @ohif/extension-vtk@1.7.15
 - @ohif/ui@1.5.7
 - @ohif/viewer@4.5.23
2020-11-02 10:35:07 +00:00
matthiasg 619f361510 fix: Reordered definitions in providers to prevent uninitialized var access (#2108) 2020-11-02 11:33:16 +01:00
ohif-bot 330eeaa216 chore(release): publish [skip ci]
- @ohif/extension-vtk@1.7.14
 - @ohif/viewer@4.5.22
2020-10-20 12:49:10 +00:00
James Petts d627dee3b2 Update crosshairs UI and fix bug where you could scroll offscreen. (#2126)
* Update crosshairs UI and fix bug where you could scroll offscreen.

* Update tests for removed rotate tool.
2020-10-20 14:45:52 +02:00
ohif-bot d8714ea9c4 chore(release): publish [skip ci]
- @ohif/extension-vtk@1.7.13
 - @ohif/viewer@4.5.21
2020-10-15 14:17:26 +00:00
James Petts 3c05920705 [IDC-2098] Update RVTKJSV (#2107)
* Update RVTKJSV

* Update react-vtkjs-viewport

* Fix WWWC tool with new rvtkjsv version
2020-10-15 16:15:28 +02:00
ohif-bot c6629bda75 chore(release): publish [skip ci]
- @ohif/extension-vtk@1.7.12
 - @ohif/viewer@4.5.20
2020-10-13 16:25:26 +00:00
James Petts 588bcc9d17 Throw error if data too large in WebGL 1 enabled browser (#2106) 2020-10-13 18:23:14 +02:00
ohif-bot c31f8f9d65 chore(release): publish [skip ci]
- @ohif/extension-vtk@1.7.11
 - @ohif/viewer@4.5.19
2020-10-13 13:06:12 +00:00
James Petts c0280e28ca Bring in rotatable crosshairs. (#2101)
* Bring in rotatable crosshairs.

* Pull in react-vtkjs-viewport 0.13.1 fix.
2020-10-13 15:00:01 +02:00
15 changed files with 289 additions and 135 deletions

No files matched your search

+40
View File
@@ -3,6 +3,46 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.7.15](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.14...@ohif/extension-vtk@1.7.15) (2020-11-02)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.7.14](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.13...@ohif/extension-vtk@1.7.14) (2020-10-20)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.7.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.12...@ohif/extension-vtk@1.7.13) (2020-10-15)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.7.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.11...@ohif/extension-vtk@1.7.12) (2020-10-13)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.7.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.10...@ohif/extension-vtk@1.7.11) (2020-10-13)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.7.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.9...@ohif/extension-vtk@1.7.10) (2020-10-07) ## [1.7.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.9...@ohif/extension-vtk@1.7.10) (2020-10-07)
**Note:** Version bump only for package @ohif/extension-vtk **Note:** Version bump only for package @ohif/extension-vtk
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-vtk", "name": "@ohif/extension-vtk",
"version": "1.7.10", "version": "1.7.15",
"description": "OHIF extension for VTK.js", "description": "OHIF extension for VTK.js",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",
@@ -50,11 +50,11 @@
"dependencies": { "dependencies": {
"@babel/runtime": "^7.5.5", "@babel/runtime": "^7.5.5",
"lodash.throttle": "^4.1.1", "lodash.throttle": "^4.1.1",
"react-vtkjs-viewport": "^0.10.4" "react-vtkjs-viewport": "^0.14.1"
}, },
"devDependencies": { "devDependencies": {
"@ohif/core": "^2.10.7", "@ohif/core": "^2.10.7",
"@ohif/ui": "^1.5.6", "@ohif/ui": "^1.5.7",
"cornerstone-tools": "^4.20.1", "cornerstone-tools": "^4.20.1",
"cornerstone-wado-image-loader": "^3.1.0", "cornerstone-wado-image-loader": "^3.1.0",
"dicom-parser": "^1.8.3", "dicom-parser": "^1.8.3",
+97 -18
View File
@@ -1,9 +1,9 @@
import throttle from 'lodash.throttle'; import throttle from 'lodash.throttle';
import { import {
vtkInteractorStyleMPRCrosshairs,
vtkInteractorStyleMPRWindowLevel, vtkInteractorStyleMPRWindowLevel,
vtkInteractorStyleRotatableMPRCrosshairs,
vtkSVGRotatableCrosshairsWidget,
vtkInteractorStyleMPRRotate, vtkInteractorStyleMPRRotate,
vtkSVGCrosshairsWidget,
} from 'react-vtkjs-viewport'; } from 'react-vtkjs-viewport';
import { getImageData } from 'react-vtkjs-viewport'; import { getImageData } from 'react-vtkjs-viewport';
import { vec3 } from 'gl-matrix'; import { vec3 } from 'gl-matrix';
@@ -11,11 +11,10 @@ import setMPRLayout from './utils/setMPRLayout.js';
import setViewportToVTK from './utils/setViewportToVTK.js'; import setViewportToVTK from './utils/setViewportToVTK.js';
import Constants from 'vtk.js/Sources/Rendering/Core/VolumeMapper/Constants.js'; import Constants from 'vtk.js/Sources/Rendering/Core/VolumeMapper/Constants.js';
import OHIFVTKViewport from './OHIFVTKViewport'; import OHIFVTKViewport from './OHIFVTKViewport';
import vtkCoordinate from 'vtk.js/Sources/Rendering/Core/Coordinate';
const { BlendMode } = Constants; const { BlendMode } = Constants;
const commandsModule = ({ commandsManager }) => { const commandsModule = ({ commandsManager, UINotificationService }) => {
// TODO: Put this somewhere else // TODO: Put this somewhere else
let apis = {}; let apis = {};
@@ -119,6 +118,14 @@ const commandsModule = ({ commandsManager }) => {
getVtkApis: ({ index }) => { getVtkApis: ({ index }) => {
return apis[index]; return apis[index];
}, },
resetMPRView() {
apis.forEach(api => {
api.resetOrientation();
});
// Reset the crosshairs
apis[0].svgWidgets.rotatableCrosshairsWidget.resetCrosshairs(apis, 0);
},
axial: async ({ viewports }) => { axial: async ({ viewports }) => {
const api = await _getActiveViewportVTKApi(viewports); const api = await _getActiveViewportVTKApi(viewports);
@@ -165,7 +172,7 @@ const commandsModule = ({ commandsManager }) => {
segmentNumber, segmentNumber,
frameIndex, frameIndex,
frame, frame,
done = () => { } done = () => {},
}) => { }) => {
let api = apis[viewports.activeViewportIndex]; let api = apis[viewports.activeViewportIndex];
@@ -180,10 +187,13 @@ const commandsModule = ({ commandsManager }) => {
displaySetInstanceUID, displaySetInstanceUID,
SOPClassUID, SOPClassUID,
SOPInstanceUID, SOPInstanceUID,
frameIndex, frameIndex
); );
const imageDataObject = getImageData(stack.imageIds, displaySetInstanceUID); const imageDataObject = getImageData(
stack.imageIds,
displaySetInstanceUID
);
let pixelIndex = 0; let pixelIndex = 0;
let x = 0; let x = 0;
@@ -209,9 +219,12 @@ const commandsModule = ({ commandsManager }) => {
y /= count; y /= count;
const position = [x, y, frameIndex]; const position = [x, y, frameIndex];
const worldPos = _convertModelToWorldSpace(position, imageDataObject.vtkImageData); const worldPos = _convertModelToWorldSpace(
position,
imageDataObject.vtkImageData
);
api.svgWidgets.crosshairsWidget.moveCrosshairs(worldPos, apis); api.svgWidgets.rotatableCrosshairsWidget.moveCrosshairs(worldPos, apis);
done(); done();
}, },
setSegmentationConfiguration: async ({ setSegmentationConfiguration: async ({
@@ -254,21 +267,38 @@ const commandsModule = ({ commandsManager }) => {
await Promise.all(promises); await Promise.all(promises);
}, },
enableRotateTool: () => { enableRotateTool: () => {
apis.forEach(api => { apis.forEach((api, apiIndex) => {
const istyle = vtkInteractorStyleMPRRotate.newInstance(); const istyle = vtkInteractorStyleMPRRotate.newInstance();
api.setInteractorStyle({ istyle }); api.setInteractorStyle({
istyle,
configuration: { apis, apiIndex, uid: api.uid },
});
}); });
}, },
enableCrosshairsTool: () => { enableCrosshairsTool: () => {
apis.forEach((api, apiIndex) => { apis.forEach((api, apiIndex) => {
const istyle = vtkInteractorStyleMPRCrosshairs.newInstance(); const istyle = vtkInteractorStyleRotatableMPRCrosshairs.newInstance();
api.setInteractorStyle({ api.setInteractorStyle({
istyle, istyle,
configuration: { apis, apiIndex }, configuration: {
apis,
apiIndex,
uid: api.uid,
},
}); });
}); });
const rotatableCrosshairsWidget =
apis[0].svgWidgets.rotatableCrosshairsWidget;
const referenceLines = rotatableCrosshairsWidget.getReferenceLines();
// Initilise crosshairs if not initialised.
if (!referenceLines) {
rotatableCrosshairsWidget.resetCrosshairs(apis, 0);
}
}, },
enableLevelTool: () => { enableLevelTool: () => {
function updateVOI(apis, windowWidth, windowCenter) { function updateVOI(apis, windowWidth, windowCenter) {
@@ -291,10 +321,14 @@ const commandsModule = ({ commandsManager }) => {
}, },
}; };
apis.forEach(api => { apis.forEach((api, apiIndex) => {
const istyle = vtkInteractorStyleMPRWindowLevel.newInstance(); const istyle = vtkInteractorStyleMPRWindowLevel.newInstance();
api.setInteractorStyle({ istyle, callbacks }); api.setInteractorStyle({
istyle,
callbacks,
configuration: { apis, apiIndex, uid: api.uid },
});
}); });
}, },
setSlabThickness: ({ slabThickness }) => { setSlabThickness: ({ slabThickness }) => {
@@ -391,18 +425,59 @@ const commandsModule = ({ commandsManager }) => {
// Add widgets and set default interactorStyle of each viewport. // Add widgets and set default interactorStyle of each viewport.
apis.forEach((api, apiIndex) => { apis.forEach((api, apiIndex) => {
api.addSVGWidget( api.addSVGWidget(
vtkSVGCrosshairsWidget.newInstance(), vtkSVGRotatableCrosshairsWidget.newInstance(),
'crosshairsWidget' 'rotatableCrosshairsWidget'
); );
const uid = api.uid; const uid = api.uid;
const istyle = vtkInteractorStyleMPRCrosshairs.newInstance(); const istyle = vtkInteractorStyleRotatableMPRCrosshairs.newInstance();
api.setInteractorStyle({ api.setInteractorStyle({
istyle, istyle,
configuration: { apis, apiIndex, uid }, configuration: { apis, apiIndex, uid },
}); });
api.svgWidgets.rotatableCrosshairsWidget.setApiIndex(apiIndex);
api.svgWidgets.rotatableCrosshairsWidget.setApis(apis);
}); });
const firstApi = apis[0];
// Initialise crosshairs
apis[0].svgWidgets.rotatableCrosshairsWidget.resetCrosshairs(apis, 0);
// Check if we have full WebGL 2 support
const openGLRenderWindow = apis[0].genericRenderWindow.getOpenGLRenderWindow();
if (!openGLRenderWindow.getWebgl2()) {
// Throw a warning if we don't have WebGL 2 support,
// And the volume is too big to fit in a 2D texture
const openGLContext = openGLRenderWindow.getContext();
const maxTextureSizeInBytes = openGLContext.getParameter(
openGLContext.MAX_TEXTURE_SIZE
);
const maxBufferLengthFloat32 =
(maxTextureSizeInBytes * maxTextureSizeInBytes) / 4;
const dimensions = firstApi.volumes[0]
.getMapper()
.getInputData()
.getDimensions();
const volumeLength = dimensions[0] * dimensions[1] * dimensions[2];
if (volumeLength > maxBufferLengthFloat32) {
UINotificationService.show({
title: 'Browser does not support WebGL 2',
message:
'This volume is too large to fit in WebGL 1 textures and will display incorrectly. Please use a different browser to view this data',
type: 'error',
autoClose: false,
});
}
}
}, },
}; };
@@ -456,6 +531,10 @@ const commandsModule = ({ commandsManager }) => {
commandFn: actions.enableLevelTool, commandFn: actions.enableLevelTool,
options: {}, options: {},
}, },
resetMPRView: {
commandFn: actions.resetMPRView,
options: {},
},
setBlendModeToComposite: { setBlendModeToComposite: {
commandFn: actions.setBlendModeToComposite, commandFn: actions.setBlendModeToComposite,
options: { blendMode: BlendMode.COMPOSITE_BLEND }, options: { blendMode: BlendMode.COMPOSITE_BLEND },
+3 -2
View File
@@ -27,8 +27,9 @@ const vtkExtension = {
getToolbarModule() { getToolbarModule() {
return toolbarModule; return toolbarModule;
}, },
getCommandsModule({ commandsManager }) { getCommandsModule({ commandsManager, servicesManager }) {
return commandsModule({ commandsManager }); const { UINotificationService } = servicesManager.services;
return commandsModule({ commandsManager, UINotificationService });
}, },
}; };
+12 -1
View File
@@ -25,6 +25,16 @@ const definitions = [
commandName: 'enableLevelTool', commandName: 'enableLevelTool',
commandOptions: {}, commandOptions: {},
}, },
{
id: 'Reset',
label: 'Reset',
icon: 'reset',
//
type: TOOLBAR_BUTTON_TYPES.COMMAND,
commandName: 'resetMPRView',
commandOptions: {},
},
/*
{ {
id: 'Rotate', id: 'Rotate',
label: 'Rotate', label: 'Rotate',
@@ -34,6 +44,7 @@ const definitions = [
commandName: 'enableRotateTool', commandName: 'enableRotateTool',
commandOptions: {}, commandOptions: {},
}, },
*/
/* /*
{ {
id: 'setBlendModeToComposite', id: 'setBlendModeToComposite',
@@ -131,4 +142,4 @@ const definitions = [
export default { export default {
definitions, definitions,
defaultContext: 'ACTIVE_VIEWPORT::VTK', defaultContext: 'ACTIVE_VIEWPORT::VTK',
} };
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.7](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.5.6...@ohif/ui@1.5.7) (2020-11-02)
### Bug Fixes
* Reordered definitions in providers to prevent uninitialized var access ([#2108](https://github.com/OHIF/Viewers/issues/2108)) ([619f361](https://github.com/OHIF/Viewers/commit/619f3615109d6cc4c69ff2f9fedbf83bd9309719))
## [1.5.6](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.5.5...@ohif/ui@1.5.6) (2020-10-06) ## [1.5.6](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.5.5...@ohif/ui@1.5.6) (2020-10-06)
**Note:** Version bump only for package @ohif/ui **Note:** Version bump only for package @ohif/ui
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/ui", "name": "@ohif/ui",
"version": "1.5.6", "version": "1.5.7",
"description": "A set of React components for Medical Imaging Viewers", "description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors", "author": "OHIF Contributors",
"license": "MIT", "license": "MIT",
@@ -45,36 +45,6 @@ const DialogProvider = ({ children, service }) => {
}; };
}; };
/**
* Sets the implementation of a dialog service that can be used by extensions.
*
* @returns void
*/
useEffect(() => {
if (service) {
service.setServiceImplementation({ create, dismiss, dismissAll });
}
}, [create, dismiss, service]);
/**
* UI Dialog
*
* @typedef {Object} DialogProps
* @property {string} id The dialog id.
* @property {DialogContent} content The dialog content.
* @property {Object} contentProps The dialog content props.
* @property {boolean} isDraggable Controls if dialog content is draggable or not.
* @property {boolean} showOverlay Controls dialog overlay.
* @property {boolean} centralize Center the dialog on the screen.
* @property {boolean} preservePosition Use last position instead of default.
* @property {ElementPosition} defaultPosition Specifies the `x` and `y` that the dragged item should start at.
* @property {Function} onStart Called when dragging starts. If `false` is returned any handler, the action will cancel.
* @property {Function} onStop Called when dragging stops.
* @property {Function} onDrag Called while dragging.
*/
useEffect(() => _bringToFront(lastDialogId), [_bringToFront, lastDialogId]);
/** /**
* Creates a new dialog and return its id. * Creates a new dialog and return its id.
* *
@@ -109,20 +79,15 @@ const DialogProvider = ({ children, service }) => {
); );
/** /**
* Dismisses all dialogs. * Sets the implementation of a dialog service that can be used by extensions.
* *
* @returns void * @returns void
*/ */
const dismissAll = () => { useEffect(() => {
setDialogs([]); if (service) {
}; service.setServiceImplementation({ create, dismiss, dismissAll });
}
/** }, [create, dismiss, service]);
* Indicate if there are no dialogs present.
*
* @returns True if no dialogs are present.
*/
const isEmpty = () => dialogs && dialogs.length < 1;
/** /**
* Moves the dialog to the foreground if clicked. * Moves the dialog to the foreground if clicked.
@@ -139,6 +104,41 @@ const DialogProvider = ({ children, service }) => {
}); });
}, []); }, []);
/**
* UI Dialog
*
* @typedef {Object} DialogProps
* @property {string} id The dialog id.
* @property {DialogContent} content The dialog content.
* @property {Object} contentProps The dialog content props.
* @property {boolean} isDraggable Controls if dialog content is draggable or not.
* @property {boolean} showOverlay Controls dialog overlay.
* @property {boolean} centralize Center the dialog on the screen.
* @property {boolean} preservePosition Use last position instead of default.
* @property {ElementPosition} defaultPosition Specifies the `x` and `y` that the dragged item should start at.
* @property {Function} onStart Called when dragging starts. If `false` is returned any handler, the action will cancel.
* @property {Function} onStop Called when dragging stops.
* @property {Function} onDrag Called while dragging.
*/
useEffect(() => _bringToFront(lastDialogId), [_bringToFront, lastDialogId]);
/**
* Dismisses all dialogs.
*
* @returns void
*/
const dismissAll = () => {
setDialogs([]);
};
/**
* Indicate if there are no dialogs present.
*
* @returns True if no dialogs are present.
*/
const isEmpty = () => dialogs && dialogs.length < 1;
const renderDialogs = () => const renderDialogs = () =>
dialogs.map(dialog => { dialogs.map(dialog => {
const { const {
@@ -219,14 +219,12 @@ const DialogProvider = ({ children, service }) => {
</Draggable> </Draggable>
); );
return ( return showOverlay ? (
showOverlay ? ( <div className="Overlay" key={id}>
<div className="Overlay" key={id}> {dragableItem()}
{dragableItem()} </div>
</div> ) : (
) : ( dragableItem()
dragableItem()
)
); );
}); });
@@ -249,11 +247,7 @@ const DialogProvider = ({ children, service }) => {
return ( return (
<DialogContext.Provider value={{ create, dismiss, dismissAll, isEmpty }}> <DialogContext.Provider value={{ create, dismiss, dismissAll, isEmpty }}>
{!isEmpty() && {!isEmpty() && <div className="DraggableArea">{renderDialogs()}</div>}
<div className="DraggableArea">
{renderDialogs()}
</div>
}
{children} {children}
</DialogContext.Provider> </DialogContext.Provider>
); );
@@ -41,17 +41,6 @@ const ModalProvider = ({ children, modal: Modal, service }) => {
const [options, setOptions] = useState(DEFAULT_OPTIONS); const [options, setOptions] = useState(DEFAULT_OPTIONS);
/**
* Sets the implementation of a modal service that can be used by extensions.
*
* @returns void
*/
useEffect(() => {
if (service) {
service.setServiceImplementation({ hide, show });
}
}, [hide, service, show]);
/** /**
* Show the modal and override its configuration props. * Show the modal and override its configuration props.
* *
@@ -71,6 +60,17 @@ const ModalProvider = ({ children, modal: Modal, service }) => {
DEFAULT_OPTIONS, DEFAULT_OPTIONS,
]); ]);
/**
* Sets the implementation of a modal service that can be used by extensions.
*
* @returns void
*/
useEffect(() => {
if (service) {
service.setServiceImplementation({ hide, show });
}
}, [hide, service, show]);
const { const {
content: ModalContent, content: ModalContent,
contentProps, contentProps,
@@ -27,17 +27,6 @@ const SnackbarProvider = ({ children, service }) => {
const [count, setCount] = useState(1); const [count, setCount] = useState(1);
const [snackbarItems, setSnackbarItems] = useState([]); const [snackbarItems, setSnackbarItems] = useState([]);
/**
* Sets the implementation of a notification service that can be used by extensions.
*
* @returns void
*/
useEffect(() => {
if (service) {
service.setServiceImplementation({ hide, show });
}
}, [service, hide, show]);
const show = useCallback( const show = useCallback(
options => { options => {
if (!options || (!options.title && !options.message)) { if (!options || (!options.title && !options.message)) {
@@ -92,6 +81,17 @@ const SnackbarProvider = ({ children, service }) => {
setSnackbarItems(() => []); setSnackbarItems(() => []);
}; };
/**
* Sets the implementation of a notification service that can be used by extensions.
*
* @returns void
*/
useEffect(() => {
if (service) {
service.setServiceImplementation({ hide, show });
}
}, [service, hide, show]);
/** /**
* expose snackbar methods to window for debug purposes * expose snackbar methods to window for debug purposes
* TODO: Check if it's really necessary * TODO: Check if it's really necessary
+40
View File
@@ -3,6 +3,46 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.5.23](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.22...@ohif/viewer@4.5.23) (2020-11-02)
**Note:** Version bump only for package @ohif/viewer
## [4.5.22](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.21...@ohif/viewer@4.5.22) (2020-10-20)
**Note:** Version bump only for package @ohif/viewer
## [4.5.21](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.20...@ohif/viewer@4.5.21) (2020-10-15)
**Note:** Version bump only for package @ohif/viewer
## [4.5.20](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.19...@ohif/viewer@4.5.20) (2020-10-13)
**Note:** Version bump only for package @ohif/viewer
## [4.5.19](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.18...@ohif/viewer@4.5.19) (2020-10-13)
**Note:** Version bump only for package @ohif/viewer
## [4.5.18](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.17...@ohif/viewer@4.5.18) (2020-10-12) ## [4.5.18](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.17...@ohif/viewer@4.5.18) (2020-10-12)
**Note:** Version bump only for package @ohif/viewer **Note:** Version bump only for package @ohif/viewer
@@ -36,9 +36,6 @@ describe('OHIF VTK Extension', () => {
cy.get('@wwwcBtn') cy.get('@wwwcBtn')
.should('be.visible') .should('be.visible')
.contains('WWWC'); .contains('WWWC');
cy.get('@rotateBtn')
.should('be.visible')
.contains('Rotate');
cy.get('@slabSlider') cy.get('@slabSlider')
.should('be.visible') .should('be.visible')
.contains('Slab Thickness'); .contains('Slab Thickness');
@@ -90,23 +87,4 @@ describe('OHIF VTK Extension', () => {
); );
}); });
}); });
it('checks Rotate tool', () => {
cy.get('@rotateBtn').click();
// Click and Move the mouse inside the viewport
cy.get('[data-cy="viewport-container-0"]')
.trigger('mousedown', 'center', {
which: 1,
})
.trigger('mousemove', 'top', { which: 1 })
.trigger('mousedown', 'center', {
which: 1,
})
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup', { which: 1 });
//Take Screenshot
cy.screenshot('VTK Rotate tool - Should rotate image');
});
}); });
@@ -47,7 +47,6 @@ export function initVTKToolsAliases() {
cy.get('[data-cy="exit 2d mpr"]').as('exit2dmprBtn'); cy.get('[data-cy="exit 2d mpr"]').as('exit2dmprBtn');
cy.get('[data-cy="crosshairs"]').as('crosshairsBtn'); cy.get('[data-cy="crosshairs"]').as('crosshairsBtn');
cy.get('[data-cy="wwwc"]').as('wwwcBtn'); cy.get('[data-cy="wwwc"]').as('wwwcBtn');
cy.get('[data-cy="rotate"]').as('rotateBtn');
cy.get('.slab-thickness').as('slabSlider'); cy.get('.slab-thickness').as('slabSlider');
cy.get('.select-ohif').as('modeDropdown'); cy.get('.select-ohif').as('modeDropdown');
cy.get('.ohif-check-label').as('modeCheckbox'); cy.get('.ohif-check-label').as('modeCheckbox');
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/viewer", "name": "@ohif/viewer",
"version": "4.5.18", "version": "4.5.23",
"description": "OHIF Viewer", "description": "OHIF Viewer",
"author": "OHIF Contributors", "author": "OHIF Contributors",
"license": "MIT", "license": "MIT",
@@ -57,9 +57,9 @@
"@ohif/extension-dicom-rt": "^0.4.9", "@ohif/extension-dicom-rt": "^0.4.9",
"@ohif/extension-dicom-segmentation": "^0.4.7", "@ohif/extension-dicom-segmentation": "^0.4.7",
"@ohif/extension-lesion-tracker": "^0.2.1", "@ohif/extension-lesion-tracker": "^0.2.1",
"@ohif/extension-vtk": "^1.7.10", "@ohif/extension-vtk": "^1.7.15",
"@ohif/i18n": "^0.52.8", "@ohif/i18n": "^0.52.8",
"@ohif/ui": "^1.5.6", "@ohif/ui": "^1.5.7",
"@tanem/react-nprogress": "^1.1.25", "@tanem/react-nprogress": "^1.1.25",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"core-js": "^3.2.1", "core-js": "^3.2.1",
+9 -8
View File
@@ -6539,13 +6539,14 @@ dateformat@^3.0.0:
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
dcmjs@0.16.3: dcmjs@0.16.5:
version "0.16.3" version "0.16.5"
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.16.3.tgz#ef44ccc4988a473fd40e1601122c57f2babded11" resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.16.5.tgz#05aa0c8d539a4d5777f996b9b796932d1f848993"
integrity sha512-pMQGifMpMW9i9ufCdUoEPHrLWnm6ilnpfLqUc+PPoWr7OnuBhiRVRunbv39oTtFDZOLhQ2Ampm7UrkidWAbqiA== integrity sha512-Y92KAx4JSfev79xjYhaukQZjWgyJlaHnXSTdbtkGkJAHERjIakgHcCIPmACuVmtW/nHViTu04zIGAB0pmZ4GaA==
dependencies: dependencies:
"@babel/polyfill" "^7.8.3" "@babel/polyfill" "^7.8.3"
"@babel/runtime" "^7.8.4" "@babel/runtime" "^7.8.4"
gl-matrix "^3.1.0"
loglevelnext "^3.0.1" loglevelnext "^3.0.1"
ndarray "^1.0.19" ndarray "^1.0.19"
@@ -16060,10 +16061,10 @@ react-transition-group@^4.1.1:
loose-envify "^1.4.0" loose-envify "^1.4.0"
prop-types "^15.6.2" prop-types "^15.6.2"
react-vtkjs-viewport@^0.10.4: react-vtkjs-viewport@^0.14.1:
version "0.10.4" version "0.14.1"
resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.10.4.tgz#eb038b0bf5c384bd3b45f2a0a57f52c682607fea" resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.14.1.tgz#32ecdbbe0e61066d8cbaa211933184d3ebda6603"
integrity sha512-J1WxwHbjlttEWvdkM33DJx8QxHr3J7HR6wFSDVBDKY7McK2lwDAdRN8wSqy2BVNILlyurUUVwg2tK2txiJ+tuw== integrity sha512-DAAF1yyEjq75BFYj/p/eO3/h6DiiGtEHJj/mbuk83LTgpcXlKNsYvQoh2oWWCyNVFo5hjBy8zlHUlRyKbu8GOg==
dependencies: dependencies:
date-fns "^2.2.1" date-fns "^2.2.1"
gl-matrix "^3.1.0" gl-matrix "^3.1.0"