x: displayX()

in client/src/components/special/hcs-image/utilities/hcs-image-well.js [177:303]


          x: displayX(o.x1),
          y: displayY(o.y1),
          realX,
          realY,
          width: 1,
          height: 1,
          fieldWidth: 1,
          fieldHeight: 1,
          unit: 'px',
          physicalSize: 1
        };
      }),
      width: width || correctedSize,
      height: height || correctedSize,
      meshSize: correctedSize
    };
  }
  return buildImagesWithoutCoordinates(options);
}

class HCSImageWell {
  /**
   * @param {WellOptions} options
   * @param {HCSImageSequence} sequence
   */
  constructor (options = {}, sequence) {
    const {
      directory,
      plateWidth = 10,
      plateHeight = 10,
      objectStorage
    } = sequence || {};
    const {
      x,
      y,
      round_radius: roundRadius,
      well_overview: wellImageId,
      tags,
      path = HCSConstants.OME_TIFF_FILE_NAME,
      offsets_path: offsetsPath = generateOffsetsPath(
        path
      ),
      overview_path: overviewPath = HCSConstants.OVERVIEW_OME_TIFF_FILE_NAME,
      overview_offsets_path: overviewOffsetsPath = generateOffsetsPath(
        overviewPath
      )
    } = options;
    this.omeTiffFileName = [directory, path]
      .filter(Boolean)
      .join(objectStorage.delimiter || '/');
    this.offsetsJsonFileName = [directory, offsetsPath]
      .filter(Boolean)
      .join(objectStorage.delimiter || '/');
    this.overviewOmeTiffFileName = [directory, overviewPath]
      .filter(Boolean)
      .join(objectStorage.delimiter || '/');
    this.overviewOffsetsJsonFileName = [directory, overviewOffsetsPath]
      .filter(Boolean)
      .join(objectStorage.delimiter || '/');
    const formatter = Math.max(plateWidth, plateHeight);
    const idx = getWellCoordinateString(x, formatter);
    const idy = getWellCoordinateString(y, formatter);
    this.id = `Well ${idx}_${idy}`;
    /**
     * Well x coordinate
     * @type {number}
     */
    this.x = Number(x) - 1;
    /**
     * Well y coordinate
     * @type {number}
     */
    this.y = Number(y) - 1;
    /**
     * Well radius
     * @type {number|undefined}
     */
    this.radius = roundRadius ? Number(roundRadius) : undefined;
    const {
      images,
      width,
      height,
      meshSize
    } = buildImages(options);
    /**
     * Well width
     * @type {number}
     */
    this.width = Number(width);
    /**
     * Well height
     * @type {number}
     */
    this.height = Number(height);
    /**
     * Well mesh size
     * @type {number}
     */
    this.meshSize = Number(meshSize);
    /**
     * Well fields (images)
     * @type {WellField[]}
     */
    this.images = images;
    /**
     * Well overview image id
     * @type {string}
     */
    this.wellImageId = wellImageId;
    this.tags = tags || {};
    /**
     * @type {HCSImageSequence}
     */
    this.sequence = sequence;
  }

  destroy () {
    this.images = undefined;
    this.sequence = undefined;
  }

  fetchMetadata = () => {
    if (!this.metadataPromise) {
      this.metadataPromise = new Promise((resolve) => {
        Promise.resolve()
          .then(() => this.sequence.hcsImageMetadataCache.getMetadata(this))
          .then(metadataArray => {