Re: activeImage- how to set it?

Posted by jarek-6 on
URL: http://imagej.273.s1.nabble.com/activeImage-how-to-set-it-tp3701057p3701059.html

Gabriel Landini napisaƂ(a):

> >From http://rsbweb.nih.gov/ij/developer/macro/functions.html
>
> selectImage(id)
>  Activates the image with the specified ID (a negative number). If id is
> greater than zero, activates the idth image listed in the Window menu. With
> ImageJ 1.33n and later, id can be an image title (a string).
>
> selectWindow("name")
>  Activates the image window with the title "name". Also activates non-image
> windows in v1.30n or later.
>
>
> G.
>
>
> On Thursday 09 November 2006 11:58, jarek wrote:
>  
>> hello
>> i write a macro. i work with image which is duplicated lets say 3 times,
>> each of results called : "original", "normalized", "median", treshold".
>> in procedure i designed to apply normalization to "normalized", median
>> to "median" and treshold to "treshold" but in a sequencei can't set an
>> active image proper for planned operation.
>>
>> i tried with getImageID() and isActive(id) but it does't work...all
>> operations are applied to "treshold image. below example of sequence.
>> any help is very welcome!
>> thanks.
>>
>> jarek
>>
>> the procedure:
>>
>> run("Duplicate...", "title=nor");
>> getImageID();
>> run("Duplicate...", "title=med");
>> getImageID();
>> run("Duplicate...", "title=tresz");
>> getImageID();
>> isActive(-42);
>> run("Enhance Contrast", "saturated=0.5 normalize");
>> isActive(-43);
>> run("Median...", "radius=5");
>> isActive(-44);
>> run("Convert to Mask");
>>    
>
>
>
>  
thanks Gabriel,

it works fine