Posted by
Sullivan, Michael J (College of Med.) on
Dec 21, 2005; 4:57pm
URL: http://imagej.273.s1.nabble.com/Which-Image-tp3704187p3704189.html
Thanks Kurt, that looks like it'll work. Just get to hammer together
the code to get to the events/source/ijCanvas/ID. --- Mike
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
Kurt De Vos
Sent: Wednesday, December 21, 2005 11:30 AM
To:
[hidden email]
Subject: Re: Which Image
I guess you create a new custom window and canvas for each window?
If so you could give those an id and check that in the listener.
kurt
On 21 Dec 2005, at 16:26, Sullivan, Michael J (College of Med.) wrote:
> Wayne, Bob, Thanks for the responses. But I don't know which image/
> canvas the mouse event was triggered from; the mouse listener does not
> seem to be unique to the canvas.
>
> // "this" is the class from which the images are opened.
> preImageCanvas.addMouseListener(this);
> postImageCanvas.addMouseListener(this);
>
> I thought a "focus" test would work but it doesn't or I'm testing the
> wrong thing
>
> --- Mike
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
> Wayne Rasband
> Sent: Tuesday, December 20, 2005 5:47 PM
> To:
[hidden email]
> Subject: Re: Which Image
>
>> hay All! I'm writing a plugin that will have two open images. The
>> two images have the same filename from different folders. I want to
>> trigger an action (roiSave) off of the mouse release that occurs
>> after the drawing of the ROI. How can I identify which image I'm in?
>> Any ideas appreciated -
>> -- Mike
>
> In a macro:
>
> dir = getDirectory("image");
>
> In a plugin:
>
> String dir = IJ.getDirectory("image");
>
> -wayne
*--*--*--*--*--*--*--*--*--*--*--*--*--*
University of Sheffield
Academic Neurology Unit
Division of Genomic Medicine
E Floor, Medical School
Beech Hill Road
Sheffield
S10 2RX
United Kingdom
Tel: ++44 (0) 114 271 2473
Fax: ++44 (0) 114 226 1201
Email:
[hidden email]
*--*--*--*--*--*--*--*--*--*--*--*--*--*