Fiji macro toolset to quickly add a scale bar with reasonable size to an image. Developed for electron microscopy.
❗ Please double-check the scale-bar length for possible rounding errors, especially if it shows 1 µm, 1 nm, 1 mm, ... . |
---|
Using QuickScaleBar on a HRTEM image. Note the similar size of the scale bars for the 4096² image (center) and the cropped 512² ROI image (right).
Using FEI Crop Scalebar on an SEM image.
Batch conversion of SEM images (Process -> Batch -> Macro...
) from tiff to png using FEI_Crop_Scalebar.ijm
.
Hotkeys can be used to quickly adjust the scale-bar appearance.
In-/Decreasing scale-bar length:
In-/Decreasing scale-bar size:
Examples are from v0.2.
Basic usage with cropping of a TFS/FEI databar, addition of a scale bar, moving and removing of the scale bar:
The next GIF shows the application of Auto re-scale images
to upscale a small (in pixels) inset of an image:
The next GIF shows an example workflow when working with presentations (here Microsoft PowerPoint). For a horizontal alignment of images (here an SEM and an HAADF-STEM image) with the same desired image height, the scale bar reference is switched to Height
. Note the automatic handling of unit-switching and rescaling as in the previous example. The image are then copied via the hotkey c to the system clipboard and pasted into PowerPoint.
-
One-click action to add a scale bar to an image. Right click opens the options menu.
-
The scale bar height and font size is adjusted based on image height (or width).
-
The scale bar width is adjusted based on scaled image width (or height, or larger/smaller of the two) and rounded to next "good looking" number.
-
The scale bar appearance can be set up just like the normal settings for
Analyze -> Tools -> Scale bar...
. -
Optional: Automatically switch units to make scale bar more appealing. E.g., an image with horizontal field width of 0.25 µm will be switched to 250 nm. The scale bar will then also be in nm.
-
Optional: Automatically re-scale image to (at least) a specified image size in pixels without interpolation (= nearest neighbor interpolation). This is convenient for programs like PowerPoint which like to automatically interpolate "small" images.
-
Optional: Run custom macro commands provided in the options menu, e.g.
run('mpl-viridis');
to change LUT to viridis.
-
One-click action to crop away the databar from an FEI/TFS SEM/FIB image and to add a scale bar. Right click opens the options menu.
-
Scale bar behaviour is the same as for QuickScaleBar tool and settings are taken from the QuickScaleBar options.
-
Optional: Run custom macro commands provided in the options menu, e.g.
run('mpl-viridis');
to change LUT to viridis. -
Especially useful for batch conversion of SEM/FIB images (run from
Process -> Batch -> Macro...
): In the batch processing menu insert the macro commandrunMacro('FEI_Crop_Scalebar.ijm');
.
For a description of the other tools, take a look at the wiki. 🗒
-
Cropping the FEI/TFS info bar requires the useful EM tool plugin by IMBalENce as FEI/TFS images are scaled with SEM FEI metadata scale. Install via the Fiji update site.
-
Download the latest release, extract the
macros
folder, and copy it to your Fiji installation folder. It will add theFEI_Crop_Scalebar.ijm
macro to the macros folder and theEMScaleBarTools.ijm
toolset to themacros/toolset
folder. -
Restart Fiji and select the
EMScaleBarTools
fromMore Tools...
(>>) menu.
-
Python: matplotlib-scalebar by ppinard
-
DM/GMS: Scale Bar Control by D. R. G. Mitchell
-
Fiji/ImageJ: asc-ImageJ-Fancy-Labels by peterjlee
-
Fiji/ImageJ: Scale Bar Tools for Microscopes by Gilles Carpentier
If you want, you can cite this project via Zenodo: