Login  Register

Access File Info in macro?

Posted by xchopp on Jul 22, 2013; 8:04pm
URL: http://imagej.273.s1.nabble.com/Access-File-Info-in-macro-tp5004078.html


My macro code:

run("Raw...", "open="+path+infile+" image=[16-bit Unsigned] width="+srcCols+" height="+Wsize+" offset="+mOffset+" number="+NumChunks+" gap=0 little-endian use");

must be preceded by a line in which the offset is hardwired, thus:
 
mOffset = 52840;      

This is pretty inelegant: is there any way I can access the offset value from ImageJ macro language?  If not, is there a Javascript function that I can call from the macro to do the same (and how to call?).  

Cheers!

--Mark