extensions/xnat/src/utils/IO/classes/RoiImporter.js
/**
   * _getSopInstanceUidToImageIdMap - Generates and returns a map of
   *                                  sop instance UID to imageId.
   *
   * @returns {object}  The sop instance UID to image Id map.
   */
Generates and returns a map of
sop instance UID to imageId.

@returns {object}  The sop instance UID to image Id map.
Generates and returns a map of sop instance UID to imageId . @returns { object } The sop instance UID to image Id map .
_getSopInstanceUidToImageIdMap() {
    const sopInstanceUidToImageIdMap = {};
    const studies = studyMetadataManager.all();
    for (let i = 0; i < studies.length; i++) {
      const study = studies[i];
      const displaySets = study.getDisplaySets();
      for (let j = 0; j < displaySets.length; j++) {
        const displaySet = displaySets[j];
        const { images } = displaySet;
        for (let k = 0; k < images.length; k++) {
          const image = images[k];
          const sopInstanceUID = image.getSOPInstanceUID();
          const imageId = image.getImageId();
          sopInstanceUidToImageIdMap[sopInstanceUID] = imageId;
        }
      }
    }
    return sopInstanceUidToImageIdMap;
  }
_getSopInstanceUidToImageIdMap ( ) { const sopInstanceUidToImageIdMap = { } ; const studies = studyMetadataManager . all ( ) ; for ( let i = 0 ; i < studies . length ; i ++ ) { const study = studies [ i ] ; const displaySets = study . getDisplaySets ( ) ; for ( let j = 0 ; j < displaySets . length ; j ++ ) { const displaySet = displaySets [ j ] ; const { images } = displaySet ; for ( let k = 0 ; k < images . length ; k ++ ) { const image = images [ k ] ; const sopInstanceUID = image . getSOPInstanceUID ( ) ; const imageId = image . getImageId ( ) ; sopInstanceUidToImageIdMap [ sopInstanceUID ] = imageId ; } } } return sopInstanceUidToImageIdMap ; }
_getSopInstanceUidToImageIdMap - Generates and returns a map of
                                  sop instance UID to imageId.
_getSopInstanceUidToImageIdMap - Generates and returns a map of sop instance UID to imageId .
// TODO -> We could actually build this map once on import if we have all the correct data?