NeuronJ: Manual


NeuronJ


Quick Links


Launching the Program

NeuronJ is launched by selecting it from the Plugins menu of ImageJ. The NeuronJ toolbar (depicted below) temporarily replaces the ImageJ toolbar until the user quits the program. Only one instance of NeuronJ is allowed to run at a time. Unlike other plugins, it does not work with the currently active image. Instead, the image to be traced must be loaded through the NeuronJ toolbar, as described below. The program can handle only one image at a time.

NeuronJ: Toolbar


Description of Tool Buttons

*

Erase tracings. Opens a dialog asking for confirmation to erase all tracings. Upon pressing Yes, all tracings are erased. The parameter settings, the names of tracing types and clusters, and the type colors are retained, however.

*

Load image/tracings. Opens a dialog for selecting and loading either an image (only 8-bit gray-scale and indexed color images are accepted) or previously saved tracings (including corresponding settings). NeuronJ can handle only images that have been loaded using this dialog, not images loaded with ImageJ or images already open when NeuronJ was started. Upon pressing Open, the selected image is loaded and NeuronJ "attaches" itself to the image. Every time a new image is loaded, NeuronJ automatically closes the previous image.

Files containing tracings and settings saved by NeuronJ have the extension ".ndf", which stands for "NeuronJ data file". If you load an image, NeuronJ checks if there exists a data file for that image (must be a file in the same folder and with the same base name as the image file, but with extension ".ndf"). If so, it will load it automatically and display the tracings. Parameter settings, type and cluster names, and type colors contained in the file are also loaded and replace the current settings. It is also possible to load a data file manually, replacing the current tracings and settings.

The first time an image is loaded using the NeuronJ toolbar, the program also checks if there are other images in the same folder (only files with extension ".tif", ".tiff", ".gif", or ".jpg" are considered). If so, the next (or previous) image in the folder can be loaded by pressing the right arrow (or left arrow) key on the keyboard (if the current image is active). This facilitates tracing multiple images.

*

Save tracings. Opens a dialog for choosing a folder and file name and saving the current tracings and algorithm parameters. The file name extension for NeuronJ data files is ".ndf", which is attached to the base file name by default.

*

Export tracings. Opens the dialog below for specifying the format for exporting tracing vertex coordinates.

NeuronJ: Export

Only one option can be selected at a time. Upon pressing OK, a dialog is opened for choosing a folder and file name to export the coordinates to. In the case of exporting each tracing to a separate file, the specified file will contain an overview containing the output file name for each tracing. In principle, the file name extension for export files is ".txt", which is attached to the base file name by default. With the last option, however, each tracing is exported to a segmented line selection (polyline ROI) file, with extension ".roi", which can later (after quitting NeuronJ) be loaded into an image by ImageJ. Please bare in mind, when looking at zoomed versions of line selections, that ImageJ puts the vertices in the top-left corners of the corresponding pixels, while NeuronJ draws them in the pixel centers.

*

Add tracings. Mode for adding tracings. The first time this button is pressed, the program performs some image processing operations required for the tracing algorithm. This preprocessing may take a few seconds (depending on the size of the image and the computing power).

The actual tracing of neurites is initiated by moving the mouse to the beginning of a neurite of interest and clicking the (left) mouse button. The tracing algorithm subsequently computes and shows the "optimal" path from the current mouse position in the image to the clicked point. Move the mouse roughly along the neurite until the path suggested by the program starts to deviate too much from what is considered the correct tracing. Clicking the mouse button again causes the program to fix the displayed path and to start the computation of optimal paths from the newly clicked point. This procedure can be repeated until the end of the neurite is reached, which is indicated by double-clicking the mouse button or by pressing the Tab key or the Space bar on the keyboard (if the image window is active). In regions with very low contrast, the program may fail to find a correct path. In such cases, it is possible to temporarily switch to manual ("straight-line") tracing mode by pressing the Shift key on the keyboard (if the image window is active). Releasing the Shift key causes the program to return to semi-automatic tracing mode.

To facilitate accurate positioning of starting points, so that they are really on a neurite rather than close to one, the program carries out a local snapping operation. This means that when moving the mouse within the image, the program quickly searches in a small window around the current mouse position for the pixel that is most likely to be on a neurite. This position is indicated by the red cross-hair cursor which is behind the real, white cross-hair cursor. The size of the search window, and thus the snapping range, can be set in the Parameters dialog. Choosing a window size of 1 x 1 pixel effectively means switching off local snapping. Temporarily disabling local snapping is accomplished by pressing the Ctrl key on the keyboard (if the image window is active). Releasing the Ctrl key causes the program to enable local snapping again.

*

Delete tracings. Mode for deleting individual tracings. Move the mouse to the tracing to be removed and the program will highlight it when it comes in its vicinity. If the Attributes dialog is open, it will show the tracing's attributes. Upon clicking the (left) mouse button the program opens a dialog asking for confirmation to remove the highlighted tracing. The tracing is removed upon pressing Yes.

*

Move vertices. Mode for moving individual tracing vertices. Move the mouse along the tracing to be modified and the program will highlight the closest vertex (control point), provided the mouse pointer is sufficiently close to one. Dragging the mouse will then move that vertex until the (left) mouse button is released. This mode enables to correct tracings afterwards, which is most accurately done by zooming in first.

*

Measure tracings. Opens the dialog below for performing measurements.

NeuronJ: Measurements

Three types of measurements can be performed: group, tracing, and vertex measurements (see the corresponding options below). The three types of measurement results are displayed in separate windows.

A brief description of the options:

  • Tracing type: The measurements can be performed on All tracings, or they can be restricted to a certain type of tracing, including the Default type, or any of the 10 specified types.

  • Cluster: The measurements on the specified tracing type (see previous option) can be performed on All clusters, or they can be restricted to a certain cluster, including the Default cluster, or any of the 10 specified clusters.

  • Display group measurements: Option to enable or disable measurements on the specified group (type and cluster) of tracings. If selected, the program subsequently lists the image base name, the cluster name, the tracing type, and the tracing count (number of tracings), along with basic statistics of the tracings, including the sum (total length), the mean, the standard deviation, and the minimum and maximum tracing length, as well as the mean, standard deviation, and minimum and maximum of the image values found along the tracings in the group.

  • Display tracing measurements: Option to enable or disable tracing measurements. If selected, the program lists for each tracing the image base name, the cluster name, the tracing type and label, and the length, as well as the mean, standard deviation, minimum and maximum of the image values found along each tracing.

  • Display vertex measurements: Option to enable or disable vertex measurements. If selected, the program lists for each vertex the image base name, the tracing and segment number, the x- and y-coordinate, and the image value at the vertex coordinates.

  • Calibrate measurements: Option to enable or disable pixel and value calibration when performing measurements. If selected, the pixel width and height and the unit of length used by the program in all measurements are those specified under ImageJ > Image > Properties. For value measurements, in the case of 8-bit gray-scale images, the program uses the calibration function as specified under ImageJ > Analyze > Calibrate. In the case of 8-bit indexed color images, RGB-values in the lookup table are converted to intensities by using the formula I = 0.3R + 0.6G + 0.1B, and then the calibration function is applied. If this option is deselected, the program uses non-calibrated image values, unit pixel width and height, and a unit of length equal to "pixel".

  • Interpolate value measurements: Option to enable or disable interpolation of image values when performing measurements. If selected, the program uses not only the image values at the vertex coordinates when computing value statistics, but also image values at points inbetween vertices. The number of additional points included per vertex interval is equal to the Tracing subsampling factor in the Parameters dialog. For every two successive vertices in a tracing, the additional points are sampled along a straight line connecting the vertices. Bilinear interpolation is used to compute the image values at these points.

  • Clear previous measurements: Option to enable or disable the clearing of previous measurements in the result windows.

  • Maximum decimal places: The maximum number of decimal places with which floating-point numbers are displayed in the measurement result windows. Numbers requiring more decimal places for exact representation are rounded to the specified number of decimal places.

*

Label tracings. Mode for setting the attributes of selected tracings. Pressing this button causes the dialog below to be opened, if it is not already open. The dialog remains opened until it is closed explicitly by pressing the dialog's Close button.

NeuronJ: Attributes

There are two ways of selecting tracings for labeling. The first is to select the desired Tracing ID from the upper choice-box. Selecting a tracing from this box causes the tracing to be highlighted in the image and the corresponding attributes to be displayed in the remaining items of the dialog. Then it is possible to change the Type, Cluster, and Label, which are stored upon pressing the OK button of the dialog.

The alternative way of selecting tracings, to be used for labeling multiple tracings in one go, is to move the mouse in the image to each tracing whose attributes are to be changed. The program will highlight the tracing when the pointer comes in its vicinity. Upon clicking the (left) mouse button the program marks the highlighted tracing for labeling (it remains highlighted). Once all relevant tracings are selected, their type, cluster, and label can be specified in the dialog, and effectuated by pressing the OK button of the dialog. The possibility to specify a cluster enables one to group tracings, which may come in handy when doing measurements.

