How to calculate d-spacing values from HR-TEM using ImageJ

I have been analyzing some High-Resolution Transmission Electron Microscopy (HR-TEM) images of metallic nanoparticles recently, and one of the most useful properties to obtain is the d-spacing values from the crystalline structure of individual nanoparticles (or for the whole sample).

As you may know, Gatan’s Digital Micrograph is the most popular software package for analyzing electron micrographs, and it makes to obtain d-spacing values quite simple. It is great that they allow to use an offline version for free, but unfortunately, it does not run on GNU/Linux or Mac OS X. Some tutorials have addressed how to run this software using wine, but just for quite old versions. ImageJ is an excellent alternative for analyzing all kind of images, and it is open source and modular with a lot of powerful plugins, macros and so on. There is a specific plugin for automatically determine the d-spacing values from TEM images, but it has not been working for me.

Therefore, in this post I would like to summarize different strategies using ImageJ to obtain d-spacing values from HR-TEM images, which may be useful for someone else, particularly for beginners.

Direct measurement between atomic layers

The simplest strategy to obtain the d-spacing values is by directly measuring the distance between atomic layers of the nanoparticle from the high-resolution image:

The main issue with this strategy is that the accuracy depends a lot on the image quality and the user’s patience and sight to select precise start and end points. It is also necessary to repeat this in different zones, and, sometimes, the changes in d-spacing values are quite small from different lattice planes, which may be easily missed using this method.

Direct measurement of profile plot

Another direct strategy is using the Plot Profile option after drawing a selection line through the nanoparticle of interest, and measuring the distance between the maxima in the resulting profile plot:

The results will also depend quite a lot on the image quality, contrast between the atomic layers and “voids”, how well the selection line is drawn and so on. The maxima of the profile plot are often not well defined, making difficult an accurate determination of the d-spacing values.

FFT image

The next strategy would be representing the Fast Fourier Transform (FFT) of the HR-TEM image to visualize the diffraction pattern. This can be easily carried out with ImageJ’s FFT option (Process->FFT->FFT). Interestingly, this will give the diffraction pattern of all the nanoparticles in the image, and will readily show how polycrystalline the sample is:

The d-spacing values can now be determined by measuring the distance between two symmetric diffraction points in the FFT image, and the d-spacing will show up on the ImageJ statusbar. Unfortunately, the value is only given with two significant digits (0.xx nm), and I did not find any option to change this.

Inverted FFT

Usually a better and clearer option to calculate the d-spacing values is representing the inverted FFT image after selecting specific diffraction spots in the FFT image. It is possible to select several or just one diffraction spot, depending how much information we want to get in the resulting image. The diffraction spots can be selected with the “oval” selection tool and filled with white color (Edit->Fill option) to create a masked image:

Even if I have selected two symmetric spots in this image, just selecting one is enough and ImageJ will get the other one automatically. Now, we have a masked image ready to be inverted by using the Process->FFT->Inverted FFT option:

This transformation allows to identify quite easily what particles are responsible for the selected diffraction spots, and the new image will also show the inter-spacings clean from other interference and with higher contrast. Now, the d-spacing can be obtained by measuring directly the distance or by the Plot Profile option, which will be more accurate. It is important to draw a straight line in a perpendicular position to the represented atomic layers. This can be done by drawing a line following the atomic layers (quite easy to do it straight), add this line to the ROI Manager, and use the following macro to create automatically a perpendicular line to the previously drawn line:

Now, you can plot the profile to get something similar to this figure:

This profile looks much better than the one obtained directly from the untreated image, and, of course, it will be easier to get the d-spacing values from this plot between the maxima. Since everything performed manually has the inherent error from the user, I have created a python script to calculate the distance between all the maxima after exporting the curve to a .csv file (Data->Save data), which will make the process more accurate than doing it manually. You can find it in my TEMtools Github.

Then, you can repeat the same process for different diffraction spots to calculate the d-spacing of different particles from the sampled TEM image, which may be oriented with different planes. This is a bit tedious, but I hope to create some python script to make this more automatically in the future. I think that selecting a particle in a HR-TEM image, and automatically get the d-spacing values by the inverted FFT method would be great or calculate the d-spacing values from all the diffraction spots automatically would also be useful. Let’s see if I can do something!

Note: ImageJ can open dm3 files with embedded size scale information, which is great. If you do the analysis with regular TIFF files, then you need to set the correct scale to obtain meaningful d-spacing values.

Leave a Reply

Scroll to Top