ImageJ Software

Using ImageJ:

ImageJ has a diverse user community and due to the wide range of possible applications, can be daunting; there is a lot of information and plugins out there. Some users may want to explore the amazing diversity of options eventually, but it is not necessary to get started. By focusing only on the things needed for particle analysis, you can be analysing scanned images within 15 minutes of downloading.

A few notes and suggestions:  The number one rule before you get started: BACK UP YOUR DATA! Some functions and batch processes can overwrite existing data with astounding speed and efficiency, and once done cannot be undone. Even once you become comfortable using ImageJ, keep original copies of your scans somewhere you are not working on them.

After initial use, it will be obvious that there are a lot of options and checkboxes that a user should familiarize oneself with. All manuals are online, but can be helpful to print and bind the 198 page manual for use alongside the software. It is also helpful to have a computer equipped with dual screens. Many ImageJ routines run as separate windows; it is helpful to have the extra desktop real estate.

Downloading and running ImageJ the first time:


Go to ImageJ’s website, and download the version appropriate to your system.

If you do not have administrative rights to your computer, a standalone version called Fiji that incorporates the Java operating system files can be downloaded (Schindelin et al. 2012). Fiji looks and acts for all intents and purposes identical to ImageJ. It has the advantage of being able to operate off a thumb drive, allowing anyone to use it regardless of administrative rights. Fiji can be downloaded from the ImageJ developers’ sight,

On the Sample Data link at left, you will find links to several sample sets of scans representing various droplet spectra. If you haven’t generated your own yet, download these to work with. 
Open ImageJ. You will see the following: 

Figure 3. ImageJ Graphic User Interface (GUI).

Start by opening one picture. Instructions for opening a whole folder are shown in video tutorial on the Website. To open an image, FILE>OPEN>{IMAGEFILENAME.TIF} If you downloaded the example files, a good starter is found in the ‘40 Micron VMD’ folder. Use ‘4-2-M-T_0001’. Usually it is best to start with a blank, but for the first example it’s better to use a card with a good number of stains. The file will open in a separate window.

Next, set up the parameters that will apply to the image by going to Analyze>Set Measurements. Figure 4 below shows the resulting ‘Set Measurements’ menu. Once the boxes are checked they will remain checked through the rest of the session until they are changed by the user. Select all the boxes checked here:

Figure 4. Image file opened, Analyze>Set Measurements menu displayed.

Next, go to Analyze>Set Scale. This will tell ImageJ what a pixel value is in microns. At 4800 DPI each pixel is 5.29 microns. This could also be set as millimeters or centimeters. For this example Microns will be used. Again, once these are set they will remain through the session. If ImageJ is closed they will need to be re-set.

Figure 5. Set Scale. One pixel equals 5.29 microns for a 4800 DPI scan. 

The next step is the most interesting and important. Thresholding the picture tells ImageJ what in the image is a particle, and what to ignore. There is a more detailed video on the website explaining this. It is a good idea to experiment with this a little with each new set of scans. To Threshold, go to Image>Adjust>Threshold. Use the values shown next to the slider bars below along with the example image. Write these down for use with future images.

Figure 6: Image prior to thresholding, example threshold values shown at right.

After setting the slider bars to the values shown in the image above, click the ‘Filtered’ button and you will see the image transform in preparation for particle analysis.

Figure 7. Image after thresholding. Note intensity of droplets that were not previously visible.

Each red dot will be measured by ImageJ. In this scenario, all non-magenta colors outside the range specified in "Hue" have been excluded, eliminating most of the potential dirt, dust, and contaminants. As a side note, when you zoom in you will see a lot of random pixels and incomplete drops. These are all spray tracer. By running a Blank Calibration first, you can be confident that if a pixel has turned red in the thresholding, there was dye stain in it. Some pixels may have had a stain so faint that the scanner did not detect it; this is evident in the donut shaped stains.

Now run the Particle Analysis. Select Analyze>Particle Analysis and the Screen in Figure 8 will appear. Set the minimum size to 28 microns square. This is just over the size of 1 square pixel, so any stain of 2 pixels or more will be measured. There is more discussion on this in the website. Choose Display Results for detail on each stain, Summarize for summary statistics, and Include holes to measure the areas inside stains that might not have registered in the thresholding. Circularity of 0-1 means that no matter how misshapen a droplet, it will be counted. Once this is done, hit OK.

