src/store/modules/segmentationModule/getLabelmapStats.js
/**
 *
 * @param {string[]} imageIds An array of cornerstone imageIds.
 * @returns {Object} An object containing an array of per-frame imagePlane metadata,
 * and a flag indicating if the metadata was present.
 */
@param {string[]} imageIds An array of cornerstone imageIds.
@returns {Object} An object containing an array of per-frame imagePlane metadata,
and a flag indicating if the metadata was present.
@param { string [] } imageIds An array of cornerstone imageIds . @returns { Object } An object containing an array of per - frame imagePlane metadata and a flag indicating if the metadata was present .
function _getImagePlanes(imageIds) {
  const imagePlanes = [];
  const cornerstone = external.cornerstone;
  const metadataProvider = cornerstone.metaData;
  let sufficientMetadata = true;
  for (let i = 0; i < imageIds.length; i++) {
    const imagePlaneModule = metadataProvider.get(
      'imagePlaneModule',
      imageIds[i]
    );
    if (!imagePlaneModule) {
      sufficientMetadata = false;
      break;
    }
    imagePlanes.push(imagePlaneModule);
  }
  return { sufficientMetadata, imagePlanes };
}
function _getImagePlanes ( imageIds ) { const imagePlanes = [ ] ; const cornerstone = external . cornerstone ; const metadataProvider = cornerstone . metaData ; let sufficientMetadata = true ; for ( let i = 0 ; i < imageIds . length ; i ++ ) { const imagePlaneModule = metadataProvider . get ( 'imagePlaneModule' , imageIds [ i ] ) ; if ( ! imagePlaneModule ) { sufficientMetadata = false ; break ; } imagePlanes . push ( imagePlaneModule ) ; } return { sufficientMetadata , imagePlanes } ; }
@param {string[]} imageIds An array of cornerstone imageIds.
@param { string [] } imageIds An array of cornerstone imageIds .