Re: Getting the ImagePlus in an ImageCanvas
Posted by
Michael Schmid on
Dec 02, 2009; 2:58pm
URL: http://imagej.273.s1.nabble.com/Getting-the-ImagePlus-in-an-ImageCanvas-tp3690250p3690257.html
Hi Jean-Yves,
you could try (ImageWindow)imageCanvas.getParent(), which should give
you the associated ImageWindow.
ImageWindow has a getImagePlus() method.
Michael
________________________________________________________________
On 2 Dec 2009, at 15:34, Jean-Yves Tinevez wrote:
> Hi folks,
>
> I am writing something involving user interaction.
> In one of the steps, I catch mouse events: when the user clicks in
> a frame, I get the source of the click as an ImageCanvas.
>
> But of course, what I would like to get is the ImagePlus within
> this canvas. How would you do that, knowing that there is not
> getter for the ImagePlus in the ImageCanvas class?
>
> Cheers
> jy
>
> --
> Jean-Yves Tinevez
> PFID - Imagopole
> Institut Pasteur
> 25-28, rue du Docteur Roux
> 75724 Paris cedex 15
> France
> tel: +33 1 40 61 31 77