Package fr.esrf.tangoatk.widget.image
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 TypeMethodDescriptionconvertRaster(double[][] raster) convertRasteris called from the IImageViewer.voidsetImageViewer(IImageViewer viewer) setImageVieweris called by the IImageViewer that this IRasterConverter controls.
-
Method Details
-
convertRaster
convertRasteris called from the IImageViewer. It is responsible for changing adouble[][]into aBufferedImageOh, 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- adouble[][]value- Returns:
- Image
-
setImageViewer
setImageVieweris 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- anIImageViewervalue
-