extensions/xnat/src/utils/IO/classes/RTStructReader.js
/**
   * _extractPoints - Extracts the points of a polygon.
   *
   * @param  {object} contourSequenceItemData  The dataset for the polygon.
   * @param  {string} referencedSopInstanceUid  The sop instance UID referenced
   *                                            by the polygon.
   * @returns {number[]} An array of points.
   */
Extracts the points of a polygon.
@param  {object} contourSequenceItemData  The dataset for the polygon.
@param  {string} referencedSopInstanceUid  The sop instance UID referenced
by the polygon.
@returns {number[]} An array of points.
Extracts the points of a polygon . @param { object } contourSequenceItemData The dataset for the polygon . @param { string } referencedSopInstanceUid The sop instance UID referenced by the polygon . @returns { number [] } An array of points .
_extractPoints(contourSequenceItemData, referencedSopInstanceUid) {
    const points = [];
    const numPoints = contourSequenceItemData.intString(
      RTStructTag['NumberofContourPoints']
    );
    const numValues = numPoints * 3;
    for (let i = 0; i < numValues; i += 3) {
      points.push({
        x: contourSequenceItemData.floatString(RTStructTag['ContourData'], i),
        y: contourSequenceItemData.floatString(
          RTStructTag['ContourData'],
          i + 1
        ),
        z: contourSequenceItemData.floatString(
          RTStructTag['ContourData'],
          i + 2
        ),
      });
    }
    return points;
  }
_extractPoints ( contourSequenceItemData , referencedSopInstanceUid ) { const points = [ ] ; const numPoints = contourSequenceItemData . intString ( RTStructTag [ 'NumberofContourPoints' ] ) ; const numValues = numPoints * 3 ; for ( let i = 0 ; i < numValues ; i += 3 ) { points . push ( { x : contourSequenceItemData . floatString ( RTStructTag [ 'ContourData' ] , i ) , y : contourSequenceItemData . floatString ( RTStructTag [ 'ContourData' ] , i + 1 ) , z : contourSequenceItemData . floatString ( RTStructTag [ 'ContourData' ] , i + 2 ) , } ) ; } return points ; }
_extractPoints - Extracts the points of a polygon.
_extractPoints - Extracts the points of a polygon .