Microscope Measurement Tools

Revision as of 10:25, 9 July 2016 by Rueden (talk | contribs) (Write "Fiji" in normal case always)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Microscope Measurement Tools (Fiji)
Author Demis D. John
Maintainer Demis D. John (demis.john@gmail.com)
File Microscope-Measurement-Tools.zip
Source on GitHub
Initial release Sept. 24th, 2015
Latest version 1.3.1
Development status beta
Website Microscope Measurement Tools at GitHub

Recall saved calibrations for your microscope's measurement scale and create measurement annotations.


This set of plugins provides a quick way to save distance/length calibrations for various microscopes/objectives in a simple text file.

You can then choose any of your prior measurement calibrations to be applied to an open image (or all open images), as so:

Microscope Meas Tools - Choose Calibration 01.png

The "Draw Measurement" plugin then allows you to draw a line with the calibrated measurement length, as so:

Microscope Meas Tools - Draw Meas Line.png

Three files are included:

  • Choose_Microscope_Calibration.py
    • Opens the "Choose Calibration" window, for setting the measurement scale to a preconfigured value.
  • Draw_Measurement_-_Line.py
    • Converts a Line ROI into a drawn annotation with the measurement length indicated.
  • Microscope_Calibrations_user_settings.py
    • Settings file that contains your pre-configured scale calibrations, along with some settings for drawing annotations (background/text color etc.)

Installation & Usage Manual

Please see the complete installation & usage instructions here:

Microscope Meas. - Calibration instructions.pdf

Basic instructions are as follows.

1. Extract the .zip file linked at GitHub/Releases, and place the resulting Analysis folder inside

Fiji.app / Plugins / Scripts
(If an Analysis folder already exists, do Not overwrite it - you must have another Analysis plugin installed! Instead, merge the two folders.)

Setting up your calibrations

2. Open an image with a feature of some known length, taken with some microscope/objective that you desire to save a calibration for.

3. Draw a line along the feature of known length.

4. Select the Analyze  ▶ Set Scale menu item.

5. Type in the known length in "Known Distance" and record the "Scale" value for this calibration.

Perform more calibrations (on other images) if desired, recording the Scale values for each.

6. Edit the File

Fiji.app / plugins / Scripts / Analyze / Microscope Measurement Tools /

7. Type in the Calibration's Names & Scale values, making sure to match up the list of names with their corresponding calibrations.

This settings file is an actual python script, so you can edit the lists there using normal Python syntax. eg. functions like myList.append( [ ] ) or myList = ['cm'] * 5 etc. will work.

Unfortunately, changes to the settings file may not be automatically picked up by Fiji. The workaround is to do the following:

8. Quit Fiji.

9. Delete the "py.class" file in the plugin’s folder:

Fiji.app / plugins / Scripts / Analyze / Microscope Measurement Tools /

10. Open Fiji. It should have picked up the new settings now.

You should only have to do this calibration once, when you do your initial calibration/setup.

Applying a pre-configured scale to your image

11. Run Analyze  ▶ Microscope Measurement Tools  ▶ Choose Microscope Calibration - the pop-up window shows the new names and calibration values you set in your user-settings file.

Annotating your image with a length measurement

To draw a measurement annotation,

1. Draw a "Straight Line" along the feature you want to measure (the length is displayed in the Fiji status bar)

2. Select Analyze  ▶ Microscope Measurement Tools  ▶ Draw Annotation - Line.

The annotation will be drawn directly onto the image.
It is recommended that you work on a copy of your file. Unfortunately there is currently no Undo feature. I may try to figure out ho to use the "Overlay" feature to make something like that possible.


This simple python (jython) plugin was created by Demis D. John, 2015.

I used the following plugins as inspiration: Correct_3D_drift and Microscope Scale (which sadly is no longer easily customizable).

The Line Annotation is pretty crude - I would love it if someone made that more flexible and user-friendly (eg. erase an annotation or undo an annotation) - possibly using the "overlay" option?

Please feel free to add other measurement annotation plugins!