public class BWRaster extends java.lang.Object implements IRasterConverter
| Constructor and Description |
|---|
BWRaster() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
convertRaster(double[][] raster)
convertRaster is called from the IImageViewer. |
void |
roiChanged(int startx,
int endx,
int starty,
int endy) |
void |
setImageViewer(IImageViewer viewer)
setImageViewer is called by the IImageViewer that
this IRasterConverter controls. |
public void setImageViewer(IImageViewer viewer)
IRasterConvertersetImageViewer is called by the IImageViewer that
this IRasterConverter controls. It is called so that the class
implementing IRasterConverter can gain access to its
IImageViewer.setImageViewer in interface IRasterConverterviewer - an IImageViewer valuepublic java.awt.image.BufferedImage convertRaster(double[][] raster)
IRasterConverterconvertRaster 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];
convertRaster in interface IRasterConverterraster - a double[][] valuepublic void roiChanged(int startx,
int endx,
int starty,
int endy)