Access to an image

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

Access to an image

Juanjo Vega
Hello everyone,

If there are several images opened (in my case there is at least an
image and the selected ROI pasted from clipboard), how can I reference
one of them?, I mean, is there any method like "getImage()" using an
index or name, or whatever?

I want to allow a user to select a ROI. Then the ROI is pasted in a new
image (this is already done), and from that smaller image, I want to
select two points. So I need to get the points from that image and not
form the other.

Thanks!

--
Juanjo Vega ([hidden email])

Unidad de Biocomputación. Laboratorio B-13.
Centro Nacional de Biotecnología. CNB-CSIC.
C\ Darwin, 3. Campus de Cantoblanco.
Universidad Autónoma de Madrid.
28049, Madrid, Spain.

http://www.cnb.csic.es
http://www.biocomp.cnb.uam.es

+34 91 585 4510


"Las mejores almas son capaces de los mayores vicios como de las mayores virtudes, y aquellos que caminan despacio por el camino recto pueden llegar más lejos que los que corren pero se apartan de él." - Discurso del Método, René Descartes.
Reply | Threaded
Open this post in threaded view
|

Re: Access to an image

Stephan Saalfeld
IJ.getImage();

have a look at

http://rsb.info.nih.gov/ij/developer/api/index.html

Whenever you're looking for something that can be done from the ImageJ
user interface, you can find out how to do it by logging it with the
macro recorder.

Don't be too lazy ;)

Best,
Stephan


On Tue, 2009-05-19 at 12:34 +0200, Juanjo Vega wrote:

> Hello everyone,
>
> If there are several images opened (in my case there is at least an
> image and the selected ROI pasted from clipboard), how can I
> reference
> one of them?, I mean, is there any method like "getImage()" using an
> index or name, or whatever?
>
> I want to allow a user to select a ROI. Then the ROI is pasted in a
> new
> image (this is already done), and from that smaller image, I want to
> select two points. So I need to get the points from that image and
> not
> form the other.
>
> Thanks!
>
Reply | Threaded
Open this post in threaded view
|

Re: Access to an image

Stephan Saalfeld
In reply to this post by Juanjo Vega
There is also

IJ.selectWindow( int/String )

for more selective access to single windows

http://rsb.info.nih.gov/ij/developer/api/ij/IJ.html#selectWindow(int)

Best,
Stephan


On Tue, 2009-05-19 at 12:34 +0200, Juanjo Vega wrote:

> Hello everyone,
>
> If there are several images opened (in my case there is at least an
> image and the selected ROI pasted from clipboard), how can I reference
> one of them?, I mean, is there any method like "getImage()" using an
> index or name, or whatever?
>
> I want to allow a user to select a ROI. Then the ROI is pasted in a new
> image (this is already done), and from that smaller image, I want to
> select two points. So I need to get the points from that image and not
> form the other.
>
> Thanks!
>
Reply | Threaded
Open this post in threaded view
|

Re: Access to an image

Juanjo Vega
In reply to this post by Stephan Saalfeld
Hi discovered the "selectWindow()" method just a minute after sending my
previous message. In anyway is good to know about the macro recorder,
I'll try it.

Thanks!

Stephan Saalfeld escribió:

> IJ.getImage();
>
> have a look at
>
> http://rsb.info.nih.gov/ij/developer/api/index.html
>
> Whenever you're looking for something that can be done from the ImageJ
> user interface, you can find out how to do it by logging it with the
> macro recorder.
>
> Don't be too lazy ;)
>
> Best,
> Stephan
>
>
> On Tue, 2009-05-19 at 12:34 +0200, Juanjo Vega wrote:
>  
>> Hello everyone,
>>
>> If there are several images opened (in my case there is at least an
>> image and the selected ROI pasted from clipboard), how can I
>> reference
>> one of them?, I mean, is there any method like "getImage()" using an
>> index or name, or whatever?
>>
>> I want to allow a user to select a ROI. Then the ROI is pasted in a
>> new
>> image (this is already done), and from that smaller image, I want to
>> select two points. So I need to get the points from that image and
>> not
>> form the other.
>>
>> Thanks!
>>
>>    
>
>  

--
Juanjo Vega ([hidden email])

Unidad de Biocomputación. Laboratorio B-13.
Centro Nacional de Biotecnología. CNB-CSIC.
C\ Darwin, 3. Campus de Cantoblanco.
Universidad Autónoma de Madrid.
28049, Madrid, Spain.

http://www.cnb.csic.es
http://www.biocomp.cnb.uam.es

+34 91 585 4510


"Las mejores almas son capaces de los mayores vicios como de las mayores virtudes, y aquellos que caminan despacio por el camino recto pueden llegar más lejos que los que corren pero se apartan de él." - Discurso del Método, René Descartes.