Get a handle on an ImagePlus with a given title

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Get a handle on an ImagePlus with a given title

CARL Philippe (LBP)
Dear all,
With the following code it is possible to get a handle to an ImagePlus having a given title:
        IJ.selectWindow(java.lang.String title);
        ImagePlus img = IJ.getImage();
The two lines are needed given that IJ.selectWindow is a void.
Thus could such a handle to an ImagePlus be reached more directly (i.e. with a single line) ?
My best regards,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 42 89

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Get a handle on an ImagePlus with a given title

Gabriel Landini
On Wednesday, 22 July 2020 22:12:33 BST [hidden email] wrote:
> Thus could such a handle to an ImagePlus be reached more directly (i.e. with
> a single line) ?

I have used this:
imp = WindowManager.getImage("My_image");

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Get a handle on an ImagePlus with a given title

CARL Philippe (LBP)
Indeed much better, thanks a lot Gabriel!!!
Take care,
Philippe

----- Mail original -----
De: "Gabriel Landini" <[hidden email]>
À: "imagej" <[hidden email]>
Envoyé: Jeudi 23 Juillet 2020 00:41:53
Objet: Re: Get a handle on an ImagePlus with a given title

On Wednesday, 22 July 2020 22:12:33 BST [hidden email] wrote:
> Thus could such a handle to an ImagePlus be reached more directly (i.e. with
> a single line) ?

I have used this:
imp = WindowManager.getImage("My_image");

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html