How to customize Scale Bar into Nanometer and adjust font size

I have a TIFF image with four channels downloadable here.

With the following IJMacro command:

Stack.setDisplayMode("composite");
Stack.setActiveChannels("1001");
run("Scale Bar...", "width=500 height=12 font=70 color=White background=Black location=[Lower Right] bold serif overlay label");

I get this image:

What I want do is to show the scale bar from pixels in terms of nanometer.
In my case the conversion is:

1 pixel = 645 nanometer

Further more is there a way to adjust the font size?

Have a look at this tutorial:

Here another one I found on the internet:

http://www.swarthmore.edu/NatSci/nkaplin1/scalebar.htm

Make a line selection before you add the scale bar to increase the bar length!.

Macro (Scale bar as overlay! Use the flatten command to make it persistant in a new image for publication!):

run("Set Scale...", "distance=1 known=645 pixel=1 unit=nm global");
run("Scale Bar...", "width=433440 height=24 font=84 color=White background=None location=[Lower Right] bold overlay");

Result:

2 Likes