In addition to the default type and cluster, there are 10 tracing types and 10 tracing clusters, the names of which can be changed in the dialog that is opened upon pressing the Rename button. In the left choice-box of that dialog (shown below), select the type or cluster to be renamed, specify the new name in the text field on the right, and press OK.

NeuronJ: Rename

Furthermore, each tracing type is assigned a certain color with which the corresponding tracings are drawn in the image. The color assignments can be changed in the dialog that is opened upon pressing the Recolor button. In the left choice-box of that dialog (shown below), select which type to be changed, select the new color in the right choice-box, and press OK.

NeuronJ: Recolor

*

Set parameters. Opens the dialog below for setting the program's parameters. The shown (default) values for the algorithm parameters are equal to those given in the paper describing the program.

NeuronJ: Parameters

A brief description of the parameters and options:

  • Neurite appearance: By default, the program assumes that the neurites to be traced appear as Bright structures on a dark background. It is also possible, however, to use the program for tracing Dark neurites on a bright background.

  • Hessian smoothing scale: The smoothing scale (parameter "sigma" in the paper) at which the program computes the Hessian matrix and corresponding eigenvalues and eigenvectors at each pixel in the image to assess the local presence and orientation of neurites. Changing this parameter causes the program to recompute these features.

  • Cost weight factor: The factor (parameter "gamma" in the paper) that weighs of the eigenvalue costs and the eigenvector costs in establishing links between pixels. Changing this parameter causes the program to recompute the cost values used by the path searching algorithm.

  • Snap window size: The size (in pixels) of the window used by the program for local cursor snapping.

  • Path-search window size: The size (in pixels) of the window to which path searching is restricted. This parameter enables one to limit the computation time required by the program to recompute optimal paths after each mouse click. The optimal value of this parameter depends on the computational power and/or the user's patience.

  • Tracing smoothing range: The half-length (in pixels, not counting the center pixel) of the uniform filter applied to the pixel positions in the raw tracings as computed by the path searching algorithm. The larger this parameter, the smoother the tracings, but also the more difficult it will be to accurately trace sharply bending neurites. A value of 0 effectively means that no smoothing is applied.

  • Tracing subsampling factor: The frequency at which points along smoothed tracings are sampled. A subsampling factor of 5, for example, means that only 1 out of every 5 pixels along tracings is kept.

  • Line width: The width (in pixels) of the tracings as drawn by the program.

  • Activate image window when mouse enters: Option to enable or disable automatic image window activation when the mouse pointer enters the window. The image window needs to be active in order for the key bindings to work.

  • Use image name in result window titles: Option to enable or disable the use of the image base name in the titles of the result windows (snapshot images and measurement results). If selected, the program does not use default titles for the result windows, but uses the image base name with an appropriate extension.

  • Automatically save tracings: Option to enable or disable automatic saving of tracings when closing the image. If selected, and the image is closed (either explicitly by the user or automatically by NeuronJ when loading a new image), the program automatically saves the tracings and relevant settings. Otherwise, the program will open a dialog and ask for confirmation to save the tracings.

  • Show log messages: Option to enable or disable the displaying of log messages. These messages, which give more details on the actions performed by the program, will appear in a separate log window.

The parameter settings become active immediately after pressing OK. Upon pressing the Save button, the parameter settings are remembered by ImageJ and saved to its preferences file when quitting. Each time NeuronJ is launched, the program checks whether these preferences exist, and if so, it sets the parameters accordingly.

*

Make snapshot. Opens the dialog below for making a snapshot of the image and/or tracings.

NeuronJ: Snapshot

Upon pressing OK, the program creates a new RGB-color image showing a copy of the image (if requested) with the tracings (if requested) drawn into the image. This enables one to make a "hardcopy" of the image and the tracings, which can be stored using ImageJ > File > Save As.

*

Zoom in/out. Mode for enlarging or reducing the size of the displayed image and tracings. This functionality is based on ImageJ's zooming routines, which implies, among other things, that zooming is limited to 3200%. It is also possible to zoom in or out by pressing the + (plus) or - (minus) key on the keyboard (if the image window is active).

*

Scroll canvas. Mode for scrolling the image canvas containing the image and tracings. This functionality enables one to shift the field of view for zooming levels of 200% and higher.

*

Open online manual. Opens the default internet browser showing this online manual.

*

Quit NeuronJ. Opens a dialog asking for confirmation to quit NeuronJ. Upon pressing Yes, the program offers the possibility to save the last changes pertaining to the current image (if any), after which the current image is closed, the original toolbar restored, and NeuronJ shut down.

Copyright © 1996 - 2014 Erik Meijering