11. Toolset Plugins¶
The following plugins add functionality to ImageJ
to allow the SMLM plugins to be run using the ImageJ
toolbar or a dedicated window panel of buttons.
The plugins are described in the following sections using the order presented on the Plugins > GDSC SMLM > Toolset
menu.
11.1. Install SMLM Toolset¶
You can install a toolset for the SMLM plugins using the ‘
GDSC SMLM > Install SMLM Toolset
‘ plugin. This will create a text file in the ImageJ/macros/toolsets
directory. The toolset can be activated using the More Tools
menu button (the last button on the ImageJ
toolbar) as shown in Figure 11.1.
The toolset defines 8 buttons for the ImageJ
menu bar that allow various plugins to be run. When the mouse is over the button the name of the plugin will be shown in the ImageJ
window. Click the button to run the plugin.
Note: The latest version of the SMLM Tools.txt
file is packaged within the SMLM Jar file. This can be manually extracted using an archiving utility. The Install SMLM Toolset
plugin simply extracts this file and writes it to the [ImageJ Path]/macros/toolsets
directory if the user has the correct access permissions.
11.2. Show SMLM Tools¶
Displays a window with buttons to run all the SMLM plugins.
The window is constructed using a configuration file. The plugins listed in the configuration file are used to build a window with buttons to allow them to run. The file is searched for in the following locations:
[ImageJ Path]/plugins/smlm.config
[SMLM Jar File]/gdsc/smlm/plugins.config
Noted that the plugins.config
file within the SMLM jar file is used by ImageJ
to build the entries for the plugins menu. To customise the ImageJ
menus the plugins.config
file can be extracted from the Jar file, modified and replaced. This will also change the SMLM Tools
window unless a separate smlm.config
file is placed in the ImageJ
plugins directory.
The plugins.config
file has entries consisting of 3 fields separated by commas. Lines starting with # are ignored. For example:
#ImageJ menu, “Plugin name”, full.java.plugin.ClassName(“arguments”)
Plugins>GDSC SMLM, "Peak Fit", gdsc.smlm.ij.plugins.PeakFit
Plugins>GDSC SMLM, "Spot Finder", gdsc.smlm.ij.plugins.PeakFit(“spot”)
Plugins>GDSC SMLM, "-"
This example shows that the Spot Finder
plugin is running the Peak Fit
plugin with an argument indicating that it should only find the spot candidates.
The SMLM Tools
window is a series of buttons arranged in columns. Each button on the window has the name of the plugin. The buttons are ordered using the order of the configuration file. Any separator entries in the file using the plugin name “-” will result in padding being applied between buttons (a separator row). Separator rows are also added for empty lines. 2 or more successive separator entries will result in a new column. Figure 11.2 shows an example of the SMLM Tools
window.
11.3. Create SMLM Tools Config¶
Create a configuration file allowing the SMLM Tools
window to be customised.
This plugin extracts the plugins.config file from the SMLM jar file and writes it to [ImageJ Path]/plugins/smlm.config
. Optionally the file can be edited before installation to customise the plugins that appear on the SMLM Tools
window (see section 11.2).
If the file cannot be written the plugin will report an error. If the file already exists the user will be
asked if they wish to overwrite the file. The option to remove the existing file is also provided. If removed, the SMLM Tools
window will revert to showing the default plugins.
If the plugin is run and the SMLM Tools
window is currently open then it will be closed and re-opened to update to the new configuration.
11.4. SMLM Macro Extensions¶
Register functions that can be used in the ImageJ
macro language.
To register the functions in an ImageJ
macro script use the following command:
run("SMLM Macro Extensions");
11.4.1. Trace Diffusion Extensions¶
Extensions for the Trace Diffusion
plugin (see 6.6).
11.4.1.1. getNumberOfSpecies¶
Get the number of fitted species from the last call to fit the jump distances.
Parameter |
Type |
Description |
---|---|---|
numberOfSpecies |
Output |
The number of species. |
Ext.getNumberOfSpecies(numberOfSpecies);
print(numberOfSpecies);
11.4.1.2. getD¶
Get the diffusion coefficient for the requested species from the last call to fit the jump distances.
Parameter |
Type |
Description |
---|---|---|
index |
Input |
The index of the species. |
diffusionCoefficient |
Output |
The diffusion coefficient. |
Ext.getD(0, diffusionCoefficient);
print(diffusionCoefficient);
11.4.1.3. getF¶
Get the population fraction for the requested species from the last call to fit the jump distances.
Parameter |
Type |
Description |
---|---|---|
index |
Input |
The index of the species. |
populationFraction |
Output |
The population fraction. |
Ext.getF(0, populationFraction);
print(populationFraction);
11.4.1.4. getSpecies¶
Get the diffusion coefficient and population fraction for the requested species from the last call to fit the jump distances.
Parameter |
Type |
Description |
---|---|---|
index |
Input |
The index of the species. |
diffusionCoefficient |
Output |
The diffusion coefficient. |
populationFraction |
Output |
The population fraction. |
Ext.getSpecies(0, diffusionCoefficient, populationFraction);
print(diffusionCoefficient);
print(populationFraction);