SWC2IMG: Manual

Quick Links
Dialog Description
Implementation Details
Download Page
Release Notes
Acknowledgments
Terms and Conditions
Plugin Execution
SWC2IMG is launched by selecting it from the Plugins > ImageScience menu of ImageJ. This will open the SWC2IMG dialog shown below. A description of each of the dialog items is given in the next section.
Dialog Description
SWC — Specification of the SWC file.
Voxel units for coordinates and radii in file
By default, coordinates and radii in the SWC file are assumed to be given in micrometers. If this option is selected, they are instead assumed to be in voxel units. Either way, the coordinates read from the SWC file are uniformly shifted to ensure the entire neuron fits nicely within the output image space (which includes a fixed border). This causes the coordinates in the SWC file to no longer correspond directly with the image coordinates. The plugin can produce a corrected SWC file with the node coordinates corresponding exactly with the generated image (see option below).
File path
The full path to the SWC file should be specified in this text field. To find the file on the system, click the Browse button, which opens a file dialog that allows to navigate to and select the right file.
IMAGE — Specification of the image properties.
Lateral voxel size
The voxel size in the lateral (x and y) dimensions in micrometers.
Axial voxel size
The voxel size in the axial (z) dimension in micrometers.
Both voxel size parameters are technically allowed to be as small as 0.001 micrometer (1 nanometer) and as large as 1000 micrometer (1 millimeter). In practice, this range is more than sufficient, as typical fluorescence microscopes do not produce images with voxel sizes anywhere near these extremes, but more in the range of several tens of nanometers to several micrometers. For imaging of neurons, 1 micrometer is a good default value. But be careful in choosing the voxel size, as too small values may cause excessive computation times, and too large values may cause loss of details.
Background
The background intensity level of the output image. The default value of 10 represents practical levels and causes the background of the output image to contain some noise, depending on the SNR (see below). Setting this parameter to 0 causes the background to have no noise. Notice that if the output image is rescaled to 8-bit (see option below), the resulting background level may be different than the value specified here.
Correlation
The level of noise correlation. This is the standard deviation, in micrometer, of the Gaussian filter applied after image synthesis. Gaussian filtering causes the noise to become correlated, resulting in random structures larger than a single voxel. In other words, the noise at individual voxels is no longer completely independent. This can be used for example to simulate imperfect fluorescent labeling. The default value of 1 micrometer (the same as the default voxel size) results in a noise speckle pattern resembling practical imaging artifacts. Setting this parameter to 0 means no noise correlation is applied.
SNR
The signal-to-noise ratio of the output image. Since, in the limit, noise in fluorescence microscopy images is Poisson distributed, the SNR is properly defined as the difference between the mean intensity inside the neuron minus the background level (specified above), divided by the square root of the former (not of the background). The plugin automatically calculates the correct neuron intensity based on the specified SNR, background, and correlation level.
OUTPUT — Specification of the plugin output.
Rescale to 8-bit image
By default, the output is a 32-bit type image. This is because the output values may be larger than 255, depending on the chosen image properties. If this option is selected, the voxel values are linearly rescaled to the range [0,255], and the output image type is converted to 8-bit. Rescaling may cause the final background level to differ from the specified value.
Display generated image
If this option is selected (default setting), the plugin displays the generated image. The brightness and contrast of the image are automatically adjusted to the range of intensity values. This means that changing the background level (see above) may have no visual effect, even though the actual background intensity values are different.
Save generated image
If this option is selected, the plugin automatically saves the generated image in tagged image file format (TIFF). The destination folder to which the image is saved, is the same folder from which the SWC file was loaded. The image file name is the base name of the SWC file, with extension .swc2img.tif added.
Correct SWC file
If this option is selected, the plugin automatically saves a corrected SWC file. To make the generated image as small as possible, and to deal with possible negative coordinates, the nodes read from the original SWC file are uniformly shifted so that the entire neuron fits nicely within the output image space and is as close as possible to the origin (save for a fixed border). This causes the coordinates in the original SWC file to no longer correspond directly with the image coordinates. The corrected SWC file contains the same information as the original SWC file, but with the node coordinates shifted to correspond exactly with the generated image. The destination folder to which the corrected file is saved, is the same folder from which the original SWC file was loaded. The file name is the base name of the original SWC file, with extension .swc2img.swc added.
Log messages
If this option is selected, the plugin produces various log messages in a separate text window during execution, giving more information about the different steps being performed.
Implementation Details
It is assumed that the spatial extent of a neuron is typically such that, in reality, the chosen optical magnification factor and digital image matrix size of the microscope make the physical voxel size to be larger (around the default 1 micrometer) than the diffraction limit (around 250 nanometer). In this sampling regime, the partial-volume effect of digitization is more prominent than the optical blurring caused by the point spread function (PSF) of the microscope.
Based on this assumption, the plugin simulates the imaging process simply by estimating for each voxel which fraction of its volume is occupied by the neuron. Although the plugin does allow choosing a voxel size smaller than the diffraction limit, it does not automatically account for the PSF-blurring that would then become more prominent in real microscope images. In other words, the plugin is less realistic for such sampling regimes. However, since the PSF can be approximated fairly accurately by a Gaussian, its blurring effect can still be simulated to some extent by choosing the right correlation level.