Figure 8. The Analyze Particles window.

About this window:

Size(micron^2): will allow you to limit stains to a certain minimum size. Since its based on area, if you want to only measure stains larger than 1 pixel, set the range to 28-Infinity. Assuming your image was 4800 DPI, 5.29 microns per pixel squared equals 27.98 square microns, therefore any stain 28 square microns or larger is at least 2 pixels. Often, as your percent area cover gets greater, you will see there is an increasing amount of what appears to be "noise" at the edges of the droplets. It's unclear whether this is reflection in the scanner due to the higher intensity of color in the target range that causes false positive color perception, or if something else is going on. There is a little bit of art in this that is explained more in the video on thresholding. 

Notes: There are some (very general non-absolute) rules of thumb for setting this range. You may find these useful later. 
  • Very low coverage (less than 2%): 0-infinity is the place to start.  
  • 2-5% coverage: Read stains greater than 1 pixel (28 microns^2) or larger. 
  • 5-15% coverage: read stains 4 pixels (111.93 microns^2) or larger. 
Circularity: Leave this at 0-1. This will count all droplet stains no matter how misshapen.

Show: Begin with the default, nothing. This command allows you to also create a graphical output for the image along with the tabular data. For beginning, leave this blank to avoid confusion. Once comfortable with the basic routine, Experiment with the different output options. An excellent technical description can be found in the Manual, section 30.2, on page 133.

Check Boxes: 
Display Results (checked): creates a table of each particle found and its properties that you have specified in the "set measurements" routine above. Each subsequent image's data will be added to this table.  

Clear results (NOT checked): will delete the data from your prior image scan. Do not check this box!

Summarize (checked): will create a separate table from the Results table  with summary data for the entire image (area covered, number of hits, etc). Each subsequent image's data will be added to this table.  

Add to Manager (unchecked)

Exclude on edges (unchecked): If checked, removes any stain touching the boundary of the image. Since the primary use of this analysis is percent area covered and hits per area, this should not be selected, as it will reduce the value of both. 

Include holes (checked): Sometimes droplets make circular stains with holes in the middle. Checking this box will fill that "donut hole" area in the droplet size and percent area covered calculations.

Record Starts (unchecked): output not used in this type of analysis.

in situ Show (unchecked): Also not used in this analysis routine.

Figure 9. Desktop showing output Results and Summary tables after analyzing 1 collector.

Results Output:

Based on the boxes clicked above, ImageJ has now produced two tables. 
  • Results will contain individual measurements for each droplet. You can see here that 6919 individual stains were found, and the measurements associated with each stain.
  • Summary will contain the number of hits, area, percent area covered, average size (in square microns) of each droplet, and Feret’s Diameters (also in microns). A Feret Diameter is the maximum distance across an irregular shaped object. MinFeret is the minimum distance across an irregular object. Other measurements are calculated but not useful for the work being done here, they can be deleted later.

In this analysis there is no attempt to reconstruct a hypothetical droplet spectrum from the stains. For small droplet sprays, especially aqueous ones, the spread factors would typically be highly dynamic due to evaporation and the subsequent change in solution concentration, as well as variable interaction with the paper sampling surface. Also, if the spray was in an air-assist condition, the droplets typically have higher kinetic energy than a droplet experiencing normal sedimentation, so the impacts tend to be more irregular.

The user can choose to save the tables as Microsoft Excel® files or leave them open for the addition of additional data and save them at a later date. The Results tables can get large fast; this table has nearly 7000 hits for a single collector.

Congratulations, you have just completed your first high resolution image analysis using ImageJ!

Continued Analysis:

To continue analyzing collectors, simply close the image file (NOT the Results or Summary windows, these can be ignored or minimized) and open the next image file (any one from the samples, you’re just practicing). The process from here is very simple to repeat. You will not need to set the Scale or the Measurements again.

After opening, Click Image> Adjust>Threshold. The same values you added last time should be there, if not, adjust them to the ones you wrote down earlier. Click ‘Filtered’ to activate the threshold, then go to Analyze>Analyze Particles.

If all the boxes are still the same, and they should be, click OK. There is now a second collector’s worth of information in the Results and Summary tables.

Continuing to analyze images should only require a minute or two of time per image.

Saving regularly is highly advisable. It is very easy to accidentally close a window and lose your data.

Good luck!