extensions/xnat/src/utils/IO/classes/RoiImporter.js
/**
   * _modifyImageIdIfMultiframe - Modifies the imageId for multiframe images,
   *                              so that the polygons are indexed correctly.
   *
   * @param  {string} correspondingImageId The imageid
   * @param  {Polygon} polygon The polygon being added.
   * @returns {string} The
   */
Modifies the imageId for multiframe images,
so that the polygons are indexed correctly.

@param  {string} correspondingImageId The imageid
@param  {Polygon} polygon The polygon being added.
@returns {string} The
Modifies the imageId for multiframe images so that the polygons are indexed correctly . @param { string } correspondingImageId The imageid @param { Polygon } polygon The polygon being added . @returns { string } The
_modifyImageIdIfMultiframe(correspondingImageId, polygon) {
    if (!correspondingImageId.includes('frame=')) {
      return correspondingImageId;
    }
    const frameArray = correspondingImageId.split('frame=');
    const correctedFrameNumber = Number(polygon.frameNumber) - 1;
    return `${frameArray[0]}frame=${correctedFrameNumber}`;
  }
_modifyImageIdIfMultiframe ( correspondingImageId , polygon ) { if ( ! correspondingImageId . includes ( 'frame=' ) ) { return correspondingImageId ; } const frameArray = correspondingImageId . split ( 'frame=' ) ; const correctedFrameNumber = Number ( polygon . frameNumber ) - 1 ; return ` ${ frameArray [ 0 ] } ${ correctedFrameNumber } ` ; }
_modifyImageIdIfMultiframe - Modifies the imageId for multiframe images,
                              so that the polygons are indexed correctly.
_modifyImageIdIfMultiframe - Modifies the imageId for multiframe images so that the polygons are indexed correctly .
//single frame, return unchanged Id