Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
334251a
chore: Minor adjustment to generateAcceptHeader function signature to…
luissantosHCIT Aug 4, 2025
1b80164
fix: Added switch to skip the Accept header generation when requestin…
luissantosHCIT Aug 4, 2025
bf2c567
chore: Added new HeadersInterface interface type docstrings.
luissantosHCIT Aug 4, 2025
4099a82
chore: Refactored getAuthorizationHeader() function signature so it i…
luissantosHCIT Aug 4, 2025
0d3bf90
chore: Refactored the user logic to include a TypeScript interface. A…
luissantosHCIT Aug 4, 2025
f2b00b7
chore: Updated function signatures, user import, and confirmed unit t…
luissantosHCIT Aug 4, 2025
d21e0bc
chore: Minor stylistic adjustment to getAuthorizationHeader.test.ts
luissantosHCIT Aug 4, 2025
34454a7
chore: Added missing comments.
luissantosHCIT Aug 4, 2025
84bb808
chore: promise handling cleanup.
luissantosHCIT Aug 5, 2025
9da50e6
fix: begin refactoring the metadata retrieval so that it is done as p…
luissantosHCIT Aug 5, 2025
9a35793
fix: enabled passthrough of sopInstanceUID in the metadata loader.
luissantosHCIT Aug 6, 2025
ab5887c
fix: expanded the retrieval key generation to take the filters into a…
luissantosHCIT Aug 6, 2025
b6e756f
chore: refactored the logic for building the dicom metadata structure…
luissantosHCIT Aug 6, 2025
f87a452
chore: refactored the study metadata reconstruction logic to allow me…
luissantosHCIT Aug 6, 2025
500a59a
fix added qido search of instance metadata so we can easily be select…
luissantosHCIT Aug 6, 2025
ed1a65b
fix added searchForInstances to the static wado client for backwards …
luissantosHCIT Aug 6, 2025
d1792f5
chore: refactored the dicomweb config out of the index source file to…
luissantosHCIT Aug 6, 2025
80d706a
fix isolated metadata retrieval into its own source and function so t…
luissantosHCIT Aug 6, 2025
37638ef
chore refactored the expected type in extractMetaData since we now ne…
luissantosHCIT Aug 6, 2025
4f6baad
chore refactored the instance metadata logic to account for the fact …
luissantosHCIT Aug 7, 2025
7545c80
fix Added IPP reconstruction off the two slice metadata so that the r…
luissantosHCIT Aug 7, 2025
d4ac449
fix Added _retrieveSeriesMetadataOptimizedSync which an optimized fun…
luissantosHCIT Aug 7, 2025
492ee52
chore Added docstrings in extractMetaData.
luissantosHCIT Aug 11, 2025
9f6b030
chore Added docstrings in retrieveInstanceMetadata.
luissantosHCIT Aug 11, 2025
5ee5189
fix issue obtaining series and sop uids in retrieveStudyMetadata.js
luissantosHCIT Aug 11, 2025
e976185
chore moved bulk data functions to its own module to simplify the hig…
luissantosHCIT Aug 11, 2025
ea66456
chore moved all of the DICOM type definitions into its own module to …
luissantosHCIT Aug 11, 2025
e9dc82e
chore removed the type definitions from extractMetaData
luissantosHCIT Aug 11, 2025
a081a5e
chore moved the DICOMWeb configuration type definition into the utils…
luissantosHCIT Aug 11, 2025
d06f9ff
chore cleaned up the file from redundant function definitions and beg…
luissantosHCIT Aug 11, 2025
6a6e30a
chore upgraded getImageId to TypeScript and began annotating the func…
luissantosHCIT Aug 11, 2025
004f092
chore cleaned up function signatures in getImageId and identified def…
luissantosHCIT Aug 11, 2025
8ae19ea
chore cleaned up parameter format of inputs to getImageIdsForInstance
luissantosHCIT Aug 11, 2025
7027aa6
chore cleaned up the export and usage of getImageId...
luissantosHCIT Aug 11, 2025
93c553f
fix made dicomWebToDicomStructure more flexible by accepting a list o…
luissantosHCIT Aug 12, 2025
86c2be4
fix made addRetrieveBulkData skip the naturalization step since I wil…
luissantosHCIT Aug 12, 2025
5057c51
chore added retrieve metadata interface definitions.
luissantosHCIT Aug 12, 2025
ded7579
chore Added console logging calls to find reason for failure to trigg…
luissantosHCIT Aug 12, 2025
c578618
fix issue with deferred promise not auto starting. It expected elsewh…
luissantosHCIT Aug 12, 2025
e0e19a4
fix restored forced start of deferred promise if not created by invok…
luissantosHCIT Aug 12, 2025
bd0506b
chore refactored DicomTypes to Types so we can include a few types ne…
luissantosHCIT Aug 12, 2025
e6b657a
chore stylistic cleanup
luissantosHCIT Aug 12, 2025
33a8496
chore removed debugging console.log calls
luissantosHCIT Aug 12, 2025
071aaeb
chore added test data so I can mock a few functions in DicomWebDataSo…
luissantosHCIT Aug 12, 2025
01c22b0
chore adjusted the test data.
luissantosHCIT Aug 12, 2025
d50c710
chore added unit tests for core functions in retrieveBulkData.
luissantosHCIT Aug 12, 2025
29c43a1
Merge branch 'OHIF:master' into 5287_optimize_series_discovery
luissantosHCIT Aug 12, 2025
e2f5ca9
chore corrected the retrieveBulkData test
luissantosHCIT Aug 13, 2025
7c4c73b
chore updated retrieveBulkData to make sure it tests for the instance…
luissantosHCIT Aug 13, 2025
3981cd6
chore completed the extractMetaData.test.ts tests.
luissantosHCIT Aug 13, 2025
b1d9fc2
chore added logic to extractMetaData.ts to coerce inputs into arrays …
luissantosHCIT Aug 13, 2025
bd5e10d
chore added getImageId tests
luissantosHCIT Aug 13, 2025
9fb6524
fix incorrect import path
luissantosHCIT Aug 19, 2025
3a16c97
Merge branch 'OHIF:master' into 5287_optimize_series_discovery
luissantosHCIT Aug 19, 2025
fa61a04
fix migrated the DataSource into its own module (dicomweb_minimal).
luissantosHCIT Sep 2, 2025
769d41c
fix restored old DicomWebDataSource module now that I moved my change…
luissantosHCIT Sep 2, 2025
f5999ec
feat major reorganization of source files surrounding DICOM Data Sour…
luissantosHCIT Sep 3, 2025
0cde4a6
feat moved more of the imports and exports to the Data Source utils.
luissantosHCIT Sep 3, 2025
5c931d9
feat started cleaning up the DicomWebDataSource imports so it points …
luissantosHCIT Sep 3, 2025
b6eadd8
feat removed getImageIdsForInstance from the getImageId source. Resto…
luissantosHCIT Sep 3, 2025
abe3c2c
feat added config copy getter because it might be expected out of a D…
luissantosHCIT Sep 3, 2025
4437fdb
feat added config copy getter because it might be expected out of a D…
luissantosHCIT Sep 3, 2025
f642d47
chore cleaned up the dcmjs import in extractMetaData
luissantosHCIT Sep 3, 2025
ef02abd
feat finally completed initial clean up of the DicomWebDataSource so …
luissantosHCIT Sep 3, 2025
2637b1b
feat fully refactored out the retrieval core logic such that we can u…
luissantosHCIT Sep 3, 2025
63ce177
feat cleaned up import hierarchy.
luissantosHCIT Sep 3, 2025
8352f51
feat more cleanup in DicomWeb type of Data Sources.
luissantosHCIT Sep 3, 2025
3283349
fix added default behavior to fallback to full metadata retrieval if …
luissantosHCIT Sep 3, 2025
d8800c4
chore added docstring to wado/index
luissantosHCIT Sep 3, 2025
be2e6da
chore more docstring and corrected mistake with the intended usage of…
luissantosHCIT Sep 3, 2025
1f7c0e6
fix bug with slice position for some cases because the x and y compon…
luissantosHCIT Sep 4, 2025
f358e42
chore updated test imports and data now that I have refactored the Di…
luissantosHCIT Sep 4, 2025
d2498ab
fix corrected a few areas in which I call getImageIdsForInstance inco…
luissantosHCIT Sep 4, 2025
f6319b4
chore added more docstrings.
luissantosHCIT Sep 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion extensions/default/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ module.exports = {
moduleNameMapper: {
...base.moduleNameMapper,
'@ohif/(.*)': '<rootDir>/../../platform/$1/src',
'dicomweb-client': '<rootDir>/../../node_modules/dicomweb-client',
'^@cornerstonejs/(.*)$': '<rootDir>/../../node_modules/@cornerstonejs/$1/dist/esm',
},
// rootDir: "../.."
// testMatch: [
// //`<rootDir>/platform/${pack.name}/**/*.spec.js`
// "<rootDir>/platform/app/**/*.test.js"
// ]
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { DicomMetadataStore, IWebApiDataSource } from '@ohif/core';
import OHIF from '@ohif/core';
import qs from 'query-string';

import getImageId from '../DicomWebDataSource/utils/getImageId';
import getDirectURL from '../utils/getDirectURL';
import {getDirectURL, getImageId} from '../utils';

const metadataProvider = OHIF.classes.MetadataProvider;

Expand Down Expand Up @@ -60,6 +59,7 @@ const findStudies = (key, value) => {
};

function createDicomJSONApi(dicomJsonConfig) {
const dicomJsonConfigCopy = JSON.parse(JSON.stringify(dicomJsonConfig));
const implementation = {
initialize: async ({ query, url }) => {
if (!url) {
Expand Down Expand Up @@ -89,7 +89,11 @@ function createDicomJSONApi(dicomJsonConfig) {

series.instances.forEach(instance => {
const { metadata: naturalizedDicom } = instance;
const imageId = getImageId({ instance, config: dicomJsonConfig });
const imageId = getImageId(
instance,
undefined,
dicomJsonConfig
);

const { query } = qs.parseUrl(instance.url);

Expand Down Expand Up @@ -231,7 +235,11 @@ function createDicomJSONApi(dicomJsonConfig) {
const obj = {
...modifiedMetadata,
url: instance.url,
imageId: getImageId({ instance, config: dicomJsonConfig }),
imageId: getImageId(
instance,
undefined,
dicomJsonConfig
),
...series,
...study,
};
Expand Down Expand Up @@ -280,20 +288,26 @@ function createDicomJSONApi(dicomJsonConfig) {
const NumberOfFrames = instance.NumberOfFrames || 1;
const instances = instanceMap.get(instance.SOPInstanceUID) || [instance];
for (let i = 0; i < NumberOfFrames; i++) {
const imageId = getImageId({
instance: instances[Math.min(i, instances.length - 1)],
frame: NumberOfFrames > 1 ? i : undefined,
config: dicomJsonConfig,
});
const imageId = getImageId(
instances[Math.min(i, instances.length - 1)],
NumberOfFrames > 1 ? i : undefined,
dicomJsonConfig,
);
imageIds.push(imageId);
}
});

return imageIds;
},
getImageIdsForInstance({ instance, frame }) {
const imageIds = getImageId({ instance, frame });
return imageIds;
getImageIdsForInstance({ instance, frame = undefined }) {
return getImageId({
instance,
frame,
config: dicomJsonConfig,
});
},
getConfig() {
return dicomJsonConfigCopy;
},
getStudyInstanceUIDs: ({ params, query }) => {
const url = query.get('url');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const customSort = (seriesA, seriesB) => {

function createDicomLocalApi(dicomLocalConfig) {
const { name } = dicomLocalConfig;
const dicomLocalConfigCopy = JSON.parse(JSON.stringify(dicomLocalConfig));

const implementation = {
initialize: ({ params, query }) => {},
Expand Down Expand Up @@ -194,14 +195,14 @@ function createDicomLocalApi(dicomLocalConfig) {
if (NumberOfFrames > 1) {
// in multiframe we start at frame 1
for (let i = 1; i <= NumberOfFrames; i++) {
const imageId = this.getImageIdsForInstance({
const imageId = implementation.getImageIdsForInstance({
instance,
frame: i,
});
imageIds.push(imageId);
}
} else {
const imageId = this.getImageIdsForInstance({ instance });
const imageId = implementation.getImageIdsForInstance({ instance });
imageIds.push(imageId);
}
});
Expand Down Expand Up @@ -234,6 +235,9 @@ function createDicomLocalApi(dicomLocalConfig) {
deleteStudyMetadataPromise() {
console.log('deleteStudyMetadataPromise not implemented');
},
getConfig() {
return dicomLocalConfigCopy;
},
getStudyInstanceUIDs: ({ params, query }) => {
const { StudyInstanceUIDs: paramsStudyInstanceUIDs } = params;
const queryStudyInstanceUIDs = query.getAll('StudyInstanceUIDs');
Expand Down
Loading