Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef28fa2ac1 | ||
|
|
779a7e0976 | ||
|
|
7f3ca1fc23 | ||
|
|
59ab68b4ed | ||
|
|
248bc0a64a | ||
|
|
5fdace1432 | ||
|
|
71b6b454a3 | ||
|
|
3b02a06f5e | ||
|
|
ebdcde1c4d | ||
|
|
829ac2b410 | ||
|
|
09745a0349 | ||
|
|
cd73dd3027 |
No files matched your search
@@ -11,6 +11,7 @@ node -v
|
||||
|
||||
# Install build deps and all monorepo package dependencies. Yarn Workspaces
|
||||
# should also symlink all projects appropriately
|
||||
yarn run lerna:restore
|
||||
yarn install --no-ignore-optional --pure-lockfile
|
||||
|
||||
# Build && Move PWA Output
|
||||
|
||||
@@ -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.
|
||||
|
||||
## [2.9.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.9.1...@ohif/extension-cornerstone@2.9.2) (2020-08-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Updated react-cornerstone-viewport to version 4.0.2 ([#2001](https://github.com/OHIF/Viewers/issues/2001)) ([59ab68b](https://github.com/OHIF/Viewers/commit/59ab68b4edbfec010170c4429c300a53f688bf94))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.9.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.9.0...@ohif/extension-cornerstone@2.9.1) (2020-08-20)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **stackPrefetch:** Added stackPrefetch config with 20 max concurrent requests ([#2000](https://github.com/OHIF/Viewers/issues/2000)) ([3b02a06](https://github.com/OHIF/Viewers/commit/3b02a06f5e250660edde4862ce44147db3dc3ab9))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.9.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.8.5...@ohif/extension-cornerstone@2.9.0) (2020-08-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone",
|
||||
"version": "2.9.0",
|
||||
"version": "2.9.2",
|
||||
"description": "OHIF extension for Cornerstone",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -51,6 +51,6 @@
|
||||
"classnames": "^2.2.6",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"react-cornerstone-viewport": "4.0.1"
|
||||
"react-cornerstone-viewport": "4.0.2"
|
||||
}
|
||||
}
|
||||
@@ -34,4 +34,11 @@ export default function(configuration = {}) {
|
||||
cornerstoneTools.toolColors.setActiveColor('rgb(0, 255, 0)');
|
||||
|
||||
cornerstoneTools.store.state.touchProximity = 40;
|
||||
|
||||
// Configure stack prefetch
|
||||
cornerstoneTools.stackPrefetch.setConfiguration({
|
||||
maxImagesToPrefetch: Infinity,
|
||||
preserveExistingPool: false,
|
||||
maxSimultaneousRequests: 20,
|
||||
});
|
||||
}
|
||||
@@ -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.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.0...@ohif/extension-vtk@1.7.1) (2020-08-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 🐛 Fail gracefully on an MPR load error ([#1992](https://github.com/OHIF/Viewers/issues/1992)) ([779a7e0](https://github.com/OHIF/Viewers/commit/779a7e0976aa3a2d2bf1dc8f056950f0545c9fff))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.7.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.10...@ohif/extension-vtk@1.7.0) (2020-08-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-vtk",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"description": "OHIF extension for VTK.js",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -50,7 +50,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"react-vtkjs-viewport": "^0.10.3"
|
||||
"react-vtkjs-viewport": "^0.10.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ohif/core": "^2.10.0",
|
||||
|
||||
@@ -32,16 +32,16 @@ class LoadingIndicator extends PureComponent {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="imageViewerLoadingIndicator loadingIndicator">
|
||||
<div className="indicatorContents">
|
||||
<p>
|
||||
{this.props.t('Loading...')}
|
||||
<i className="fa fa-spin fa-circle-o-notch fa-fw" />
|
||||
{percComplete}
|
||||
</p>
|
||||
</div>
|
||||
<div className="imageViewerLoadingIndicator loadingIndicator">
|
||||
<div className="indicatorContents">
|
||||
<p>
|
||||
{this.props.t('Loading...')}
|
||||
<i className="fa fa-spin fa-circle-o-notch fa-fw" />
|
||||
{percComplete}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -50,22 +50,25 @@ class OHIFVTKViewport extends Component {
|
||||
volumes: null,
|
||||
paintFilterLabelMapImageData: null,
|
||||
paintFilterBackgroundImageData: null,
|
||||
percentComplete: 0,
|
||||
isLoaded: false,
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
viewportData: PropTypes.shape({
|
||||
studies: PropTypes.array,
|
||||
studies: PropTypes.array.isRequired,
|
||||
displaySet: PropTypes.shape({
|
||||
StudyInstanceUID: PropTypes.string,
|
||||
displaySetInstanceUID: PropTypes.string,
|
||||
StudyInstanceUID: PropTypes.string.isRequired,
|
||||
displaySetInstanceUID: PropTypes.string.isRequired,
|
||||
sopClassUIDs: PropTypes.arrayOf(PropTypes.string),
|
||||
SOPInstanceUID: PropTypes.string,
|
||||
frameIndex: PropTypes.number,
|
||||
}),
|
||||
}),
|
||||
viewportIndex: PropTypes.number,
|
||||
viewportIndex: PropTypes.number.isRequired,
|
||||
children: PropTypes.node,
|
||||
onScroll: PropTypes.func,
|
||||
servicesManager: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
@@ -383,6 +386,24 @@ class OHIFVTKViewport extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
const onPixelDataInsertedErrorCallback = error => {
|
||||
const { UINotificationService } = this.props.servicesManager.services;
|
||||
|
||||
if (!this.hasError) {
|
||||
if (this.props.viewportIndex === 0) {
|
||||
// Only show the notification from one viewport 1 in MPR2D.
|
||||
UINotificationService.show({
|
||||
title: 'MPR Load Error',
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
autoClose: false,
|
||||
});
|
||||
}
|
||||
|
||||
this.hasError = true;
|
||||
}
|
||||
};
|
||||
|
||||
const onAllPixelDataInsertedCallback = () => {
|
||||
this.setState({
|
||||
isLoaded: true,
|
||||
@@ -391,6 +412,7 @@ class OHIFVTKViewport extends Component {
|
||||
|
||||
imageDataObject.onPixelDataInserted(onPixelDataInsertedCallback);
|
||||
imageDataObject.onAllPixelDataInserted(onAllPixelDataInsertedCallback);
|
||||
imageDataObject.onPixelDataInsertedError(onPixelDataInsertedErrorCallback);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -16,8 +16,10 @@ const vtkExtension = {
|
||||
*/
|
||||
id: 'vtk',
|
||||
|
||||
getViewportModule({ commandsManager }) {
|
||||
const ExtendedVTKViewport = props => <OHIFVTKViewport {...props} />;
|
||||
getViewportModule({ commandsManager, servicesManager }) {
|
||||
const ExtendedVTKViewport = props => (
|
||||
<OHIFVTKViewport {...props} servicesManager={servicesManager} />
|
||||
);
|
||||
return withCommandsManager(ExtendedVTKViewport, commandsManager);
|
||||
},
|
||||
getToolbarModule() {
|
||||
|
||||
+2
-3
@@ -34,9 +34,8 @@
|
||||
"see-changed": "lerna changed",
|
||||
"docs:publish": "chmod +x ./build-and-publish-docs.sh && ./build-and-publish-docs.sh",
|
||||
"release": "yarn run lerna:version && yarn run lerna:publish",
|
||||
"lerna:cache": "[ $NETLIFY_RESTORE = 1 ] && ./netlify-lerna-cache.sh || :",
|
||||
"lerna:restore": "[ $NETLIFY_RESTORE = 1 ] && ./netlify-lerna-restore.sh || :",
|
||||
"preinstall": "yarn lerna:restore",
|
||||
"lerna:cache": "./netlify-lerna-cache.sh",
|
||||
"lerna:restore": "./netlify-lerna-restore.sh",
|
||||
"lerna:version": "npx lerna version prerelease --force-publish",
|
||||
"lerna:publish": "lerna publish from-package --canary --dist-tag canary",
|
||||
"link-list": "npm ls --depth=0 --link=true"
|
||||
|
||||
@@ -3,6 +3,44 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.5.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.1...@ohif/viewer@4.5.2) (2020-08-24)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.5.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.0...@ohif/viewer@4.5.1) (2020-08-20)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.5.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.4.1...@ohif/viewer@4.5.0) (2020-08-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 🎸 Filter/promote multiple series instances ([#1533](https://github.com/OHIF/Viewers/issues/1533)) ([5fdace1](https://github.com/OHIF/Viewers/commit/5fdace1432b4b1bd31a60c5db6bd681610ec2b8e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.4.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.4.0...@ohif/viewer@4.4.1) (2020-08-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix incorrect command name in Percy test ([#1999](https://github.com/OHIF/Viewers/issues/1999)) ([ebdcde1](https://github.com/OHIF/Viewers/commit/ebdcde1c4d9c95393cf79cc9994f5d60f6d66fdd))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.4.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.3.1...@ohif/viewer@4.4.0) (2020-08-18)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ describe('Visual Regression - OHIF VTK Extension', () => {
|
||||
cy.get('[data-cy="2d mpr"]').click();
|
||||
|
||||
//Wait waitVTKLoading Images
|
||||
cy.waitVTKwaitVTKLoading();
|
||||
cy.waitVTKLoading();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/viewer",
|
||||
"version": "4.4.0",
|
||||
"version": "4.5.2",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
@@ -49,7 +49,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@ohif/core": "^2.10.0",
|
||||
"@ohif/extension-cornerstone": "^2.9.0",
|
||||
"@ohif/extension-cornerstone": "^2.9.2",
|
||||
"@ohif/extension-dicom-html": "^1.2.4",
|
||||
"@ohif/extension-dicom-microscopy": "^0.51.0",
|
||||
"@ohif/extension-dicom-p10-downloader": "^0.1.2",
|
||||
@@ -57,7 +57,7 @@
|
||||
"@ohif/extension-dicom-rt": "^0.4.0",
|
||||
"@ohif/extension-dicom-segmentation": "^0.4.0",
|
||||
"@ohif/extension-lesion-tracker": "^0.2.0",
|
||||
"@ohif/extension-vtk": "^1.7.0",
|
||||
"@ohif/extension-vtk": "^1.7.1",
|
||||
"@ohif/i18n": "^0.52.8",
|
||||
"@ohif/ui": "^1.5.3",
|
||||
"@tanem/react-nprogress": "^1.1.25",
|
||||
|
||||
@@ -14,23 +14,25 @@ const { OHIFStudyMetadata, OHIFSeriesMetadata } = metadata;
|
||||
const { retrieveStudiesMetadata, deleteStudyMetadataPromise } = studies;
|
||||
const { studyMetadataManager, makeCancelable } = utils;
|
||||
|
||||
const _promoteToFront = (list, value, searchMethod) => {
|
||||
let response = [...list];
|
||||
let promoted = false;
|
||||
const index = response.findIndex(searchMethod.bind(undefined, value));
|
||||
const _promoteToFront = (list, values, searchMethod) => {
|
||||
let listCopy = [...list];
|
||||
let response = [];
|
||||
let promotedCount = 0;
|
||||
|
||||
if (index > 0) {
|
||||
const first = response.splice(index, 1);
|
||||
response = [...first, ...response];
|
||||
}
|
||||
const arrayValues = values.split(',');
|
||||
arrayValues.forEach(value => {
|
||||
const index = listCopy.findIndex(searchMethod.bind(undefined, value));
|
||||
|
||||
if (index >= 0) {
|
||||
promoted = true;
|
||||
}
|
||||
if (index >= 0) {
|
||||
const [itemToPromote] = listCopy.splice(index, 1);
|
||||
response[promotedCount] = itemToPromote;
|
||||
promotedCount++;
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
promoted,
|
||||
data: response,
|
||||
promoted: promotedCount === arrayValues.length,
|
||||
data: [...response, ...listCopy],
|
||||
};
|
||||
};
|
||||
|
||||
@@ -90,12 +92,48 @@ const _isQueryParamApplied = (study, filters = {}, isFilterStrategy) => {
|
||||
if (!seriesInstanceUID) {
|
||||
return applied;
|
||||
}
|
||||
const seriesInstanceUIDs = seriesInstanceUID.split(',');
|
||||
|
||||
let validateFilterApplied = () => {
|
||||
const sameSize = arrayToInspect.length === seriesInstanceUIDs.length;
|
||||
if (!sameSize) {
|
||||
return;
|
||||
}
|
||||
|
||||
return arrayToInspect.every(item =>
|
||||
seriesInstanceUIDs.some(
|
||||
seriesInstanceUIDStr => seriesInstanceUIDStr === item.SeriesInstanceUID
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
let validatePromoteApplied = () => {
|
||||
let isValid = true;
|
||||
for (let index = 0; index < seriesInstanceUIDs.length; index++) {
|
||||
const seriesInstanceUIDStr = seriesInstanceUIDs[index];
|
||||
const resultSeries = arrayToInspect[index];
|
||||
|
||||
if (
|
||||
!resultSeries ||
|
||||
resultSeries.SeriesInstanceUID !== seriesInstanceUIDStr
|
||||
) {
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isValid;
|
||||
};
|
||||
|
||||
const { series = [], displaySets = [] } = study;
|
||||
const firstSeries = isFilterStrategy ? series[0] : displaySets[0];
|
||||
const arrayToInspect = isFilterStrategy ? series : displaySets;
|
||||
const validateMethod = isFilterStrategy
|
||||
? validateFilterApplied
|
||||
: validatePromoteApplied;
|
||||
|
||||
if (!firstSeries || firstSeries.SeriesInstanceUID !== seriesInstanceUID) {
|
||||
if (!arrayToInspect) {
|
||||
applied = false;
|
||||
} else {
|
||||
applied = validateMethod();
|
||||
}
|
||||
|
||||
return applied;
|
||||
@@ -221,7 +259,7 @@ function ViewerRetrieveStudyData({
|
||||
// Show message in case not promoted neither filtered but should to
|
||||
_showUserMessage(
|
||||
isQueryParamApplied,
|
||||
'Query parameters were not applied. Using original series list for given study.',
|
||||
'Query parameters were not totally applied. It might be using original series list for given study.',
|
||||
snackbarContext
|
||||
);
|
||||
|
||||
@@ -233,7 +271,7 @@ function ViewerRetrieveStudyData({
|
||||
* Method to process studies. It will update displaySet, studyMetadata, load remaining series, ...
|
||||
* @param {Array} studiesData Array of studies retrieved from server
|
||||
* @param {Object} [filters] - Object containing filters to be applied
|
||||
* @param {string} [filter.seriesInstanceUID] - series instance uid to filter results against
|
||||
* @param {string} [filters.seriesInstanceUID] - series instance uid to filter results against
|
||||
*/
|
||||
const processStudies = (studiesData, filters) => {
|
||||
if (Array.isArray(studiesData) && studiesData.length > 0) {
|
||||
@@ -299,7 +337,6 @@ function ViewerRetrieveStudyData({
|
||||
const filters = {};
|
||||
// Use the first, discard others
|
||||
const seriesInstanceUID = seriesInstanceUIDs && seriesInstanceUIDs[0];
|
||||
|
||||
const retrieveParams = [server, studyInstanceUIDs];
|
||||
|
||||
if (seriesInstanceUID) {
|
||||
|
||||
@@ -15596,10 +15596,10 @@ react-codemirror2@^6.0.0:
|
||||
resolved "https://registry.yarnpkg.com/react-codemirror2/-/react-codemirror2-6.0.0.tgz#180065df57a64026026cde569a9708fdf7656525"
|
||||
integrity sha512-D7y9qZ05FbUh9blqECaJMdDwKluQiO3A9xB+fssd5jKM7YAXucRuEOlX32mJQumUvHUkHRHqXIPBjm6g0FW0Ag==
|
||||
|
||||
react-cornerstone-viewport@4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-4.0.1.tgz#6a7ec4c01b0626c4ad11552368f3dfa6cd67bdd5"
|
||||
integrity sha512-47YhFsLS5vCWjiOKS9FwLxtA738HIHuNfdn3EJw6GyWD9jwL5HJQ/Ue1mKATjyHRvb3AyJTJuC/lGl0bsqKbYw==
|
||||
react-cornerstone-viewport@4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-4.0.2.tgz#49bc8f8464164d8e779138dd9244d5c2524e0418"
|
||||
integrity sha512-mF/piahoPG5U5TbxVMtc15bXrQZxcaPycbu4i4KD2rZkiWh1Zs24ryY1S+lFlDB/RcOAm0u+luEEt1tOg8F+UQ==
|
||||
dependencies:
|
||||
classnames "^2.2.6"
|
||||
date-fns "^2.2.1"
|
||||
@@ -16047,10 +16047,10 @@ react-transition-group@^4.1.1:
|
||||
loose-envify "^1.4.0"
|
||||
prop-types "^15.6.2"
|
||||
|
||||
react-vtkjs-viewport@^0.10.3:
|
||||
version "0.10.3"
|
||||
resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.10.3.tgz#8eaa8bc558057215b648ad6ce17092d68cf5354b"
|
||||
integrity sha512-9aXuBrAlKa79Q1qPSWmPflSgpG2sm5jyKresdqUUvqYVJQJx83Xkkh4XfgOfLHY/nEwpTI8dr3FwtH2dzrBkoA==
|
||||
react-vtkjs-viewport@^0.10.4:
|
||||
version "0.10.4"
|
||||
resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.10.4.tgz#eb038b0bf5c384bd3b45f2a0a57f52c682607fea"
|
||||
integrity sha512-J1WxwHbjlttEWvdkM33DJx8QxHr3J7HR6wFSDVBDKY7McK2lwDAdRN8wSqy2BVNILlyurUUVwg2tK2txiJ+tuw==
|
||||
dependencies:
|
||||
date-fns "^2.2.1"
|
||||
gl-matrix "^3.1.0"
|
||||
|
||||
Reference in new issue
Block a user