Re: redirect to imageID
Posted by
Michael Schmid on
May 05, 2009; 4:13pm
URL: http://imagej.273.s1.nabble.com/redirect-to-imageID-tp3692673p3692674.html
Hi Tony,
sorry, no way to have an ImageID for the Analyze>Set Measurements
redirect target in a macro.
In the inner works of ImageJ, it is an ImageID, but you cannot access
it from a macro. You can only find out whether you have one, by using
call("ij.plugin.filter.Analyzer.isRedirectImage"):
http://rsb.info.nih.gov/ij/source/ij/plugin/filter/Analyzer.javaYou have to use
sourceTitle = getTitle();
on the input image and set the measurement options, e.g.
run("Set Measurements...", "area mean min redirect=["+ sourceTitle
+"] decimal=4");
This will fail if you have two open images with the same name.
Michael
________________________________________________________________
On 5 May 2009, at 17:13, Tony Collins wrote:
> Hi,
>
> I'm duplicating an image, then using this to create a binary/
> watershed mask to "analyze particles" with the measurements
> redirected to the original.
>
> This works well but I'd like to batch process a folder of these
> images. Is there a way to "redirect to" an image ID rather than
> image name?
>
> Thanks,
>
> Tony