protected void writeFooter() throws IOException { out.writeLine("}"); }
protected void writeFooter() throws IOException { out.writeLine("}"); }
protected void writeHeader() throws IOException { String className = currentId.substring(0, currentId.length() - 5); className = className.substring(className.lastIndexOf(File.separator) + 1); out.writeLine("//"); out.writeLine("// " + className + ".java"); out.writeLine("//"); out.writeLine(""); out.writeLine("// Generated by Bio-Formats v" + FormatTools.VERSION); out.writeLine("// Generated on " + DateTools.getTimestamp()); out.writeLine(""); out.writeLine("public class " + className + " {"); out.writeLine(""); }
protected void writeHeader() throws IOException { String className = currentId.substring(0, currentId.length() - 5); className = className.substring(className.lastIndexOf(File.separator) + 1); out.writeLine("//"); out.writeLine("// " + className + ".java"); out.writeLine("//"); out.writeLine(""); out.writeLine("// Generated by Bio-Formats v" + FormatTools.VERSION); out.writeLine("// Generated on " + DateTools.getTimestamp()); out.writeLine(""); out.writeLine("public class " + className + " {"); out.writeLine(""); }
protected void writePlane(String varName, byte[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public byte[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, double[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public double[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, short[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public short[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, double[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public double[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, byte[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public byte[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, float[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public float[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, long[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public long[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, float[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public float[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, short[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public short[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, int[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public int[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, long[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public long[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }
protected void writePlane(String varName, int[] array, int w, int h) throws IOException { int i = 0; out.writeLine(" public int[][] " + varName + " = {"); for (int y=0; y<h; y++) { out.writeBytes(" {"); for (int x=0; x<w; x++) { out.writeBytes(String.valueOf(array[i++])); if (x < w - 1) out.writeBytes(", "); else out.writeBytes("}"); } if (y < h - 1) out.writeLine(","); else out.writeLine(""); } out.writeLine(" };"); out.writeLine(""); }