/* * ReadDataTest.java * * Created on 24 April 2003, 16:35 */ package test; import uk.ac.leeds.ccg.grids.*; import java.io.*; /** * * @author jianhuij */ public class ReadDataTest { /** Creates a new instance of ReadDataTest */ public ReadDataTest() { } /** * @param args the command line arguments */ public static void main(String[] args) { File dir = new File( "D:/workspace/test/" ); File[] all = dir.listFiles(); for ( int i = 0; i < all.length; i ++ ) { System.out.println( all[ i ].getName() ); File imageFile = new File( "D:/workspace/test/test" + i + ".png" ); File gridFile = new File( "D:/workspace/test/"+ all[ i ].getName() + ".grd" ); Grid2DSquareCellDoubleFactory f = new Grid2DSquareCellDoubleFactory(); AbstractGrid2DSquareCellDouble grid = f.createGrid2DSquareCellDouble( all[ i ] ); Grid2DSquareCellDoubleExchange.toBinaryFile( grid, gridFile ); Grid2DSquareCellDoubleExchange.toImage( grid, imageFile, "png" ); } } }