Compare commits

...
9 changed files with 90 additions and 27 deletions

No files matched your search

+22
View File
@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.52.16](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.52.15...@ohif/extension-vtk@0.52.16) (2019-10-23)
### Bug Fixes
* 🐛 Switch to orhtographic view for 2D MPR ([#1074](https://github.com/OHIF/Viewers/issues/1074)) ([13d337a](https://github.com/OHIF/Viewers/commit/13d337aaabb8dadf6366c6262c5e47e7781edd08))
## [0.52.15](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.52.14...@ohif/extension-vtk@0.52.15) (2019-10-23)
### Performance Improvements
* ⚡️ Throttle UI refresh of synced WL value in vtk port ([#1070](https://github.com/OHIF/Viewers/issues/1070)) ([9d08e81](https://github.com/OHIF/Viewers/commit/9d08e81aa5def63a5e34f464aae099f7c29f0ac5))
## [0.52.14](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.52.13...@ohif/extension-vtk@0.52.14) (2019-10-22)
**Note:** Version bump only for package @ohif/extension-vtk
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-vtk",
"version": "0.52.14",
"version": "0.52.16",
"description": "OHIF extension for VTK.js",
"author": "OHIF",
"license": "MIT",
@@ -48,7 +48,8 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"react-vtkjs-viewport": "^0.3.1"
"lodash.throttle": "^4.1.1",
"react-vtkjs-viewport": "^0.3.5"
},
"devDependencies": {
"@ohif/core": "^1.4.0",
+4
View File
@@ -213,6 +213,10 @@ class OHIFVTKViewport extends Component {
volumeMapper.setSampleDistance(sampleDistance);
// Be generous to surpress warnings, as the logging really hurts performance.
// TODO: maybe we should auto adjust samples to 1000.
volumeMapper.setMaximumSamplesPerRay(4000);
volumeCache[displaySetInstanceUid] = volumeActor;
return volumeActor;
+11 -2
View File
@@ -9,6 +9,7 @@ import {
import setMPRLayout from './utils/setMPRLayout.js';
import setViewportToVTK from './utils/setViewportToVTK.js';
import Constants from 'vtk.js/Sources/Rendering/Core/VolumeMapper/Constants.js';
import throttle from 'lodash.throttle';
const { BlendMode } = Constants;
@@ -102,15 +103,23 @@ const actions = {
});
},
enableLevelTool: () => {
function updateVOI(apis, windowWidth, windowCenter) {
apis.forEach(api => {
api.updateVOI(windowWidth, windowCenter);
});
}
const throttledUpdateVOIs = throttle(updateVOI, 16, { trailing: true }); // ~ 60 fps
const callbacks = {
setOnLevelsChanged: ({ windowCenter, windowWidth }) => {
apis.forEach(api => {
const renderWindow = api.genericRenderWindow.getRenderWindow();
renderWindow.render();
api.updateVOI(windowWidth, windowCenter);
});
throttledUpdateVOIs(apis, windowWidth, windowCenter);
},
};
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.11.3](https://github.com/OHIF/Viewers/compare/@ohif/viewer@1.11.2...@ohif/viewer@1.11.3) (2019-10-23)
### Bug Fixes
* 🐛 Switch to orhtographic view for 2D MPR ([#1074](https://github.com/OHIF/Viewers/issues/1074)) ([13d337a](https://github.com/OHIF/Viewers/commit/13d337aaabb8dadf6366c6262c5e47e7781edd08))
## [1.11.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@1.11.1...@ohif/viewer@1.11.2) (2019-10-23)
**Note:** Version bump only for package @ohif/viewer
## [1.11.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@1.11.0...@ohif/viewer@1.11.1) (2019-10-23)
**Note:** Version bump only for package @ohif/viewer
# [1.11.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@1.10.3...@ohif/viewer@1.11.0) (2019-10-22)
@@ -57,12 +57,11 @@ describe('OHIF Cornerstone Toolbar', () => {
//drags the mouse inside the viewport to be able to interact with series
cy.get('@viewport')
.trigger('mousedown', 'top', { which: 1 })
.trigger('mousemove', 'center', { which: 1 })
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup');
const expectedText =
'Ser: 1Img: 14 14/26256 x 256Loc: 0.00 mm Thick: 5.00 mm';
'Ser: 1Img: 1 1/26256 x 256Loc: -30.00 mm Thick: 5.00 mm';
cy.get('@viewportInfoBottomLeft').should('have.text', expectedText);
});
@@ -76,11 +75,11 @@ describe('OHIF Cornerstone Toolbar', () => {
//drags the mouse inside the viewport to be able to interact with series
cy.get('@viewport')
.trigger('mousedown', 'top', { which: 1 })
.trigger('mousemove', 'center', { which: 1 })
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup');
const expectedText = 'Zoom: 884%W: 820 L: 410Lossless / Uncompressed';
const expectedText = 'Zoom: 50%W: 958 L: 479Lossless / Uncompressed';
cy.get('@viewportInfoBottomRight').should('have.text', expectedText);
});
@@ -94,14 +93,14 @@ describe('OHIF Cornerstone Toolbar', () => {
//drags the mouse inside the viewport to be able to interact with series
cy.get('@viewport')
.trigger('mousedown', 'top', { which: 1 })
.trigger('mousemove', 'center', { which: 1 })
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup')
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'left', { which: 1 })
.trigger('mouseup');
const expectedText = 'Zoom: 211%W: 544 L: 626Lossless / Uncompressed';
const expectedText = 'Zoom: 211%W: 635 L: 226Lossless / Uncompressed';
cy.get('@viewportInfoBottomRight').should('have.text', expectedText);
});
@@ -197,7 +196,7 @@ describe('OHIF Cornerstone Toolbar', () => {
//Click on reset button
cy.get('@resetBtn').click();
const expectedText = 'Zoom: 211%W: 820 L: 410Lossless / Uncompressed';
const expectedText = 'Zoom: 211%W: 958 L: 479Lossless / Uncompressed';
cy.get('@viewportInfoBottomRight').should('have.text', expectedText);
});
+2 -1
View File
@@ -44,7 +44,8 @@ Cypress.Commands.add('openStudy', patientName => {
cy.wait('@getStudies');
cy.get('#studyListData .studylistStudy', { timeout: 5000 })
.contains(patientName)
.first().click();
.first()
.click({ force: true });
});
/**
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "1.11.0",
"version": "1.11.3",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -50,7 +50,7 @@
"@ohif/extension-dicom-html": "^1.0.0",
"@ohif/extension-dicom-microscopy": "^0.50.6",
"@ohif/extension-dicom-pdf": "^1.0.0",
"@ohif/extension-vtk": "^0.52.14",
"@ohif/extension-vtk": "^0.52.16",
"@ohif/i18n": "^0.51.0",
"@ohif/ui": "^0.56.0",
"@tanem/react-nprogress": "^1.1.25",
@@ -82,7 +82,7 @@
"redux-oidc": "3.1.x",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"vtk.js": "^11.6.0"
"vtk.js": "^11.7.1"
},
"devDependencies": {
"cypress": "^3.3.1",
+8 -8
View File
@@ -15495,10 +15495,10 @@ react-transition-group@^4.1.1:
loose-envify "^1.4.0"
prop-types "^15.6.2"
react-vtkjs-viewport@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.3.1.tgz#8451364fb1ae1120281d1dddd113a79e5541bf8d"
integrity sha512-W27REfFbl2zsDXzpKRkV1GSwyU4jWHEhG6rnRdPjWq5dYkEwyvdyPhcz7qcGbsU1MTqyNRwVDP/9YV/vR+BWNg==
react-vtkjs-viewport@^0.3.5:
version "0.3.5"
resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.3.5.tgz#772a5e51e1a8f7e9ca170e9044bee28debf04002"
integrity sha512-JeSrS0oaV5fcHTN8VOGzP4ayM0K4PNoPrEYpyw9CGHbBFivshEiQnbyDqpPxkbHJrLCf2dNKTqbI3A5cL4iTZQ==
dependencies:
date-fns "^2.2.1"
gl-matrix "^3.1.0"
@@ -19043,10 +19043,10 @@ void-elements@^2.0.1:
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=
vtk.js@^11.6.0:
version "11.7.0"
resolved "https://registry.yarnpkg.com/vtk.js/-/vtk.js-11.7.0.tgz#c06782080a3077a5380d438d576b6aae7f776f67"
integrity sha512-nQ6dTdAUNICiTtU1bFBSgYPccOd8zEeatMBF/XrWGfDhC0QX63FbrgcuFRXWRjzMofC5wLiclYFqlMI6PswxIQ==
vtk.js@^11.7.1:
version "11.7.1"
resolved "https://registry.yarnpkg.com/vtk.js/-/vtk.js-11.7.1.tgz#e9527c75d84e292c5d25fc4cacf62d42c777930e"
integrity sha512-r6KTDYRF+XBq8gvoi27HJs+1DN4E39FX1k9i15el6JXRuZQebnBjWZ0W8XlfM8Nc6AAAax6DdauBFZdhyG0s/Q==
dependencies:
blueimp-md5 "2.10.0"
commander "2.11.0"