Re: imageID list in macro
Posted by
Soichiro Yamada on
URL: http://imagej.273.s1.nabble.com/Image-Gradient-tp3704168p3704173.html
Thanks Gabriel. That worked. So
// check open images
titles=newArray(nImages);
count=0;
testid=-1;
while (count<nImages) {
if (isOpen(testid)) {
selectImage(testid);
titles[count]=getTitle();
count++;
}
testid--;
}
Soichiro Yamada
Molecular & Cellular Physiology Dept
Stanford University
tel: 650-725-7553
email:
[hidden email]
url:
http://nelsonlab.stanford.eduOn Dec 22, 2005, at 11:50 AM, Gabriel Landini wrote:
> On Thursday 22 December 2005 19:38, Soichiro Yamada wrote:
>
>> I am writing a macro that uses two images. In Dialog window, I would
>> like an option for the users to choose two images from open windows.
>> To do this I need to know the image IDs of images that are currently
>> open. I could not find a build-in macro function to do this. It would
>> be an equivalent of windowManager.getIDList(). Any help?
>>
>>
>
> You could loop from 1 to nImages, to selectImage(i), get their
> title and put
> it into an array.
>
> Cheers,
>
> Gabriel
>