Login  Register

Rename output from "Straighten..." (as a function argument)

Posted by wirthvolker on May 06, 2014; 8:00am
URL: http://imagej.273.s1.nabble.com/Rename-output-from-Straighten-as-a-function-argument-tp5007587.html

Hi,
my macro is using the command Edit>Selection>Straighten in a loop to
extract lines from several ROIs on a stack. The code looks like this:

... in a loop
{
     selectWindow(rawStack);
     roiManager("Select", currROIindex);
     run("Straighten...", "line=20 process");
     rename(currOutputName);
}

The problem with this is that sometimes the "rename"-command is
applied on the raw stack image instead of the straightened output
image. I cannot exclude that it is a problem with users' impatience
(and clicking on images at the wrong time), but it might help to make
it more stable, anyway.

Is there an option for Straighten to do the renaming immediately? I
imagine something like:

run("Straighten...", "line=20 output=whateverWeWantToCallTheOutput");

If there is no such option, could someone give me a hint to the place
where I can modify it myself (my Java skills are limited, but I would
give it a shot)?

Thanks a lot!

Best regards,
Volker

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html