-
Notifications
You must be signed in to change notification settings - Fork 2
Figure Maker
There are macros to help you to make figures with montages - made the way we like them! There are other plugins for making figures in ImageJ but none did what we wanted, so we made our own.
There is a video explaining how to use the Figure Maker here.
Load in your multichannel image, adjust how you want and then crop to a square. To do this select Click Square ROI from the >> on the toolbar.
This tool gives 400 x 400 pixel square ROI, right click to get a different size. Select the area you want.
Crop your images and save them as TIFFs.
To make a nicely spaced montage (row of images). Select LabCode > Figure Maker > Make Montage
You are asked to pick your cropped TIFF.
You can specify the number of grayscale (channel) panels and choose the number of merges.
In the next dialog you can pick which panels go where in your montage and how to merge channels using which colours.
You can also specify a vertical (column) montage rather than horizontal (row).
Grout and scale bars can be added flexibly, no border is added. This is different to ImageJ's Make Montage and makes figure rows the way we like them!
Your montage is saved in the same directory as the original image. The macro leaves it displayed, so that you can admire your awesome data!
If you want to make many montages, then select LabCode > Figure Maker > Make Montage Directory. This macro allows the user to make montages from all TIFFs in a directory. A dialog is shown at the start that allows the user to select which channels go where and then the montages are made in batch mode.
It is now possible to make a montage of movies or stacks. Select LabCode > Figure Maker > Make Montage and point the dialog at the file you'd like to montage.
If the image is a movie, or a z-stack (but not both) comprising more than one channel, then you will be able to generate a movie/stack montage.
Sometimes, we like to add a ROI and a zoomed version of this ROI to various panels in the montage. To do this open your montage and select LabCode > Figure Maker > ROI Zoom
You can pick which corner you want the zoom and which panels you'd like to add an ROI and zoom.
After clicking OK, you are asked to select the centre of the ROI.
You are first shown a box where the ROI will be. It's possible to move its position if it's not quite right. Once you click OK, the resulting image is saved in the same directory as the montage.
Note that this code will run on stacks as well so that you can add ROIs and zooms to movies!
It only works on square images and montages made from squares. If your zooms are in the wrong place, check the size(s) of your input images.
When the ROI-Zoom version is made, a text file is saved in the same directory as the resulting image. It contains useful information that you can use to recreate the image if you need to. To recreate an ROI-Zoom version, open the montage and select ROI Zoom Auto. Here you will be asked for the usual details as well as the coordinates that were saved in the text file.
Alternatively, you might prefer to highlight the ROI but not insert the zoomed ROI. In this case, Make ROI Zoom External will allow you to save the zoomed ROI as a separate panel. If you'd like to place the zoomed ROI as a further panel, select 0 to zoom the ROI so that it is the same size as a regular panel; otherwise, pick the magnification you'd prefer. The separate ROI zoom image can be used in cases where you need to show the zoom alongside the montage rather than as an inset.
The grayscale panels might look better inverted so that they are black-on-white, rather than white-on black. This can be helpful for dim or small features. To do this, open the montage that you would like to invert and select Invert Montage. This will launch a dialog to help you to choose which panels you'd like to invert and whether you would like to outline the panels with a black border. It's best to do this after you have made the ROI zooms if you want to. There's also an "auto" mode, that will invert all panels except the right/bottom panel (contains the merge) to speed things up.
If you'd like to switch an RGB merge panel for the a different colour scheme, open the montages you'd like to change and select Change Montage Merge. There are some options to switch RGB to OFP (Orange-Fresh-Purple) or to MGB (Magenta-Green-Blue). It is possible to specify any combination of RGB, CMY, W(hite) or OFP. Just select the "Whatever" option and type in your desired combination to map RGB to. This will work on all open images so it is very simple to transform a whole bunch of montages in the same way. It does not work on compiled montages. Note: to run this, you must have NeuroCytoLUTs Update Site installed.
Finally, if we have more than one montage, we need to compile them together. Load in all the montages you'd like to compile. Now select LabCode > Figure Maker > Montage Compiler
The dialog asks you to select which montage you'd like where.
The routine is intelligent enough to recognise vertical and horizontal montages and to compile them left-to-right or top-to-bottom as appropriate.
Again, a text file is saved with the resulting compilation image so that you know which images went where.
Your compilation will save back in the same directory as the montages. Note that you can use this macro to make one compilation and then use it again to add more montages (extra rows) or other compilations. Very large compilations can be built this way.
Note that results from Figure Maker are saved as a flat 300 ppi RGB TIFF ready for use in Illustrator or equivalent software.
Important note about scale bars. The code suggests a pixel size for use in the scale bar. If the scaling of your images is incorrect, then the scale bar will be the wrong size. If the dialog box says 0.069, double-check your original image for scaling information, 0.069 is the "pixel size" for a 300 ppi image, i.e. the scaling no longer relates to the original image. If you add the scale bar at the stage of montage compilation, the scaling will probably be lost.
The bottom line is: make sure you know the pixel size of your images before adding any scale bars.
For multichannel microscopy images, e.g. from an immunofluorescence experiment, quantixed follows these rules for best practice.
- Individual channels as grayscale - reason: the eye does not detect black-to-red in the same way as black-to-green or black-to-blue
- In a row montage the merge is on the right. In a column montage it is at the bottom
- Square images, square ROIs and square zooms
- No border
- Scale bar in the bottom right corner (added to the compiled montage not to each row/column)
- Fixed grout of 8 pixels (suggested)
- Scale bar of 10 µm, height of 2 x grout (suggested)
- Grouting between conditions is 2 x grout between channels (suggested)
- Labelling is done in Illustrator or some other software to assemble the final figure, not in ImageJ
The basic workflow is to go:
IMAGE(S)
|
| (Montage Maker or Montage Maker Directory)
v
MONTAGE(S) <--> ROI zooms, invert, change colours
|
| (Montage Compiler)
v
COMPILED MONTAGE
Images can be XYC, XYCT or XYCZ. The Montage is saved as RGB and will be XY, XYT or XYZ, respectively. Higher dimensions, i.e. XYCTZ, are not allowed as input.
Input can be 8-bit or 16-bit stacks/composites, or a single RGB image.
Montages can be modified in the following ways:
- ROI zoom or ROI zoom external - can be 1 or more times
- Inverted
- Change colors
These steps can be run iteratively, e.g. ROI zooms twice, then invert, then change colors. Montages and modified montages can be compiled together as long as the dimensions are compatible.
ROI Zoom macros require one open image, Compile Montage requires two or more images open to work with. The other Figure Maker macros typically do not allow open images, and you need to find the source image upon running.
It is currently not possible to run Montage Maker Directory with movies (they must be made sequentially with Montage Maker). It is also not currently possible to compile Montages that are movies.
The grout looks really tiny and the scale bar is very thin
The suggested grout sizes work well for 400x400 images. If you have 1000x1000 images the suggested grouts will look thin when imported into a figure, adjust accordingly. As a guide, a 600x600 image that has two panels and one merge with a grout of 8 pixels will be 1816 pixels wide. At 300 dpi this is a final size of 155 mm. A full size figure is usually 170 mm, so the figure will be ~91% of the full width of the figure. If you shrink it to half size, now the grout will be 4 pixels or 0.34 mm which will look quite thin. A rule of thumb is grout should be 1/50th of the image width, but ultimately, test it out!
There is a tool called Montage Sizing Helper in the Figure Utils menu to help you.
Developed for use in the Royle lab