Login  Register

Re: macro/batch issue

Posted by Wayne Rasband on Aug 20, 2009; 3:52am
URL: http://imagej.273.s1.nabble.com/macro-batch-issue-tp3691446p3691447.html

> Hi,
>
> I've written a macro that strips the metadata out of Digital  
> Micrograph
> image.  I use a self-written wrapper to start imageJ and the following
> command works well:
>
> imageJ -macro getMetaData FILE.dm3
>
> I have a second macro that should work in batch mode (no GUI, so no  
> open
> windows) but when I run it
>
> imageJ -batch getMetaDataBatch FILE.dm3
>
> I get an error that indicates an inability to find/use the plugin to
> read DM3 files.  This seems to be specific for the DM3 plugin since I
> can run the batch process using a few other "more standard" file  
> types.
>
> I may be able to solve this by mucking about with the java  
> environment,
> but I figure someone else may know exactly what to do.  Thanks for  
> any help.

This bug is fixed in the 1.43f daily build or you can work around it  
by generating a full path in the macro using

     name = getArgument();
     dir = getInfo("user.dir");
     path = dir+File.separator+name;

-wayne