Login  Register

Re: questions about ImageJ javascript scripts language

Posted by Emanuele Martini on Jul 23, 2015; 7:36am
URL: http://imagej.273.s1.nabble.com/questions-about-ImageJ-javascript-scripts-language-tp5013709p5013711.html

Hi Xiuxia,
maybe I am wrong but I think that in your *not* imagej macro code, you are trying to getImage before opening it.

So I think that you could try like that:
++++

IJ.run("Text Image... ",
"open=/home/xiuxia/home2/result/predict_14img.txt");

imp = IJ.getImage();

IJ.run("Conversions...", " ");
IJ.saveAs(imp, "Tiff", "/home/xiuxia/home2/result/predict_14img0000.tif");
imp.close();
+++

since the opening function is IJ.run("text image.....)
and then you can get it via IJ.getImage

but maybe I'm wrong...

Have a nice day,
Emanuele Martini
Image Analyst @Ifom-IEO research campus -MI-