http://imagej.273.s1.nabble.com/ImageJ-macro-question-tp5016450p5016459.html
> Thanks Peter.
>
> I guess I didn't state my question right.
>
> The selected ROIs can be (0,3,5), or (2,4), or (1,2,3,4,5). The code I have will generate the list base on other calculations.
> This list is saved in an array named "roiIndex"
>
> For instance, in case of (0,3,5) roiIndx[0]=0, roiIndex[1]=3, roiIndex[2]=5
> in case of (1,2,3,4,5) roiIndx[0]=1, roiIndex[1]=2, roiIndex[2]=3, roiIndex[3]=4, roiIndex[4]=5,
>
> Then I need to incorporate the roiIndex array into the roiManager("Select", newArray(...)) function to select those ROIs.
>
> How should I do that?
>
> Thanks
> Lai
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Peter Haub
> Sent: Tuesday, May 17, 2016 5:26 PM
> To:
[hidden email]
> Subject: Re: ImageJ macro question.
>
> Hello Lai,
>
> your tmp must be an array of numbers - not a string.
> Omit the quotation marks in your second example:
>
> tmp = newArray(0,3,5);
> roiManager("Select", tmp);
>
> Peter
>
> On 17.05.2016 22:59, Lai Ding wrote:
>> Hello Everyone,
>>
>> I have a question regarding the macro programming on roiManager function.
>>
>> if I wan to select specific group of ROIs in the roiManager, I can use line below
>>
>> roiManager("Select", newArray(0,3,5));
>>
>> this selects the 1st, 4th and 6th ROIs in the roiManager.
>>
>> however if I want to generate the specific groups through other functions, I don't know how to do it.
>>
>> I tried use lines below
>>
>> tmp = "newArray(0,3,5)";
>> roiManager("Select", tmp);
>>
>> it doesn't work.
>>
>> Thanks
>> Lai
>>
>> --
>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html