Re: incorporating dialog box choices into a macro

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/incorporating-dialog-box-choices-into-a-macro-tp5017816p5017819.html

Hi Leonard,

from the ImageJ Macro Functions Documentation at
   https://imagej.nih.gov/ij/developer/macro/functions.html#makeArrow

   "See also: Roi.setStrokeWidth and Roi.setStrokeColor"

To me, this indicates that the interactive arrow options do not apply
for arrows created by the 'makeArrow' macro command.  You would have to
create your own dialog for the options of the 'makeArrow' arrows.
   https://imagej.nih.gov/ij/developer/macro/functions.html#dialog

Michael
________________________________________________________________


On 12/27/2016 06:15 AM, Dobens, Leonard wrote:

> I am trying to give users of a macro that I’m writing some flexibility in the size/color of arrows it draws outlining particle directionality.
>
> From the Arrow Tool, users make choices about arrow "size/color/arrow head," but these changes are not being implemented when the arrows are drawn.
>
> Is there a straightforward solution to this?
>
> Here is the last bit of the macro, drawing lines between points identified earlier:
>
>> run("Arrow Tool...");
>>
>> for (i=0; i<nResults; i++) {
>>
>> xh = getResult("xh",i);
>> xt = getResult("xt",i);
>> yh = getResult("yh",i);
>> yt = getResult("yt",i);
>>
>>
>>   makeArrow(xt, yt, xh, yh, "notched");
>>
>> run("Draw", "slice");
>> }
>
>
>
> Leonard Dobens, PhD
> Professor of Molecular Biology and Biochemistry
> SCB312
> School of Biological Sciences
> University of Missouri-Kansas City
> 5007 Rockhill Road
> Kansas City, MO 64110
> 8162356272
> [hidden email]
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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