The macros below are designed to automate repetitive tasks such as setting the image scale, adding scale bars, and combining multichannel images. If you would like to automate any image processing or analysis tasks please get in touch and I'll see if a custom macro can do the job for you.
Download the macros by right clicking on the download link. They are .zip files, so unzip them then load into ImageJ / Fiji by either dragging and dropping on the ImageJ window then pressing run on the macro window, or use the Plugins menu, got to Macros / Install... and install the macro. The macro can then be run from the Plugins / Macros menu.
- ICH Scale bars macro: All scopes, any magnification, files sorted into folders by magnification used
Setting the image scale (pixel size in um) is an essential first step for measurements of size and distance. This macro asks you for the microscope and magnification used for your tif or jpg images, the folder your images are in, a folder to save the new images to, and sets the scale. Then if you chose to draw a scalebar it asks for the length, width and colour of the scalebar and fontsize of the text.
Images are saved as Tiffs with the scalebar as an overlay. To adjust scalebar options in the saved images you can go to "Analyze / Tools / Set scale...".
All you need to do is make sure your files are organised in folders with each folder containing images taken at the same magnification.
NOTE: do not crop images taken with the Zeiss Axiocam cameras (scopes 2 & 5) before setting the scale. Set the scale and then crop, this way the pixel sizes will be correct for all camera resolutions.
Download ICH_Scalebars_Mag_anywhere_in_Filename_v4.ijm macro here.
- ICH Scale bars macro: All Scopes, any magnification, files sorted into folders indicating scope used, mixed magnifications
Setting the image scale (pixel size in um) is an essential first step for measurements of size and distance.This macro gets the magnification from the filename of the tif or jpg image. The magnification must be with an x or X before or after the number, ie 10x, x2.5, 4X, X63 etc. The macro asks you for the microscope used for your images, the folder your images are in, a folder to save the new images to (you can save to the same folder and it just replaces you images with new ones with the scale set), and sets the correct scale. Then if you chose to add scale bars you select the length, width and colour of the scalebar and fontsize of the text. Images are saved as Tiffs with the scalebar as an overlay.
To adjust scalebar options in the saved images you can go to "Analyze / Tools / Set scale...".
All you need to do is make sure your files are organised in folders with each folder containing images taken from the same microscope but at any magnification.
NOTE: do not crop images taken with the Zeiss Axiocam cameras (scopes 2 & 5) before setting the scale. Set the scale and then crop, this way the pixel sizes will be correct for all camera resolutions.
- Batch assemble 3 channel image
This macro reads all the files in a folder and puts the groups of 3 individual channel images into a new single multichannel image.
- Make a Montage from a 3 channel colour as Greyscale and a colour composite
This macro takes 3 (or any number) channel image and generates a montage showing each channel as greyscale and a final panel with the colour composite image.