import uk.ac.ed.ph.signal.*; /** Short test programme to demonstrate reading data from * a ASCI text file into e RealImage which is then displayed * @author Will Hossack, The University of Edinburgh */ public class ASCIreader { public static void main(String args[]) { if (args.length < 3) { System.out.println("Usage: java ASCIreader width height file"); System.exit(0); } // Get the parameters passed int width = Integer.parseInt(args[0]); int height = Integer.parseInt(args[1]); String fileName = args[2]; // Read in the RealImage RealImage im = RealImage.fromTextFile(fileName,width,height); // Create a DipllayImage object ImageFrame display = new ImageFrame("ASCI Image"); display.addImage(im); // Add an image } }