Interface IRasterConverter

All Known Implementing Classes:
BWRaster, GrayscaleColorConverter

public interface IRasterConverter
IRasterConverter is an interface which specifies the methods to be used to convert a double [][] to a BufferedImage. A class implementing this interface is given to an IImageViewer through the setController method in that interface. Each time the IImageViewer setRaster is called, the convertRaster method in IRasterConverter is called so that it can convert the double[][] to a BufferdImage
Version:
$Version$
Author:
Erik Assum
  • Method Summary

    Modifier and Type
    Method
    Description
    convertRaster(double[][] raster)
    convertRaster is called from the IImageViewer.
    void
    setImageViewer is called by the IImageViewer that this IRasterConverter controls.
  • Method Details

    • convertRaster

      BufferedImage convertRaster(double[][] raster)
      convertRaster is called from the IImageViewer. It is responsible for changing a double[][] into a BufferedImage Oh, and by the way, the first dimension is the y-axis, and the second is the x-axis: double point; for (int y = 0; y < raster.length; y++) for (int x = 0; x < raster[y].length; x++) point = raster[y][x];
      Parameters:
      raster - a double[][] value
      Returns:
      Image
    • setImageViewer

      void setImageViewer(IImageViewer viewer)
      setImageViewer is called by the IImageViewer that this IRasterConverter controls. It is called so that the class implementing IRasterConverter can gain access to its IImageViewer.
      Parameters:
      viewer - an IImageViewer value