diff --git a/extensions/default/src/DicomWebDataSource/index.js b/extensions/default/src/DicomWebDataSource/index.js index 5f232a8c5..c6fa9dca8 100644 --- a/extensions/default/src/DicomWebDataSource/index.js +++ b/extensions/default/src/DicomWebDataSource/index.js @@ -6,7 +6,7 @@ import { processResults, processSeriesResults, } from './qido.js'; -import { dicomMetadataStore, IWebApiDataSource, utils } from '@ohif/core'; +import { DicomMetadataStore, IWebApiDataSource, utils } from '@ohif/core'; import getImageId from './utils/getImageId'; import * as dcmjs from 'dcmjs'; @@ -89,7 +89,7 @@ function createDicomWebApi(dicomWebConfig) { series: { // TODO: change queryParams to `StudyInstanceUID` for now? // Conduct query, return a promise like others - // Await this call and add to dicomMetadataStore after receiving result + // Await this call and add to DicomMetadataStore after receiving result metadata: (queryParams, callback) => { let { StudyInstanceUIDs } = urlUtil.parse(queryParams, true); @@ -104,7 +104,7 @@ function createDicomWebApi(dicomWebConfig) { const storeInstances = instances => { const naturalizedInstances = instances.map(naturalizeDataset); - dicomMetadataStore.addInstances(naturalizedInstances); + DicomMetadataStore.addInstances(naturalizedInstances); callback(naturalizedInstances); }; @@ -146,7 +146,7 @@ function createDicomWebApi(dicomWebConfig) { function storeInstances(instances) { const naturalizedInstances = instances.map(naturalizeDataset); - dicomMetadataStore.addInstances(naturalizedInstances); + DicomMetadataStore.addInstances(naturalizedInstances); } seriesPromises.forEach(async seriesPromise => { diff --git a/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js b/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js index 194efc1d7..8e103850d 100644 --- a/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js +++ b/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js @@ -1,10 +1,6 @@ import RetrieveMetadataLoader from './retrieveMetadataLoader'; //import { sortStudySeries, sortingCriteria } from '../../sortStudy'; import getSeriesInfo from './utils/getSeriesInfo'; -// import { -// createStudyFromSOPInstanceList, -// addInstancesToStudy, -// } from './studyInstanceHelpers'; /** * Map seriesList to an array of seriesInstanceUid @@ -15,19 +11,6 @@ function mapStudySeries(seriesList) { return seriesList.map(series => getSeriesInfo(series).seriesInstanceUid); } -// function attachSeriesLoader(server, study, seriesLoader) { -// study.seriesLoader = Object.freeze({ -// hasNext() { -// return seriesLoader.hasNext(); -// }, -// async next() { -// const series = await seriesLoader.next(); -// await addInstancesToStudy(server, study, series.sopInstances); -// return study.seriesMap[series.seriesInstanceUID]; -// }, -// }); -// } - /** * Creates an immutable series loader object which loads each series sequentially using the iterator interface * @param {DICOMWebClient} dicomWebClient The DICOMWebClient instance to be used for series load diff --git a/extensions/default/src/Panels/PanelStudyBrowser.jsx b/extensions/default/src/Panels/PanelStudyBrowser.jsx index 54e6eda4e..80248f4e5 100644 --- a/extensions/default/src/Panels/PanelStudyBrowser.jsx +++ b/extensions/default/src/Panels/PanelStudyBrowser.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import PropTypes from 'prop-types'; // import { StudyBrowser, useImageViewer } from '@ohif/ui'; -import { dicomMetadataStore } from '@ohif/core'; +import { DicomMetadataStore } from '@ohif/core'; // This has to import from somewhere else... function PanelStudyBrowser({ @@ -46,8 +46,10 @@ function PanelStudyBrowser({ } StudyInstanceUIDs.forEach(sid => fetchStudiesForPatient(sid)); - }, [StudyInstanceUIDs, getStudiesForPatientByStudyInstanceUID]); - + }, [ + StudyInstanceUIDs, + getStudiesForPatientByStudyInstanceUID, + ]); const updateThumbnailMap = (displaySetInstanceUID, imageSrc) => { setThumbnailImageSrcMap( diff --git a/extensions/default/src/Panels/getStudiesForPatientByStudyInstanceUID.js b/extensions/default/src/Panels/getStudiesForPatientByStudyInstanceUID.js index e9084a8f1..9327383ee 100644 --- a/extensions/default/src/Panels/getStudiesForPatientByStudyInstanceUID.js +++ b/extensions/default/src/Panels/getStudiesForPatientByStudyInstanceUID.js @@ -2,7 +2,7 @@ async function getStudiesForPatientByStudyInstanceUID( dataSource, StudyInstanceUID ) { - // TODO: The `dicomMetadataStore` should short-circuit both of these requests + // TODO: The `DicomMetadataStore` should short-circuit both of these requests // Data _could_ be here from route query, or if using JSON data source // We could also force this to "await" these values being available in the DICOMStore? // Kind of like promise fulfillment in cornerstone-wado-image-loader when there are multiple @@ -18,6 +18,6 @@ async function getStudiesForPatientByStudyInstanceUID( patientId: getStudyResult[0].mrn, }); } -}; +} export default getStudiesForPatientByStudyInstanceUID; diff --git a/extensions/default/src/ViewerLayout/index.jsx b/extensions/default/src/ViewerLayout/index.jsx index 21f89d91e..caff0abfc 100644 --- a/extensions/default/src/ViewerLayout/index.jsx +++ b/extensions/default/src/ViewerLayout/index.jsx @@ -77,7 +77,6 @@ function ViewerLayout({ label: tool.label, type: 'setToolActive', onClick: () => { - debugger; commandsManager.runCommand(tool.commandName, commandOptions); }, }); @@ -104,8 +103,6 @@ function ViewerLayout({ // } }); - debugger; - setToolBarLayout(toolBarLayout); }; @@ -134,7 +131,7 @@ function ViewerLayout({ moreTools={toolBarLayout[0].moreTools} />