// Author Nathalie Cammas // Last modified 14/07/00 //package code.connections; import java.awt.color.*; import java.awt.*; import java.util.*; /** * Image representation consisting of a 1d double array, double values are * generated from some convolutions, pixel multiplication (x0.5 etc). */ public class image1DDouble extends image{ /** * The 1d double array representing pixel grey levels, a value of * 100.75 may be used to represent a pixel internally for operators that * use double values but when passed to an operator that only uses * integer values, the values will be rounded to the nearest integer * (101 in this case). */ private double [] values; /** * No argument constructor, initialises all variables to 0. */ public image1DDouble(){ width = 0; height = 0; values = new double [0]; } /** * Constructs a new image1DDouble from a 1d double array. * @param width the width of the image * @param height the height of the image * @param values the 1d double array of pixel grey level values */ public image1DDouble(int width, int height, double [] values){ this.width = width; this.height = height; this.values = new double [width*height]; for(int j=0;j