Skip to content

Fiji/ImageJ macros to quickly add a scale bar to an (electron microscopy) image.

License

Notifications You must be signed in to change notification settings

lukmuk/em-scalebartools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EMScaleBarTools

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, ... .

Example

Image source: Cropped image of Cobaea scandens (https://commons.wikimedia.org/wiki/File:Cobaea_scandens1-4.jpg) pollen by Marie Majaura from Wikipedia (https://en.wikipedia.org/wiki/Scanning_electron_microscope).

Examples

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).

Example

Using FEI Crop Scalebar on an SEM image.

Example

Batch conversion of SEM images (Process -> Batch -> Macro...) from tiff to png using FEI_Crop_Scalebar.ijm.

Example

Hotkeys can be used to quickly adjust the scale-bar appearance.

In-/Decreasing scale-bar length:
Basic usage

In-/Decreasing scale-bar size:
Basic usage

EMScaleBarTools in action

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: Example

The next GIF shows the application of Auto re-scale images to upscale a small (in pixels) inset of an image: Example

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. Example

Macro description

QuickScaleBar Tool (Icon: SB)
  • 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.

FEI Crop Scalebar Tool (Icon: FEI)
  • 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 command runMacro('FEI_Crop_Scalebar.ijm');.

For a description of the other tools, take a look at the wiki. 🗒

Requirements and Installation

  • 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 the EMScaleBarTools.ijm toolset to the macros/toolset folder.

  • Restart Fiji and select the EMScaleBarTools from More Tools... (>>) menu.

Other useful scalebar tools

Citing

If you want, you can cite this project via Zenodo:

DOI

About

Fiji/ImageJ macros to quickly add a scale bar to an (electron microscopy) image.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published