extensions/xnat/src/components/XNATContourImportMenu/XNATContourImportMenu.js
/**
   * async _importRoiCollection - Fetch and import the ROI collection from XNAT.
   *
   * @param  {Object} roiCollectionInfo The collection info for the ROI Collection.
   * @returns {null}
   */
async _importRoiCollection - Fetch and import the ROI collection from XNAT.
@param  {Object} roiCollectionInfo The collection info for the ROI Collection.
@returns {null}
async _importRoiCollection - Fetch and import the ROI collection from XNAT . @param { Object } roiCollectionInfo The collection info for the ROI Collection . @returns { null }
async _importRoiCollection(roiCollectionInfo) {
    const roiList = await fetchJSON(roiCollectionInfo.getFilesUri).promise;
    const result = roiList.ResultSet.Result;
    if (result.length === 0) {
      this._incrementNumCollectionsParsed(roiCollectionInfo.name);
      return;
    }
    for (let i = 0; i < result.length; i++) {
      const fileType = result[i].collection;
      if (fileType === roiCollectionInfo.collectionType) {
        this._getAndImportFile(result[i].URI, roiCollectionInfo);
      }
    }
  }
async _importRoiCollection ( roiCollectionInfo ) { const roiList = await fetchJSON ( roiCollectionInfo . getFilesUri ) . promise ; const result = roiList . ResultSet . Result ; if ( result . length === 0 ) { this . _incrementNumCollectionsParsed ( roiCollectionInfo . name ) ; return ; } for ( let i = 0 ; i < result . length ; i ++ ) { const fileType = result [ i ] . collection ; if ( fileType === roiCollectionInfo . collectionType ) { this . _getAndImportFile ( result [ i ] . URI , roiCollectionInfo ) ; } } }
async _importRoiCollection - Fetch and import the ROI collection from XNAT.
async _importRoiCollection - Fetch and import the ROI collection from XNAT .
// Reduce count if no associated file is found (nothing to import, badly deleted roiCollection). // Retrieve each ROI from the list that has the same collectionType as the collection. // In an ideal world this should always be 1, and any other resources -- if any -- are differently formated representations of the same data, but things happen.