extensions/xnat/src/utils/IO/classes/AIMWriter.js
/**
   * _addTwoDimensionSpatialCoordinateCollection - Adds an AIM
   *            twoDimensionSpatialCoordinateCollection to an AIM MarkupEntity.
   *
   * @param  {object[]} polyPoints  The verticies of the polygon.
   * @param  {string} sopInstanceUid The sop instance uid the polygon references.
   * @returns {null}
   */
Adds an AIM
twoDimensionSpatialCoordinateCollection to an AIM MarkupEntity.

@param  {object[]} polyPoints  The verticies of the polygon.
@param  {string} sopInstanceUid The sop instance uid the polygon references.
@returns {null}
Adds an AIM twoDimensionSpatialCoordinateCollection to an AIM MarkupEntity . @param { object [] } polyPoints The verticies of the polygon . @param { string } sopInstanceUid The sop instance uid the polygon references . @returns { null }
_addTwoDimensionSpatialCoordinateCollection(polyPoints, sopInstanceUid) {
    this.startElement('twoDimensionSpatialCoordinateCollection');
    for (let i = 0; i < polyPoints.length; i++) {
      this._addTwoDimensionSpatialCoordinate(polyPoints[i], i);
    }
    this._addTwoDimensionSpatialCoordinate(polyPoints[0], 0);
    this.endElement();
  }
_addTwoDimensionSpatialCoordinateCollection ( polyPoints , sopInstanceUid ) { this . startElement ( 'twoDimensionSpatialCoordinateCollection' ) ; for ( let i = 0 ; i < polyPoints . length ; i ++ ) { this . _addTwoDimensionSpatialCoordinate ( polyPoints [ i ] , i ) ; } this . _addTwoDimensionSpatialCoordinate ( polyPoints [ 0 ] , 0 ) ; this . endElement ( ) ; }
_addTwoDimensionSpatialCoordinateCollection - Adds an AIM
            twoDimensionSpatialCoordinateCollection to an AIM MarkupEntity.
_addTwoDimensionSpatialCoordinateCollection - Adds an AIM twoDimensionSpatialCoordinateCollection to an AIM MarkupEntity .
// For a closed polygon the AIM 4.0 specification requires that the first // Coordinate appear again at the end: