Removing imageId from Measurement schema
This commit is contained in:
1 parent
cf9136447e
commit
7bb25ae6aa
12 files changed
+66
-36
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* Obtain an imageId for the given imagePath
|
||||
*
|
||||
* @param {String} imagePath Path containing study, series and instance UIDs and frame index
|
||||
* @returns {String} The resulting imageId for the given imagePath
|
||||
*/
|
||||
|
||||
export const getImageIdForImagePath = (imagePath, thumbnail=false) => {
|
||||
const [studyInstanceUid, seriesInstanceUid, sopInstanceUid, frameIndex] = imagePath.split('_');
|
||||
const study = OHIF.viewer.Studies.findBy({ studyInstanceUid });
|
||||
const series = study.getSeriesByUID(seriesInstanceUid);
|
||||
const instance = series.getInstanceByUID(sopInstanceUid);
|
||||
const imageId = OHIF.viewerbase.getImageId(instance, frameIndex, thumbnail);
|
||||
return imageId;
|
||||
};
|
||||
Reference in new issue
Block a user