Page history Edit this page How do I edit this website?
Original MediaWiki page

Microscope Measurement Tools

The content of this page has not been vetted since shifting away from MediaWiki. If you’d like to help, check out the how to help guide!


Download from GitHub/Releases


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

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

Three files are included:

    • Opens the “Choose Calibration” window, for setting the measurement scale to a preconfigured value.
    • Converts a Line ROI into a drawn annotation with the measurement length indicated.
    • 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 / 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 AnalyzeSet 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 / 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: / 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 AnalyzeMicroscope Measurement ToolsChoose 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 AnalyzeMicroscope Measurement ToolsDraw 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.

Adding a custom function to the Calibrations list

A sub-folder is included that shows how to implement a custom function in Python, that will be executed to get the scale parameter, and shows up in the Calibrations list.

The example adds a Calibration for a JEOL SEM, which automatically sets the scale based on an accompanying *.txt file. The functionality could be extended to other scale-calibrations which are difficult to hard-code as a single resolution (other continuously-varying magnifications, like SEM tools etc.).


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

Please see the GitHub page for issues needing coding work, and ideas for improvement. You are always welcome to contribute code to the GitHub project, it is remarkably simple due to Fiji’s excellent Python API!