Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83f9478977 | ||
|
|
b5b851ac7c | ||
|
|
e5175bf3e6 | ||
|
|
8c8f69accb |
No files matched your search
@@ -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.
|
||||
|
||||
## [1.3.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.8...@ohif/extension-vtk@1.3.9) (2020-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.7...@ohif/extension-vtk@1.3.8) (2020-04-02)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-vtk",
|
||||
"version": "1.3.8",
|
||||
"version": "1.3.9",
|
||||
"description": "OHIF extension for VTK.js",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -53,8 +53,8 @@
|
||||
"react-vtkjs-viewport": "^0.8.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ohif/core": "^2.6.7",
|
||||
"@ohif/ui": "^1.4.1",
|
||||
"@ohif/core": "^2.6.8",
|
||||
"@ohif/ui": "^1.4.2",
|
||||
"cornerstone-tools": "4.12.5",
|
||||
"cornerstone-wado-image-loader": "^3.0.0",
|
||||
"dicom-parser": "^1.8.3",
|
||||
|
||||
@@ -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.
|
||||
|
||||
## [2.6.8](https://github.com/OHIF/Viewers/compare/@ohif/core@2.6.7...@ohif/core@2.6.8) (2020-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.6.7](https://github.com/OHIF/Viewers/compare/@ohif/core@2.6.6...@ohif/core@2.6.7) (2020-04-02)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/core",
|
||||
"version": "2.6.7",
|
||||
"version": "2.6.8",
|
||||
"description": "Generic business logic for web-based medical imaging applications",
|
||||
"author": "OHIF Core Team",
|
||||
"license": "MIT",
|
||||
@@ -39,7 +39,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"ajv": "^6.10.0",
|
||||
"dcmjs": "^0.8.3",
|
||||
"dcmjs": "^0.12.0",
|
||||
"dicomweb-client": "^0.5.2",
|
||||
"immer": "6.0.2",
|
||||
"isomorphic-base64": "^1.0.2",
|
||||
|
||||
@@ -10,6 +10,13 @@ const findMostRecentStructuredReport = studies => {
|
||||
studies.forEach(study => {
|
||||
const allSeries = study.getSeries ? study.getSeries() : [];
|
||||
allSeries.forEach(series => {
|
||||
// Skip series that may not have instances yet
|
||||
// This can happen if we have retrieved just the initial
|
||||
// details about the series via QIDO-RS, but not the full metadata
|
||||
if (!series.instances.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isStructuredReportSeries(series)) {
|
||||
if (
|
||||
!mostRecentStructuredReport ||
|
||||
|
||||
@@ -100,20 +100,32 @@ export class StudyMetadata extends Metadata {
|
||||
* Split a series metadata object into display sets
|
||||
* @param {Array} sopClassHandlerModules List of SOP Class Modules
|
||||
* @param {SeriesMetadata} series The series metadata object from which the display sets will be created
|
||||
* @param {Array} [givenDisplaySets] An optional list to which the display sets will be appended
|
||||
* @returns {Array} The list of display sets created for the given series object
|
||||
*/
|
||||
_createDisplaySetsForSeries(
|
||||
sopClassHandlerModules,
|
||||
series,
|
||||
givenDisplaySets
|
||||
) {
|
||||
const study = this;
|
||||
const displaySets = Array.isArray(givenDisplaySets) ? givenDisplaySets : [];
|
||||
const displaySets = [];
|
||||
|
||||
const anyInstances = series.getInstanceCount() > 0;
|
||||
|
||||
if (!anyInstances) {
|
||||
return;
|
||||
const displaySet = new ImageSet([]);
|
||||
const seriesData = series.getData();
|
||||
|
||||
displaySet.setAttributes({
|
||||
displaySetInstanceUID: displaySet.uid,
|
||||
SeriesInstanceUID: seriesData.SeriesInstanceUID,
|
||||
SeriesDescription: seriesData.SeriesDescription,
|
||||
SeriesNumber: seriesData.SeriesNumber,
|
||||
Modality: seriesData.Modality,
|
||||
});
|
||||
|
||||
displaySets.push(displaySet);
|
||||
|
||||
return displaySets;
|
||||
}
|
||||
|
||||
const sopClassUIDs = getSopClassUIDs(series);
|
||||
@@ -282,13 +294,14 @@ export class StudyMetadata extends Metadata {
|
||||
|
||||
// Loop through the series (SeriesMetadata)
|
||||
this.forEachSeries(
|
||||
series =>
|
||||
void this._createDisplaySetsForSeries(
|
||||
sopClassHandlerModules,
|
||||
series,
|
||||
displaySets
|
||||
)
|
||||
);
|
||||
series => {
|
||||
const displaySetsForSeries = this._createDisplaySetsForSeries(
|
||||
sopClassHandlerModules,
|
||||
series,
|
||||
);
|
||||
|
||||
displaySets.push(...displaySetsForSeries);
|
||||
});
|
||||
|
||||
return sortDisplaySetList(displaySets);
|
||||
}
|
||||
@@ -304,13 +317,27 @@ export class StudyMetadata extends Metadata {
|
||||
* @returns {boolean} Returns true on success or false on failure (e.g., the series does not belong to this study)
|
||||
*/
|
||||
createAndAddDisplaySetsForSeries(sopClassHandlerModules, series) {
|
||||
if (this.containsSeries(series)) {
|
||||
this.setDisplaySets(
|
||||
this._createDisplaySetsForSeries(sopClassHandlerModules, series)
|
||||
);
|
||||
return true;
|
||||
if (!this.containsSeries(series)) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
const displaySets = this._createDisplaySetsForSeries(sopClassHandlerModules, series)
|
||||
|
||||
// Note: filtering in place because this._displaySets has writable: false
|
||||
for (let i = this._displaySets.length - 1; i >= 0; i--) {
|
||||
const displaySet = this._displaySets[i];
|
||||
if (displaySet.SeriesInstanceUID === series.getSeriesInstanceUID()) {
|
||||
this._displaySets.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
displaySets.forEach(displaySet => {
|
||||
this.addDisplaySet(displaySet);
|
||||
});
|
||||
|
||||
this.sortDisplaySets();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -319,6 +346,9 @@ export class StudyMetadata extends Metadata {
|
||||
*/
|
||||
setDisplaySets(displaySets) {
|
||||
if (Array.isArray(displaySets) && displaySets.length > 0) {
|
||||
// TODO: This is weird, can we just switch it to writable: true?
|
||||
this._displaySets.splice(0);
|
||||
|
||||
displaySets.forEach(displaySet => this.addDisplaySet(displaySet));
|
||||
this.sortDisplaySets();
|
||||
}
|
||||
@@ -407,6 +437,30 @@ export class StudyMetadata extends Metadata {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a series in the current study by SeriesInstanceUID.
|
||||
* @param {String} SeriesInstanceUID The SeriesInstanceUID to be updated
|
||||
* @param {SeriesMetadata} series The series to be added to the current study.
|
||||
* @returns {boolean} Returns true on success, false otherwise.
|
||||
*/
|
||||
updateSeries(SeriesInstanceUID, series) {
|
||||
const index = this._series.findIndex(series => {
|
||||
return series.getSeriesInstanceUID() === SeriesInstanceUID;
|
||||
});
|
||||
|
||||
if (index < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(series instanceof SeriesMetadata)) {
|
||||
throw new Error('Series must be an instance of SeriesMetadata');
|
||||
}
|
||||
|
||||
this._series[index] = series;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a series by index.
|
||||
* @param {number} index An integer representing a list index.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { api } from 'dicomweb-client';
|
||||
import dcmjs from 'dcmjs';
|
||||
import DICOMWeb from '../../../DICOMWeb/';
|
||||
import RetrieveMetadataLoader from './retrieveMetadataLoader';
|
||||
import { sortStudySeries, sortingCriteria } from '../../sortStudy';
|
||||
@@ -8,6 +9,8 @@ import {
|
||||
addInstancesToStudy,
|
||||
} from './studyInstanceHelpers';
|
||||
|
||||
const { naturalizeDataset } = dcmjs.data.DicomMetaDictionary;
|
||||
|
||||
/**
|
||||
* Map series to an array of SeriesInstanceUID
|
||||
* @param {Arrays} series list of Series Instance UIDs
|
||||
@@ -101,15 +104,21 @@ export default class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader
|
||||
|
||||
async preLoad() {
|
||||
const preLoaders = this.getPreLoaders();
|
||||
const result = await this.runLoaders(preLoaders);
|
||||
|
||||
// seriesData is the result of the QIDO-RS Search For Series request
|
||||
// It's an array of Objects containing DICOM Tag values at the Series level
|
||||
const seriesData = await this.runLoaders(preLoaders);
|
||||
|
||||
const seriesSorted = sortStudySeries(
|
||||
result,
|
||||
seriesData,
|
||||
sortingCriteria.seriesSortCriteria.seriesInfoSortingCriteria
|
||||
);
|
||||
const seriesInstanceUIDsMap = mapStudySeries(seriesSorted);
|
||||
|
||||
return seriesInstanceUIDsMap;
|
||||
return {
|
||||
seriesInstanceUIDsMap,
|
||||
seriesData
|
||||
};
|
||||
}
|
||||
|
||||
async load(preLoadData) {
|
||||
@@ -118,7 +127,7 @@ export default class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader
|
||||
const seriesAsyncLoader = makeSeriesAsyncLoader(
|
||||
client,
|
||||
studyInstanceUID,
|
||||
preLoadData
|
||||
preLoadData.seriesInstanceUIDsMap
|
||||
);
|
||||
|
||||
const firstSeries = await seriesAsyncLoader.next();
|
||||
@@ -126,16 +135,38 @@ export default class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader
|
||||
return {
|
||||
sopInstances: firstSeries.sopInstances,
|
||||
asyncLoader: seriesAsyncLoader,
|
||||
seriesData: preLoadData.seriesData,
|
||||
};
|
||||
}
|
||||
|
||||
async posLoad(loadData) {
|
||||
const { server } = this;
|
||||
|
||||
const { sopInstances, asyncLoader } = loadData;
|
||||
const { sopInstances, asyncLoader, seriesData } = loadData;
|
||||
|
||||
const study = await createStudyFromSOPInstanceList(server, sopInstances);
|
||||
|
||||
// TODO: Should this be in a helper
|
||||
const seriesDataNaturalized = seriesData.map(naturalizeDataset);
|
||||
|
||||
seriesDataNaturalized.forEach((series, idx) => {
|
||||
const seriesDataFromQIDO = {
|
||||
SeriesInstanceUID: series.SeriesInstanceUID,
|
||||
SeriesDescription: series.SeriesDescription,
|
||||
SeriesNumber: series.SeriesNumber,
|
||||
Modality: series.Modality,
|
||||
instances: []
|
||||
};
|
||||
|
||||
if (study.series[idx]) {
|
||||
study.series[idx] = Object.assign(seriesDataFromQIDO, study.series[idx]);
|
||||
} else {
|
||||
study.series[idx] = seriesDataFromQIDO;
|
||||
}
|
||||
|
||||
study.seriesMap[series.SeriesInstanceUID] = study.series[idx];
|
||||
});
|
||||
|
||||
if (asyncLoader.hasNext()) {
|
||||
attachSeriesLoader(server, study, asyncLoader);
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.locize
|
||||
@@ -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.52.8](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.52.7...@ohif/i18n@0.52.8) (2020-04-07)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.52.7](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.52.6...@ohif/i18n@0.52.7) (2020-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/i18n",
|
||||
"version": "0.52.7",
|
||||
"version": "0.52.8",
|
||||
"description": "Internationalization library for The OHIF Viewer",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import UserPreferencesModal from "./UserPreferencesModal.json";
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
|
||||
export default {
|
||||
'ar': {
|
||||
UserPreferencesModal,
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -13,4 +13,4 @@
|
||||
"Show": "Show",
|
||||
"Stop": "Stop",
|
||||
"StudyDate": "Study Date"
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import StudyList from './StudyList.json';
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
import ViewportDownloadForm from './ViewportDownloadForm.json';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
'en-US': {
|
||||
AboutModal,
|
||||
Buttons,
|
||||
@@ -21,5 +21,5 @@ export default {
|
||||
StudyList,
|
||||
UserPreferencesModal,
|
||||
ViewportDownloadForm,
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -1,10 +1,10 @@
|
||||
import Buttons from "./Buttons.json";
|
||||
import CineDialog from "./CineDialog.json";
|
||||
import Common from "./Common.json";
|
||||
import Header from "./Header.json";
|
||||
import MeasurementTable from "./MeasurementTable.json";
|
||||
import StudyList from "./StudyList.json";
|
||||
import UserPreferencesModal from "./UserPreferencesModal.json";
|
||||
import Buttons from './Buttons.json';
|
||||
import CineDialog from './CineDialog.json';
|
||||
import Common from './Common.json';
|
||||
import Header from './Header.json';
|
||||
import MeasurementTable from './MeasurementTable.json';
|
||||
import StudyList from './StudyList.json';
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
|
||||
export default {
|
||||
'es': {
|
||||
@@ -16,4 +16,4 @@ export default {
|
||||
StudyList,
|
||||
UserPreferencesModal,
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"Acquired": "Acquis",
|
||||
"Angle": "Angle",
|
||||
"Axial": "Axial",
|
||||
"Bidirectional": "Bi-directionel",
|
||||
"Brush": "Brosse",
|
||||
"CINE": "Ciné",
|
||||
"Cancel": "Annuler",
|
||||
"Circle": "Cercle",
|
||||
"Clear": "Effacer",
|
||||
"Coronal": "Coronal",
|
||||
"Crosshairs": "Repère",
|
||||
"Ellipse": "Ellipse",
|
||||
"Elliptical": "Elliptique",
|
||||
"Flip H": "Flip H",
|
||||
"Flip V": "Flip V",
|
||||
"Freehand": "Main levée",
|
||||
"Invert": "Inverser",
|
||||
"Layout": "$t(Common:Layout)",
|
||||
"Length": "Longueur",
|
||||
"Levels": "Niveaux",
|
||||
"Magnify": "Agrandir",
|
||||
"Manual": "Manuel",
|
||||
"Measurements": "Mesures",
|
||||
"More": "$t(Common:More)",
|
||||
"Next": "$t(Common:Next)",
|
||||
"Pan": "Déplacer",
|
||||
"Play": "$t(Common:Play)",
|
||||
"Previous": "$t(Common:Previous)",
|
||||
"Probe": "Sonde",
|
||||
"ROI Window": "ROI fenêtrage",
|
||||
"Rectangle": "Rectangle",
|
||||
"Reset": "$t(Common:Reset)",
|
||||
"Reset to Defaults": "Valeurs d'usine",
|
||||
"Rotate Right": "Tourner à droite",
|
||||
"Sagittal": "Sagittal",
|
||||
"Save": "Sauvegarder",
|
||||
"Stack Scroll": "Défilement",
|
||||
"Stop": "$t(Common:Stop)",
|
||||
"Themes": "Themes",
|
||||
"Zoom": "Zoom"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Next image": "$t(Common:Play) $t(Common:Image)",
|
||||
"Play / Stop": "$t(Common:Play) / $t(Common:Stop)",
|
||||
"Previous image": "$t(Common:Previous) $t(Common:Image)",
|
||||
"Skip to first image": "Retour à la première $t(Common:Image)",
|
||||
"Skip to last image": "Aller à la dernière $t(Common:Image)",
|
||||
"fps": "ips"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Image": "Image",
|
||||
"Layout": "Disposition",
|
||||
"More": "Plus",
|
||||
"Next": "Suivant",
|
||||
"Play": "Play",
|
||||
"Previous": "Précédent",
|
||||
"Reset": "Reset",
|
||||
"Stop": "Stop"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"About": "A Propos",
|
||||
"Back to Viewer": "Retour au viewer",
|
||||
"INVESTIGATIONAL USE ONLY": "Seulement pour utilisation expérimentale",
|
||||
"Options": "Options",
|
||||
"Preferences": "Préférences",
|
||||
"Study list": "Liste d'études"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"Cancel": "$t(Buttons:Cancel)",
|
||||
"Reset to Defaults": "$t(Buttons:Reset to Defaults)",
|
||||
"Save": "$t(Buttons:Save)",
|
||||
"User Preferences": "Préférences utilisateur"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import Buttons from './Buttons.json';
|
||||
import CineDialog from './CineDialog.json';
|
||||
import Common from './Common.json';
|
||||
import Header from './Header.json';
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
|
||||
export default {
|
||||
'fr': {
|
||||
Buttons,
|
||||
CineDialog,
|
||||
Common,
|
||||
Header,
|
||||
UserPreferencesModal,
|
||||
}
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
import ar from './ar/';
|
||||
import en_US from './en-US/';
|
||||
import es from './es/';
|
||||
import fr from './fr/';
|
||||
import ja_JP from './ja-JP/';
|
||||
import nl from './nl/';
|
||||
import pt_BR from './pt-BR/';
|
||||
@@ -11,9 +12,10 @@ export default {
|
||||
...ar,
|
||||
...en_US,
|
||||
...es,
|
||||
...fr,
|
||||
...ja_JP,
|
||||
...nl,
|
||||
...pt_BR,
|
||||
...vi,
|
||||
...zh,
|
||||
};
|
||||
};
|
||||
@@ -1,8 +1,8 @@
|
||||
import Buttons from "./Buttons.json";
|
||||
import CineDialog from "./CineDialog.json";
|
||||
import Common from "./Common.json";
|
||||
import Header from "./Header.json";
|
||||
import UserPreferencesModal from "./UserPreferencesModal.json";
|
||||
import Buttons from './Buttons.json';
|
||||
import CineDialog from './CineDialog.json';
|
||||
import Common from './Common.json';
|
||||
import Header from './Header.json';
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
|
||||
export default {
|
||||
'ja-JP': {
|
||||
@@ -12,4 +12,4 @@ export default {
|
||||
Header,
|
||||
UserPreferencesModal,
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
import Buttons from "./Buttons.json";
|
||||
import Common from "./Common.json";
|
||||
import Header from "./Header.json";
|
||||
import Buttons from './Buttons.json';
|
||||
import Common from './Common.json';
|
||||
import Header from './Header.json';
|
||||
|
||||
export default {
|
||||
'nl': {
|
||||
@@ -8,4 +8,4 @@ export default {
|
||||
Common,
|
||||
Header,
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -6,7 +6,7 @@ import DatePicker from './DatePicker.json';
|
||||
import Header from './Header.json';
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
'pt-BR': {
|
||||
AboutModal,
|
||||
Buttons,
|
||||
@@ -15,5 +15,5 @@ export default {
|
||||
DatePicker,
|
||||
Header,
|
||||
UserPreferencesModal,
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -1,9 +1,9 @@
|
||||
import Buttons from "./Buttons.json";
|
||||
import CineDialog from "./CineDialog.json";
|
||||
import Common from "./Common.json";
|
||||
import Header from "./Header.json";
|
||||
import StudyList from "./StudyList.json";
|
||||
import UserPreferencesModal from "./UserPreferencesModal.json";
|
||||
import Buttons from './Buttons.json';
|
||||
import CineDialog from './CineDialog.json';
|
||||
import Common from './Common.json';
|
||||
import Header from './Header.json';
|
||||
import StudyList from './StudyList.json';
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
|
||||
export default {
|
||||
'vi': {
|
||||
@@ -14,4 +14,4 @@ export default {
|
||||
StudyList,
|
||||
UserPreferencesModal,
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1,10 +1,10 @@
|
||||
import Buttons from "./Buttons.json";
|
||||
import CineDialog from "./CineDialog.json";
|
||||
import Common from "./Common.json";
|
||||
import Header from "./Header.json";
|
||||
import MeasurementTable from "./MeasurementTable.json";
|
||||
import StudyList from "./StudyList.json";
|
||||
import UserPreferencesModal from "./UserPreferencesModal.json";
|
||||
import Buttons from './Buttons.json';
|
||||
import CineDialog from './CineDialog.json';
|
||||
import Common from './Common.json';
|
||||
import Header from './Header.json';
|
||||
import MeasurementTable from './MeasurementTable.json';
|
||||
import StudyList from './StudyList.json';
|
||||
import UserPreferencesModal from './UserPreferencesModal.json';
|
||||
|
||||
export default {
|
||||
'zh': {
|
||||
@@ -16,4 +16,4 @@ export default {
|
||||
StudyList,
|
||||
UserPreferencesModal,
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -43,7 +43,7 @@ directories.forEach(directory => {
|
||||
const filename = path.basename(file);
|
||||
const namespace = path.basename(file, '.json');
|
||||
|
||||
content += `import ${namespace} from "./${filename}";\n`;
|
||||
content += `import ${namespace} from './${filename}';\n`;
|
||||
});
|
||||
|
||||
content += '\n';
|
||||
@@ -51,7 +51,7 @@ directories.forEach(directory => {
|
||||
namespaces.forEach(namespace => {
|
||||
exportLines += ` ${namespace},\n`;
|
||||
});
|
||||
exportLines += ' }\n};';
|
||||
exportLines += ' }\n};\n';
|
||||
|
||||
content += exportLines;
|
||||
|
||||
@@ -80,7 +80,7 @@ languageVariables.forEach(language => {
|
||||
fileContent += ` ...${language},\n`;
|
||||
});
|
||||
|
||||
fileContent += '};';
|
||||
fileContent += '};\n';
|
||||
|
||||
// Create one file (index.js) inside the locales folder
|
||||
// which exports each of the languages
|
||||
|
||||
@@ -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.
|
||||
|
||||
## [1.4.2](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.4.1...@ohif/ui@1.4.2) (2020-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.4.1](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.4.0...@ohif/ui@1.4.1) (2020-03-17)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/ui",
|
||||
"version": "1.4.1",
|
||||
"version": "1.4.2",
|
||||
"description": "A set of React components for Medical Imaging Viewers",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
||||
export function ViewportLoadingIndicator(props) {
|
||||
return (
|
||||
<div
|
||||
className="loadingIndicator"
|
||||
className="loading-indicator"
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.8.18](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.8.17...@ohif/viewer@3.8.18) (2020-04-07)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.8.17](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.8.16...@ohif/viewer@3.8.17) (2020-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.8.16](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.8.15...@ohif/viewer@3.8.16) (2020-04-02)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
@@ -110,7 +110,7 @@ describe('OHIF Save Measurements', function() {
|
||||
cy.get('@measurementsBtn').click();
|
||||
});
|
||||
|
||||
it('checks if measurements of unsupported tools were not saved', function() {
|
||||
/*it('checks if measurements of unsupported tools were not saved', function() {
|
||||
// Add measurement for supported tool in the viewport
|
||||
cy.addLengthMeasurement();
|
||||
// Add measurement for unsupported tool in the viewport
|
||||
@@ -146,5 +146,5 @@ describe('OHIF Save Measurements', function() {
|
||||
|
||||
// Close Measurements panel
|
||||
cy.get('@measurementsBtn').click();
|
||||
});
|
||||
});*/
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/viewer",
|
||||
"version": "3.8.16",
|
||||
"version": "3.8.18",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
@@ -48,16 +48,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@ohif/core": "^2.6.7",
|
||||
"@ohif/core": "^2.6.8",
|
||||
"@ohif/extension-cornerstone": "^2.5.1",
|
||||
"@ohif/extension-dicom-html": "^1.1.2",
|
||||
"@ohif/extension-dicom-microscopy": "^0.50.9",
|
||||
"@ohif/extension-dicom-pdf": "^1.0.3",
|
||||
"@ohif/extension-dicom-segmentation": "^0.1.1",
|
||||
"@ohif/extension-lesion-tracker": "^0.2.0",
|
||||
"@ohif/extension-vtk": "^1.3.8",
|
||||
"@ohif/i18n": "^0.52.7",
|
||||
"@ohif/ui": "^1.4.1",
|
||||
"@ohif/extension-vtk": "^1.3.9",
|
||||
"@ohif/i18n": "^0.52.8",
|
||||
"@ohif/ui": "^1.4.2",
|
||||
"@tanem/react-nprogress": "^1.1.25",
|
||||
"classnames": "^2.2.6",
|
||||
"core-js": "^3.2.1",
|
||||
@@ -65,7 +65,7 @@
|
||||
"cornerstone-math": "^0.1.8",
|
||||
"cornerstone-tools": "4.12.5",
|
||||
"cornerstone-wado-image-loader": "^3.0.0",
|
||||
"dcmjs": "^0.10.1",
|
||||
"dcmjs": "^0.12.0",
|
||||
"dicom-parser": "^1.8.3",
|
||||
"dicomweb-client": "^0.4.4",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
@@ -117,4 +117,12 @@ window.config = {
|
||||
},
|
||||
],
|
||||
cornerstoneExtensionConfig: {},
|
||||
// Following property limits number of simultaneous series metadata requests.
|
||||
// For http/1.x-only servers, set this to 5 or less to improve
|
||||
// on first meaningful display in viewer
|
||||
// If the server is particularly slow to respond to series metadata
|
||||
// requests as it extracts the metadata from raw files everytime,
|
||||
// try setting this to even lower value
|
||||
// Leave it undefined for no limit, sutiable for HTTP/2 enabled servers
|
||||
// maxConcurrentMetadataRequests: 5,
|
||||
};
|
||||
@@ -116,11 +116,16 @@ const _addSeriesToStudy = (studyMetadata, series) => {
|
||||
extensionManager.modules['sopClassHandlerModule'];
|
||||
const study = studyMetadata.getData();
|
||||
const seriesMetadata = new OHIFSeriesMetadata(series, study);
|
||||
studyMetadata.addSeries(seriesMetadata);
|
||||
const existingSeries = studyMetadata.getSeriesByUID(series.SeriesInstanceUID);
|
||||
if (existingSeries) {
|
||||
studyMetadata.updateSeries(series.SeriesInstanceUID, seriesMetadata);
|
||||
} else {
|
||||
studyMetadata.addSeries(seriesMetadata);
|
||||
}
|
||||
|
||||
studyMetadata.createAndAddDisplaySetsForSeries(
|
||||
sopClassHandlerModules,
|
||||
seriesMetadata,
|
||||
false
|
||||
);
|
||||
study.displaySets = studyMetadata.getDisplaySets();
|
||||
_updateStudyMetadataManager(study, studyMetadata);
|
||||
@@ -148,25 +153,6 @@ const _updateStudyDisplaySets = (study, studyMetadata) => {
|
||||
const _sortStudyDisplaySet = (study, studyMetadata) => {
|
||||
studyMetadata.sortDisplaySets(study.displaySets);
|
||||
};
|
||||
const _loadRemainingSeries = studyMetadata => {
|
||||
const { seriesLoader } = studyMetadata.getData();
|
||||
if (!seriesLoader) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
const promisesLoaders = [];
|
||||
while (seriesLoader.hasNext()) {
|
||||
promisesLoaders.push(
|
||||
seriesLoader
|
||||
.next()
|
||||
.then(
|
||||
series => void _addSeriesToStudy(studyMetadata, series),
|
||||
error => void log.error(error)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return Promise.all(promisesLoaders);
|
||||
};
|
||||
|
||||
function ViewerRetrieveStudyData({
|
||||
server,
|
||||
@@ -180,7 +166,10 @@ function ViewerRetrieveStudyData({
|
||||
const [isStudyLoaded, setIsStudyLoaded] = useState(false);
|
||||
const snackbarContext = useSnackbarContext();
|
||||
const { appConfig = {} } = useContext(AppContext);
|
||||
const { filterQueryParam: isFilterStrategy = false } = appConfig;
|
||||
const {
|
||||
filterQueryParam: isFilterStrategy = false,
|
||||
maxConcurrentMetadataRequests,
|
||||
} = appConfig;
|
||||
|
||||
let cancelableSeriesPromises;
|
||||
let cancelableStudiesPromises;
|
||||
@@ -241,7 +230,7 @@ function ViewerRetrieveStudyData({
|
||||
|
||||
// Attempt to load remaning series if any
|
||||
cancelableSeriesPromises[study.StudyInstanceUID] = makeCancelable(
|
||||
_loadRemainingSeries(studyMetadata)
|
||||
loadRemainingSeries(studyMetadata)
|
||||
)
|
||||
.then(result => {
|
||||
if (result && !result.isCanceled) {
|
||||
@@ -262,6 +251,27 @@ function ViewerRetrieveStudyData({
|
||||
}
|
||||
};
|
||||
|
||||
const forceRerender = () => setStudies(studies => [...studies]);
|
||||
|
||||
const loadRemainingSeries = async studyMetadata => {
|
||||
const { seriesLoader } = studyMetadata.getData();
|
||||
if (!seriesLoader) return;
|
||||
|
||||
const loadNextSeries = async () => {
|
||||
if (!seriesLoader.hasNext()) return;
|
||||
const series = await seriesLoader.next();
|
||||
_addSeriesToStudy(studyMetadata, series);
|
||||
forceRerender();
|
||||
return loadNextSeries();
|
||||
};
|
||||
|
||||
const concurrentRequestsAllowed = maxConcurrentMetadataRequests || studyMetadata.getSeriesCount();
|
||||
const promises = Array(concurrentRequestsAllowed)
|
||||
.fill(null)
|
||||
.map(loadNextSeries);
|
||||
await Promise.all(promises);
|
||||
};
|
||||
|
||||
const loadStudies = async () => {
|
||||
try {
|
||||
const filters = {};
|
||||
|
||||
@@ -918,7 +918,7 @@
|
||||
core-js "^2.6.5"
|
||||
regenerator-runtime "^0.13.2"
|
||||
|
||||
"@babel/polyfill@^7.6.0":
|
||||
"@babel/polyfill@^7.8.3":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.7.tgz#151ec24c7135481336168c3bd8b8bf0cf91c032f"
|
||||
integrity sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w==
|
||||
@@ -6385,25 +6385,15 @@ dateformat@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
|
||||
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
|
||||
|
||||
dcmjs@^0.10.1:
|
||||
version "0.10.1"
|
||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.10.1.tgz#0655f8c0f7ed1357145f416e14efd4a45e2c74be"
|
||||
integrity sha512-aoXkZXTp3Kh20C6I2i2AJjcHRRxqjmt7KWvJElRv2b93AfUPVplg6+/B2ioiJFSSESt7/Q9yjHRM8k0U1uRCag==
|
||||
dcmjs@^0.12.0:
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.12.0.tgz#8b1634f9b66e452075295f5d1f2c5bf3dabdf03e"
|
||||
integrity sha512-AZAnFMvzAxUv5+KWoZcxnTYflLKk0rNPeeFt2KrVAgaExFBFfDgJQh1lEgqdNlIP+XQDFrEEUmp726SQhgmVCg==
|
||||
dependencies:
|
||||
"@babel/polyfill" "^7.6.0"
|
||||
"@babel/runtime" "^7.6.3"
|
||||
"@babel/polyfill" "^7.8.3"
|
||||
"@babel/runtime" "^7.8.4"
|
||||
loglevelnext "^3.0.1"
|
||||
ndarray "^1.0.18"
|
||||
|
||||
dcmjs@^0.8.3:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.8.3.tgz#fff1b030b6cb2d6e2afb1aa99840bfa853724c31"
|
||||
integrity sha512-eXQjqgtJf9+oseraKDNDm2A5F3Th4B2GJeZtjStj0IFXxjlbPOzdq3PfCyxdwfRaKOBIwr0q3YK/Vfs2CpQY8Q==
|
||||
dependencies:
|
||||
"@babel/polyfill" "^7.6.0"
|
||||
"@babel/runtime" "^7.6.3"
|
||||
loglevelnext "^3.0.1"
|
||||
ndarray "^1.0.18"
|
||||
ndarray "^1.0.19"
|
||||
|
||||
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.1, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
|
||||
version "2.6.9"
|
||||
@@ -13006,7 +12996,7 @@ natural-compare@^1.4.0:
|
||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||
|
||||
ndarray@^1.0.18:
|
||||
ndarray@^1.0.19:
|
||||
version "1.0.19"
|
||||
resolved "https://registry.yarnpkg.com/ndarray/-/ndarray-1.0.19.tgz#6785b5f5dfa58b83e31ae5b2a058cfd1ab3f694e"
|
||||
integrity sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==
|
||||
|
||||
Reference in new issue
Block a user