Calibration bar stack

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

Calibration bar stack

surjpanj
Hi,

I want to overlay calibration bar to all images in my stack. If I do it in a normal way using Analyze/Tools/Calibration Bar... and save the stack as animated GIF, then the calibration bar is not burned into the gif. I tried using "Calibration Bar Macros.txt". It works but it burns calibration bar on the top-right corner using default font. I need to specify position of calibration bar and use different fonts. Any idea how to do this in elegant way?

Thanks,
Matt

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

Re: Calibration bar stack

Rasband, Wayne (NIH/NIMH) [E]
On Aug 28, 2014, at 12:02 PM, Matt wrote:

> Hi,
>
> I want to overlay calibration bar to all images in my stack. If I do it in a normal way using Analyze/Tools/Calibration Bar... and save the stack as animated GIF, then the calibration bar is not burned into the gif. I tried using "Calibration Bar Macros.txt". It works but it burns calibration bar on the top-right corner using default font. I need to specify position of calibration bar and use different fonts. Any idea how to do this in elegant way?

Enable the "Overlay" option in the Calibration Bar dialog box and the calibration bar will be displayed on all the images in the stack. The following macro opens the T1 Head sample stack, adds a calibration bar as an overlay, sets the frame rate to 15 fps, saves the stack as an animated GIF, closes the stack, opens the animated GIF and starts animating it.

-wayne

  requires("1.49c");
  run("T1 Head (2.4M, 16-bits)");
  options = "location=[Upper Right] fill=None"
     + " label=White number=5 decimal=0"
     + " font=10 zoom=1 bold overlay";
  run("Calibration Bar...",  options);
  run("Animation Options...", "speed=15");
  saveAs("Gif", getDirectory("temp")+"animated.gif");
  close();
  open(getDirectory("temp")+"animated.gif");
  doCommand("Start Animation [\\]");

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