getBytesPerPixel() {
    let bytes = 0;
    for (let i = 0; i < this.fileDirectory.BitsPerSample.length; ++i) {
      bytes += this.getSampleByteSize(i);
    }
    return bytes;
  }
Calculates the number of bytes for each pixel across all samples. Only full
bytes are supported, an exception is thrown when this is not the case.
@returns {Number} the bytes per pixel