getResolution(referenceImage = null) {
    const modelPixelScale = this.fileDirectory.ModelPixelScale;
    const modelTransformation = this.fileDirectory.ModelTransformation;

    if (modelPixelScale) {
      return [
        modelPixelScale[0],
        -modelPixelScale[1],
        modelPixelScale[2],
      ];
    }
    if (modelTransformation) {
      if (modelTransformation[1] === 0 && modelTransformation[4] === 0) {
        return [
          modelTransformation[0],
          -modelTransformation[5],
          modelTransformation[10],
        ];
      }
      return [
        Math.sqrt((modelTransformation[0] * modelTransformation[0])
          + (modelTransformation[4] * modelTransformation[4])),
        -Math.sqrt((modelTransformation[1] * modelTransformation[1])
          + (modelTransformation[5] * modelTransformation[5])),
        modelTransformation[10]];
    }

    if (referenceImage) {
      const [refResX, refResY, refResZ] = referenceImage.getResolution();
      return [
        refResX * referenceImage.getWidth() / this.getWidth(),
        refResY * referenceImage.getHeight() / this.getHeight(),
        refResZ * referenceImage.getWidth() / this.getWidth(),
      ];
    }

    throw new Error('The image does not have an affine transformation.');
  }
Returns the image resolution as a XYZ-vector. When the image has no affine
transformation, then an exception is thrown.
@param {GeoTIFFImage} [referenceImage=null] A reference image to calculate the resolution from
                                            in cases when the current image does not have the
                                            required tags on its own.
@returns {Array<number>} The resolution as a vector