annotating measurements in time series stacks

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

annotating measurements in time series stacks

Vergara, Leoncio A.-2
Good Morning

I am doing intravital microscopy experiments in mice while simultaneously
performing physiological measurements (temperature, etc). I can
synchronize the recordings with the timing of the frame captures and
generate a text list with the measurements, for example one line per
frame. I would like to stamp these measurements in the frames, so that the
parameter changes can be visualized together with the time stamp while
playing back the time lapse recording.
I was not able to find a ready function to do that with Image J. I am a
physician-scientist, I have microscopy and imaging experience but limited
programming skillsŠ and a presentation coming up soon. I was wondering if
someone could point me in the right direction.

Thanks in advance for your help

Leoncio

Leoncio Vergara MD MS
Sr. Research Director
Department of Surgery
(Research Division)
Baylor College of Medicine
Houston, Texas







 

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

Re: annotating measurements in time series stacks

Krs5
Dear Leoncio,

This macro code will add the info from a text file to individual frames. It expects one line per frame. Your image should be open and you select the text file in the macro. This can further automated if you would require.

lines = split(File.openAsString(""), "\n");
n = lines.length;
for (i=0; i<n-1; i++) {
     values = split(lines[i], ",\r ");
     measurement = values[0];
     setSlice(i+1);
     run("Label...", "format=Text starting="+(i+1)+" interval=1 x=5 y=20 font=18 text="+measurement+" range="+(i+1)+"-"+(i+1)+" use_text");
}

You can change the location of the text in the image by changing the x and y values above as well as the font size.

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Vergara, Leoncio A.
Sent: 11 June 2015 14:29
To: [hidden email]
Subject: annotating measurements in time series stacks

Good Morning

I am doing intravital microscopy experiments in mice while simultaneously performing physiological measurements (temperature, etc). I can synchronize the recordings with the timing of the frame captures and generate a text list with the measurements, for example one line per frame. I would like to stamp these measurements in the frames, so that the parameter changes can be visualized together with the time stamp while playing back the time lapse recording.
I was not able to find a ready function to do that with Image J. I am a physician-scientist, I have microscopy and imaging experience but limited programming skillsŠ and a presentation coming up soon. I was wondering if someone could point me in the right direction.

Thanks in advance for your help

Leoncio

Leoncio Vergara MD MS
Sr. Research Director
Department of Surgery
(Research Division)
Baylor College of Medicine
Houston, Texas







 

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

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

Re: annotating measurements in time series stacks

Vergara, Leoncio A.-2
Kees

Thank you, the macro solved my problem and gave me the opportunity to get
started with macro programming. I had fun understanding the commands and
modifying the code for my needs. I have been using image J for a while but
now I see more possibilities. Image J is great!

Leoncio

On 6/11/15, 12:09 PM, "Straatman, Kees (Dr.)" <[hidden email]> wrote:

>Dear Leoncio,
>
>This macro code will add the info from a text file to individual frames.
>It expects one line per frame. Your image should be open and you select
>the text file in the macro. This can further automated if you would
>require.
>
>lines = split(File.openAsString(""), "\n");
>n = lines.length;
>for (i=0; i<n-1; i++) {
>     values = split(lines[i], ",\r ");
>     measurement = values[0];
>     setSlice(i+1);
>     run("Label...", "format=Text starting="+(i+1)+" interval=1 x=5 y=20
>font=18 text="+measurement+" range="+(i+1)+"-"+(i+1)+" use_text");
>}
>
>You can change the location of the text in the image by changing the x
>and y values above as well as the font size.
>
>Best wishes
>
>Kees
>
>
>Dr Ir K.R. Straatman
>Senior Experimental Officer
>Advanced Imaging Facility
>Centre for Core Biotechnology Services
>University of Leicester
>http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite
>/aif
>
>-----Original Message-----
>From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
>Vergara, Leoncio A.
>Sent: 11 June 2015 14:29
>To: [hidden email]
>Subject: annotating measurements in time series stacks
>
>Good Morning
>
>I am doing intravital microscopy experiments in mice while simultaneously
>performing physiological measurements (temperature, etc). I can
>synchronize the recordings with the timing of the frame captures and
>generate a text list with the measurements, for example one line per
>frame. I would like to stamp these measurements in the frames, so that
>the parameter changes can be visualized together with the time stamp
>while playing back the time lapse recording.
>I was not able to find a ready function to do that with Image J. I am a
>physician-scientist, I have microscopy and imaging experience but limited
>programming skillsŠ and a presentation coming up soon. I was wondering if
>someone could point me in the right direction.
>
>Thanks in advance for your help
>
>Leoncio
>
>Leoncio Vergara MD MS
>Sr. Research Director
>Department of Surgery
>(Research Division)
>Baylor College of Medicine
>Houston, Texas
>
>
>
>
>
>
>
>
>
>--
>ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>--
>ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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