|
Hi,
I would like to code a script/macro to change from .bin file (which is imported by Import >> Raw) to .txt file (SaveAs >> Text Image).
My (wrong) code is something like following:
--------------------------
import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;
import ij.plugin.frame.*;
public class My_Plugin implements PlugIn {
public void run(String arg) {
int w = 40, h = 44;
IJ.run("Raw...", "open=[D:\\DB-Eggborough\\batch25445\\ 78784 20-02-2012 15-50-44 2699 3334 44 40.bin] image=8-bit width=w height=h offset=0 number=1 gap=0");
IJ.showMessage("My_Plugin", "Finish");
}
}
----------------------
I suppose that the field "width=..." and "height=..." should go with an Integer. But I want to open atomatically hundreds of files, with well defined "width" and "height"; how can I complete automaticcally those fields after defining "weight", "height"?
Thanks for your help,
DangTung
|