Can a command line call to a macro reference a url instead of a local file?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can a command line call to a macro reference a url instead of a local file?

Bill Mohler
Wayne and others,

Can a command line call to a macro reference a url instead of a local
file for the macro code?

Thanks,
Bill



--
William A. Mohler
Associate Professor
Dept. of Genetics and Developmental Biology
University of Connecticut Health Center
MC-3301
263 Farmington Ave.
Farmington, CT   06030-3301

[hidden email]
*Mobile: (860) 985-2719*
alt. mobile: (860) 331-8514
skype: wmohler

Office: (860) 679-1833, room E2029
Lab: (860) 679-1834, room E2032
Fax: (314) 689-1833

G&DB dept. ofc.: (860) 679-8350
G&DB dept. fax : (860) 679-8345
http://genetics.uchc.edu/Faculty/Mohler/Mohler.html
P Think before you print
Reply | Threaded
Open this post in threaded view
|

Re: Can a command line call to a macro reference a url instead of a local file?

Wayne Rasband
 > Wayne and others,
 >
 > Can a command line call to a macro reference a url instead
 > of a local file for the macro code?
 >
 > Thanks,
 > Bill

Macros can open files using a URL. This example opens an image and a  
text file using URLs:

   open("http://rsb.info.nih.gov/ij/images/clown.jpg");
   open("http://rsb.info.nih.gov/ij/macros/examples/Grid_Overlay.txt");

Text files can be opened as a string. This example opens a macro as a  
string and then runs it:

    s =  
File.openUrlAsString("http://rsb.info.nih.gov/ij/macros/examples/ 
Grid_Overlay.txt");
    eval(s);

The Grid_Overlay macro requires the v1.43j daily build, which adds an  
Image>Overlay submenu with seven new commands.

Scripts and plugins can open an image using a URL without displaying  
it. This JavaScript example opens an image, enlarges it, and then  
displays it:

   imp = IJ.openImage("http://rsb.info.nih.gov/ij/images/clown.jpg");
   IJ.run(imp, "Size...", "width=640 height=400 interpolation=Bicubic");
   imp.show();

-wayne