extensions/xnat/src/components/XNATSegmentationPanel.js
/**
   * _segments - Returns an array of segment metadata for the active series.
   *
   * @returns {object[]} An array of segment metadata.
   */
Returns an array of segment metadata for the active series.
@returns {object[]} An array of segment metadata.
Returns an array of segment metadata for the active series . @returns { object [] } An array of segment metadata .
static _segments(firstImageId) {
    const brushStackState = segmentationState.series[firstImageId];
    if (!brushStackState) {
      return [];
    }
    const labelmap3D =
      brushStackState.labelmaps3D[brushStackState.activeLabelmapIndex];
    if (!labelmap3D) {
      return [];
    }
    const metadata = labelmap3D.metadata;
    if (!metadata) {
      return [];
    }
    const segments = [];
    for (let i = 0; i < metadata.length; i++) {
      if (metadata[i]) {
        segments.push({
          index: i,
          metadata: metadata[i],
        });
      }
    }
    return segments;
  }
static _segments ( firstImageId ) { const brushStackState = segmentationState . series [ firstImageId ] ; if ( ! brushStackState ) { return [ ] ; } const labelmap3D = brushStackState . labelmaps3D [ brushStackState . activeLabelmapIndex ] ; if ( ! labelmap3D ) { return [ ] ; } const metadata = labelmap3D . metadata ; if ( ! metadata ) { return [ ] ; } const segments = [ ] ; for ( let i = 0 ; i < metadata . length ; i ++ ) { if ( metadata [ i ] ) { segments . push ( { index : i , metadata : metadata [ i ] , } ) ; } } return segments ; }
_segments - Returns an array of segment metadata for the active series.
_segments - Returns an array of segment metadata for the active series .