src/main/java/chalmers/pimp/service/RasterDataService.java
public static Image toFXImage(IReadOnlyRasterData pixelData) {
    Objects.requireNonNull(pixelData);

    var result = new WritableImage(pixelData.getWidth(), pixelData.getHeight());
    PixelWriter pixelWriter = result.getPixelWriter();

    int yOffset = 0;
    for (Iterable<? extends IReadOnlyPixel> pixelDataRow : pixelData.getPixels()) {
      setImagePixelRow(pixelDataRow, pixelWriter, yOffset);
      yOffset++;
    }

    return result;
  }
/**
   * Creates and returns a JavaFX image based on the supplied pixel data.
   *
   * @param pixelData the pixel data that should be converted.
   * @return a JavaFX image based on the supplied pixel data.
   * @throws NullPointerException if any arguments are {@code null}.d
   */
Creates and returns a JavaFX image based on the supplied pixel data.
@param pixelData the pixel data that should be converted.
@return a JavaFX image based on the supplied pixel data.
@throws NullPointerException if any arguments are  null.d
Creates and returns a JavaFX image based on the supplied pixel data . @param pixelData the pixel data that should be converted . @return a JavaFX image based on the supplied pixel data . @throws NullPointerException if any arguments are null . d
public static Image toFXImage(IReadOnlyRasterData pixelData) {
    Objects.requireNonNull(pixelData);
    var result = new WritableImage(pixelData.getWidth(), pixelData.getHeight());
    PixelWriter pixelWriter = result.getPixelWriter();
    int yOffset = 0;
    for (Iterable<? extends IReadOnlyPixel> pixelDataRow : pixelData.getPixels()) {
      setImagePixelRow(pixelDataRow, pixelWriter, yOffset);
      yOffset++;
    }
    return result;
  }
public static Image toFXImage ( IReadOnlyRasterData pixelData ) { Objects . requireNonNull ( pixelData ) ; var result = new WritableImage ( pixelData . getWidth ( ) , pixelData . getHeight ( ) ) ; PixelWriter pixelWriter = result . getPixelWriter ( ) ; int yOffset = 0 ; for ( Iterable < ? extends IReadOnlyPixel > pixelDataRow : pixelData . getPixels ( ) ) { setImagePixelRow ( pixelDataRow , pixelWriter , yOffset ) ; yOffset ++ ; } return result ; }
Creates and returns a JavaFX image based on the supplied pixel data.
Creates and returns a JavaFX image based on the supplied pixel data .