extensions/xnat/src/components/XNATSegmentationPanel.js
/**
   * onDeleteClick - A callback that deletes a segment form the series.
   *
   * @returns {null}
   */
A callback that deletes a segment form the series.
@returns {null}
A callback that deletes a segment form the series . @returns { null }
onDeleteClick(segment) {
    const { firstImageId, activeSegmentIndex, labelmap3D } = this.state;
    const element = getElementFromFirstImageId(firstImageId);
    if ('aiaa' in cornerstoneTools.store.modules) {
      const aiaaModule = cornerstoneTools.store.modules.aiaa;
      const segmentUid = labelmap3D.metadata[activeSegmentIndex].uid;
      aiaaModule.setters.removeAllPointsForSegment(segmentUid);
    }
    segmentationModule.setters.deleteSegment(element, activeSegmentIndex);
    const segments = this.constructor._segments(firstImageId);
    let segmentIndex = 0;
    if (segments.length > 0) {
      segmentIndex = segments[segments.length - 1].index;
    }
    labelmap3D.activeSegmentIndex = segmentIndex;
    this.setState({
      segments,
      activeSegmentIndex: segmentIndex,
    });
  }
onDeleteClick ( segment ) { const { firstImageId , activeSegmentIndex , labelmap3D } = this . state ; const element = getElementFromFirstImageId ( firstImageId ) ; if ( 'aiaa' in cornerstoneTools . store . modules ) { const aiaaModule = cornerstoneTools . store . modules . aiaa ; const segmentUid = labelmap3D . metadata [ activeSegmentIndex ] . uid ; aiaaModule . setters . removeAllPointsForSegment ( segmentUid ) ; } segmentationModule . setters . deleteSegment ( element , activeSegmentIndex ) ; const segments = this . constructor . _segments ( firstImageId ) ; let segmentIndex = 0 ; if ( segments . length > 0 ) { segmentIndex = segments [ segments . length - 1 ] . index ; } labelmap3D . activeSegmentIndex = segmentIndex ; this . setState ( { segments , activeSegmentIndex : segmentIndex , } ) ; }
onDeleteClick - A callback that deletes a segment form the series.
onDeleteClick - A callback that deletes a segment form the series .
// Delete segment AIAA points