diff --git a/_pages/plugins/frangi.md b/_pages/plugins/frangi.md index 6d35cfadae..2e9eb077c3 100644 --- a/_pages/plugins/frangi.md +++ b/_pages/plugins/frangi.md @@ -1,18 +1,26 @@ --- -mediawiki: Frangi title: Frangi -project: /software/fiji -artifact: sc.fiji:Feature_Detection +project: /software/imagej2 +artifact: net.imagej:imagej-ops +icon: /media/icons/imagej2.png doi: 10.1007/BFb0056195 categories: [Uncategorized] --- -{% include notice icon="warning" content="This is an experimental plugin, and I have doubts about its correctness—in particular, the results are strange when the ratio of pixelWidth : pixelHeight : pixelDepth is other than 1:1:1. In addition, the results in any case seem to be different from those from other implementations, such as [this [MATLAB](/scripting/matlab) one](http://www.mathworks.co.uk/matlabcentral/fileexchange/24409-hessian-based-frangi-vesselness-filter). I don't have time to work on this any more (and no longer work in academia at all) so if someone were interested in taking it over, that would be brilliant." %} This plugin implements the algorithm for detection of vessel- or tube-like structures in 2D and 3D images described Frangi et al 1998.[^1] +_Frangi vesselness_ is an algorithm for detection of tube-like structures (such as in imagery of filamentous structures (blood vessels, neurites, etc.). It applies to both 2D and 3D images and was first described by Frangi et al 1998.[^1] ([PDF](https://link.springer.com/content/pdf/10.1007%252FBFb0056195.pdf)). In many cases, this method is known to be a better alternative to single-scale [Tubeness](/plugins/tubeness) filtering (at least for isotropic images), but it is slower. There are two ImageJ implementations of the algorithm: -In my experience, this method produces consistently better results than the [Tubeness](/plugins/tubeness) plugin for isotropic image data, although it is significantly slower. +- A legacy plugin (In Fiji registered under {% include bc path='Plugins|Process|Frangi Vesselness' %} ([source code](https://github.com/fiji/Feature_Detection)). This is a deprecated implementaton with expected inaccuracies. + +- An [ImageJ Op](/libs/imagej-ops/index) (In Fiji registed under {% include bc path='Plugins|Process|Frangi Vesselness' %}). This version superseeds previous implementations and has been validated/benchmarked againgst other implementations (namely ITK and MATLAB) ([details](https://forum.image.sc/t/frangi-vesselness-filter-feedback/6747)). It requires 3 inputs: + + 1. Scale(s): Radii of the structures to be filtered + 2. Spacing: the physical spacing between image data points (i.e., the pixel/voxel dimensions) + 3. Whether or not a gaussian filter should be applied at each scale before the filter runs + +SNT's uses this filter internally. Its [Secondary Layer Wizard](/plugins/snt/manual#tracing-on-secondary-image) provides a convenient way to preview the effect of scale size in the result. + +{% include img align="center" width="600px" src="/media/plugins/frangi-before-and-after.png" caption="Frangi Vesselness: Left: Original image. Right: Filtered image." %} -These screenshots show the results on an example file: -![](/media/plugins/frangi-before-and-after.png) {% include citation fn=1 %} diff --git a/_pages/plugins/simple-neurite-tracer/3d-interaction.md b/_pages/plugins/simple-neurite-tracer/3d-interaction.md deleted file mode 100644 index cfb5191b3d..0000000000 --- a/_pages/plugins/simple-neurite-tracer/3d-interaction.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_3D_Interaction -title: Simple Neurite Tracer › 3D Interaction -nav-links: true -nav-title: 3D Interaction ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -It is now possible to select the points for traces in the [3D Viewer](/plugins/3d-viewer) rather than the 2D view. - -{% include video platform='youtube' id='Vt4m55V7AjI'%} - -In order to select points for tracing in the 3D Viewer, you need to use the "Wand" tool. In order to rotate the view, you need to use the "Hand" tool. Once you have selected each of these once, you should be able to switch between them by pressing the {% include key key='Esc' %} key. - -![](/media/fiji-toolbar-wand-and-hand.png) - -The following key shortcuts also work in the 3D Viewer: - -- {% include key key='Y' %} confirm the temporary path segment -- {% include key key='N' %} cancel the temporary path segment -- {% include key key='F' %} complete the current path -- {% include key key='G' %} select the current path under the mouse pointer - -You can still create branches and joins in the 3D Viewer as you would in the 2D viewer. First select the path you want to branch off, or join to by pressing {% include key key='G' %} while the mouse pointer is over that path. (It should turn green.) Then create the join or branch by holding down the join modifier key ({% include key key='Ctrl' %} on Windows and Linux, {% include key key='Alt' %} on Mac OS) and clicking at the right point on the selected path. - -The dataset used in the screencast can be downloaded from [the Diadem challenge website](http://www.diademchallenge.org/olfactory_projection_fibers_readme.html). diff --git a/_pages/plugins/simple-neurite-tracer/basic-instructions.md b/_pages/plugins/simple-neurite-tracer/basic-instructions.md deleted file mode 100644 index e70593aae7..0000000000 --- a/_pages/plugins/simple-neurite-tracer/basic-instructions.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_Basic_Instructions -title: Simple Neurite Tracer › Basic Instructions -nav-links: true -nav-title: Basic Instructions ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -#### Starting the PlugIn - -When starting the plugin from the {% include bc path='Plugins|Segmentation|Simple Neurite Tracer'%} menu option, you should be presented with a dialog like this (outdated snapshot): ![](/media/plugins/simple-neurite-tracer/snt-initial-dialog.png) - -The three pane view gives you views of the image stack through XZ and ZY planes as well as the standard XY view. First time users may find the three pane view confusing. However, it makes it much easier to pick out points in the stack in the Z direction. - -Another option lets you choose whether you would like to see a 3D representation of your tracings. If you're unsure, leave this at the default (*Create new 3D Viewer*). Note however that, once obtained, tracings can be imported and rendered in the 3D viewer at any later time. Your next view of the image will be something like this: Snt-tracer-starting.png - -The top of the left hand dialog box should always give you an idea about the next steps in basic tracing of paths. However, the first step when you load a new image should probably be to enable the option for using Hessian-based analysis of the image - this is done via a checkbox a little further down the dialog box. It will take some time to calculate the Gaussian convolution of the image once you select this option, but this only needs to be done once per image, so it's best to do it at the start. There is more on the use of this option in the [Tips](#miscellaneous-tips) section below. - -*At this point, you may wish to switch to some shorter [step-by-step](/plugins/simple-neurite-tracer/step-by-step-instructions) instructions - some people have suggested that the description below is a bit verbose. Alternatively, carry on below...* - -Now, as the instructions suggest, your next step should be to click on the point in the image stack where you want to start the path. To navigate in the stack you would adjust the slices scroll bar or used the {% include key key='<' %} and {% include key key='>' %} keys as usual. The red cross-hairs indicate the corresponding position in the three different views of the stack, but the slice positions will not be synchronized between the three windows unless you hold down {% include key key='Shift' %} while moving the mouse or activate the *Enable cursor snapping* option (window synchronization is particularly useful if you're creating a [branching branch](#branching-and-joining-paths) at the beginning or end of a path). - -![A temporary path, yet to be confirmed.](/media/plugins/simple-neurite-tracer/snt-temporary-path.png) ![The progress of the search for a temporary path.](/media/plugins/simple-neurite-tracer/snt-searching-for-path.png) ![The confirmed part of the current path.](/media/plugins/simple-neurite-tracer/snt-confirmed-path.png) Select a point for the start of your first path. The instructions should change to prompt you to find another point further along the structure that you're tracing. It will take some trial and error to find out how far apart these points can be for each image - some will have very clearly defined neurons and so they can be very far apart, but with more difficult images (or ones where the path found is not the one you intend) you will need to make them closer together. - -Once you select that next point in the path you will either find that the path is found immediately, in which case the projected path is visible as a dark blue line, or the search may take longer, in which case the progress of the search is shown in light blue. - -While the plugin is searching you can still move about in the image stack to see the progress through the depth of the stack as well. If it seems to be taking a very long time to find a path between the points you should probably cancel the search (by pressing {% include key key='Esc' %}) and try a point that's nearer, since the path searching slows down as it has explored more of the image. - -Once you have a dark blue temporary path like that in the left hand image the instructions will prompt you to either keep that path segment (by pressing {% include key key='Y' %}) or cancel it ({% include key key='N' %}) to try picking another point (probably one nearer to the original point). If you confirm that path then the path will turn red, to indicate that this is a confirmed part of the current path. If you click further along the structure again then the dark blue colour will again show the temporary part of a path as opposed to the red confirmed part. - -Once you have picked out a few more points along the path, you can complete the path by clicking "Complete Path" {% include key key='F' %} at the top of the dialog. By default - Paths can be colorized at any later point using the drop-down menu in the *Paths* window - completed paths are shown in magenta and appear in the path list in the tracer's dialog box. If you select one or many paths in this list, the selected paths are shown in green instead. (You need to have particular paths selected for filling out neurons or branching and joining paths.) ![Several completed paths, with one selected (in green)](/media/plugins/simple-neurite-tracer/snt-multiple-paths.png) - -You've probably noticed that the default presentation of the paths in an image is to show the a projection of the path through the entire stack, rather than just those points of the path that are in the current slice. This can become confusing with many paths in a single image, in which case you should change the *View Paths 2D* option from *Projected through all slices* to *Parts in nearby slices* (shortcut: {% include key key='5' %}). - -#### Branching and Joining Paths - -In this plugin each path can only be a linear succession of points in the image. However, you can indicate more complex structures by creating a path that starts on another path (branches off it) or ends on another path (joins the other path). To do this you have to select the existing path you want to branch off or join to in the path list (check that the right path is green in the image) and then hold down {% include key key='Ctrl' %} (on Windows or Linux) or {% include key key='option' style='mac' %} (on MacOS) while you select the branch or join point. You almost always will want to hold down {% include key key='Shift' %} as well as {% include key key='Ctrl' %} / {% include key key='Alt' %} while you're finding this image so that the crosshairs show you the exact point that you're joining to. The detailed procedure is described [here](Simple_Neurite_Tracer__Step-By-Step_Instructions#branching-start-a-path-on-an-existing-path). - -#### Saving and Loading Files - -You can load and save traces files with the corresponding buttons at the bottom of the tracer's dialog box. I suggest that you save your files with the original filename with the extension changed to ".traces", so "test.tif" would have a traces file "test.traces". This is because the "Load Traces File" option will look for a file with that name and offer to load it for you. - -#### Filling Out Neurons - -There is a simple facility in this plugin for "filling out" paths to volumes. This is not particularly sophisticated, but often good enough for a rough visualization of the shape of a neuron beyond what can be seen from the traced path. - -First, select the one or more paths that you want to fill out from in the path list and select "Fill Out Path(s)" in the interface. The selected paths are shown in green so that you can check that you're starting from the right ones. After a couple of seconds if you scroll through the stack you should be able to see a thick green suround to the path: - -![A few seconds after selecting "Fill Out Path(s)" with 3 branched paths selected](/media/plugins/snt/snt-initial-filling.png) - -The filler continues to explore the image starting from the path until you click "Pause" in the dialog. However, the fill which is shown only includes those points up to a certain threshold distance from the path. (Note that in this section "distance" doesn't mean a real physical distance, but a measure which takes into account the intensity values of the pixels which must be passed through when moving away from the path.) Information about the current threshold and the progress of the search is shown in the dialog. ![The filling-related part of the dialog (outdated screenshot).](/media/snt-filling-statistics.png) - -The top line ("Not reached by search yet") is updated as you move your mouse over the image. If the point under the mouse has been reached by the search then it will show you that point's distance from the path. In the line below, the input box shows your current threshold distance: so if this is set to 0.2 then that means that all points less than 0.2 from the path are included in the fill (and shown in green in the image.) The number in parentheses at the right of this line show the maximum distance from the path that has been completely explored. - -You can change the fill threshold in one of three ways: - -- Clicking on a point in the image that has been reached by the search (This is the most intuitive way of altering the threshold). -- Changing the threshold in the input box manually and clicking the "Set" button below it. -- Clicking the "Set Max" button below the threshold input box, which sets the threshold to the maximum explored distance (the value shown in parentheses). - -Anyway, assuming that you want to use the first of these approaches, you should use the approach described below. It is difficult to set the threshold accurately from the image unless you zoom in, so first zoom on part of the path that you want to set the threshold for: ![After having zoomed in on part of the fill](/media/snt-zoomed-filling.png) - -{% include clear%} - - -Since the the solid green fill obscures the intensity value of the points in the fill, I suggest that you switch to the semi-transparent view of the fill at this stage by selecting the "Transparent fill display" option in the dialog. This should show you something like this: - -![Having made the fill transparent](/media/snt-transparent-filling.png) - -{% include clear%} - - -As you can see in this image, the threshold is set too far from the path, since there are many completely dark points under the green fill. Experiment with clicking on different points closer to the path in order to adjust the threshold until you are happy with it. You might end up with something like this: - -![Having refined the fill by clicking closer to the path](/media/snt-refined-filling.png) - -{% include clear%} - - -If you are happy with this, then you might as well click "Pause" so that your computer isn't spending all its CPU on continuing to explore the image. Then you can either save the fill (which will add it to the fill list) by clicking "Save Fill", discard the fill by clicking "Cancel Fill" or use the "Create Image Stack from Fill" button to view the same image stack, but with only the points in that fill preserved. One reason why you might want to do this is that you can then smooth that image and use the [3D Viewer](/plugins/3d-viewer) to do a surface rendering of the neuron. Perhaps then you could overlay that onto a volume rendering of the complete image (see available [tutorials](/plugins/snt#tutorials)). Or, you could save those fill stacks for each of the neurons you fill and then combine them in ImageJ using "RGB Merge". - -The image stack you would get from the image used in this example might look something like this: ![Having selected the "Create Image from Fill" option](/media/plugins/snt/snt-filling-viewed.png) - -{% include clear%} - - -#### Using an AmiraMesh Labels File - -If you have a labels file for your image, you can load that file to help you make sure that your tracings are going between the regions of the image that you think they are. (e.g. it's possible when a neuron enters a region of dense expression to stop the path short of the regions which is actually labelled as a particular neuropil region.) Load the label file by clicking the "Load Labels" button. If you have a label file loaded then the current material under the crosshairs will be shown in the ImageJ status bar. - -#### Key Shortcuts - -Key Shortcuts and keyboard accelerators are described in [Key Shortcuts](/plugins/snt/key-shortcuts). - -#### Miscellaneous Tips - -- The simplest way to follow a path through a stack is to select that path and hold down {% include key key='Ctrl' %} / {% include key key='Alt' %} and {% include key key='Shift' %} while moving the mouse along it. -- If the search doesn't seem to be finding the route you expect through an image stack, try toggling the "Hessian analysis" option. Another alternative is that the start point of the search is in the wrong place (e.g. if you accidentally clicked in the image when you didn't want to start a new path - you should be able to tell this from the progress of the search, which starts at both the start and end point). diff --git a/_pages/plugins/simple-neurite-tracer/export-to-swc-tutorial.md b/_pages/plugins/simple-neurite-tracer/export-to-swc-tutorial.md deleted file mode 100644 index 385292b72f..0000000000 --- a/_pages/plugins/simple-neurite-tracer/export-to-swc-tutorial.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_"Export_to_SWC"_Tutorial -title: Simple Neurite Tracer › "Export to SWC" Tutorial -nav-links: true -nav-title: Exporting to SWC ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -This short tutorial shows you how to export a connected set of paths in the [Simple Neurite Tracer](/plugins/snt) plugin to an SWC file. This may be useful for analyzing a structure in other tools (e.g. [L-measure](http://cng.gmu.edu:8080/Lm/)) or uploading to a database like [NeuroMorpho.org](http://neuromorpho.org/). (n.b. for use in L-measure you will have to set the SWC type for each path - see [\#Setting\_the\_SWC\_point\_types](#setting-the-swc-point-types)) - -## Export all connected path sets as SWC files - -To export each connected set of paths as a separate SWC file, you can now select the "Export all as SWC..." menu option - you will be prompted for the prefix of the file names: - -{% include img align="center" src="save-all-as-swc" %} - -## Export a single connected path set as an SWC file - -Often, you will just want to export one set of connected paths. As an example of this, suppose we have a partially traced image like this: - -{% include img align="center" src="export-to-swc-tutorial-1" width="750" %} - -Those are actually three disconnected groups of paths, as you can see from the path list: - -{% include img align="center" src="export-to-swc-tutorial-2" %} - -In other words, there is one large group of neurons which are all connected, with "Path (0)" as the primary path, there is a single disconnected path ("Path (15)" and group of 6 paths with "Path (16)" as the primary path. - -(Paths are connected when you start one path on another one (branching) or end one path on another one (joining). To find out how to do that, see the [Simple Neurite Tracer: Step-By-Step Instructions](/plugins/simple-neurite-tracer/step-by-step-instructions).) - -The SWC file format describes a single neuron's morphology (so every point is connected to another one), whereas a .traces file in Simple Neurite Tracer can describe multiple disconnected structures. This means that in this plugin you can only export a complete connected set of paths to SWC. So, in this example, you could only export three different SWC files, since there are three connected groups of paths. To do that, select all of the paths in that structure (using {% include key key='Shift' %} or {% include key key='Control' %} when selecting items in the list) - that should look like this: - -{% include img align="center" src="export-to-swc-tutorial-3" %} - -... and then click the "Export to SWC" button in the bottom right of that window. If you haven't selected a completely connected set of paths, then you will get an error at this point - otherwise you will be prompted to save the SWC file. - -### Setting the SWC point types - -There is now support in Simple Neurite Tracer for setting the type of SWC points contained in each path. You can do this by selecting a set of paths and then choosing a value from the SWC Type context menu: - -{% include img align="center" src="snt-set-to-soma" %} - -You can set each path to a different type in this way, e.g.: - -{% include img align="center" src="snt-after-setting-swc-types" %} - -Note: setting an SWC type for every point is **required** by some software, such as L-measure. - -### Further Notes - -- You should only export your tracings to SWC for analysis in other tools, or or for uploading to databases that require that format. The SWC format is very simple and you lose a lot of information if you don't save your tracings in the plugin's native format. - - - -- The root node in an exported SWC file will be the first point in the primary path of the group in Simple Neurite Tracer. So, if you care about this, then before saving you should pick the path in the group which starts with what you consider to be the root node, and click "Make Primary" in the Path Window before exporting. - - diff --git a/_pages/plugins/simple-neurite-tracer/index.md b/_pages/plugins/simple-neurite-tracer/index.md deleted file mode 100644 index 7644e06d9f..0000000000 --- a/_pages/plugins/simple-neurite-tracer/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Simple Neurite Tracer -nav-links: true -nav-title: Index -categories: [Uncategorized] -doi: 10.1093/bioinformatics/btr390 ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -The Simple Neurite Tracer plugin was designed to allow easy semi-automatic -tracing of neurons or other tube-like structures (e.g. blood vessels) through -3D image stacks. It has been replaced by the much more sophisticated -[SNT](/plugins/snt) plugin. diff --git a/_pages/plugins/simple-neurite-tracer/preprocessing-data-for-better-results.md b/_pages/plugins/simple-neurite-tracer/preprocessing-data-for-better-results.md deleted file mode 100644 index db7f350b2f..0000000000 --- a/_pages/plugins/simple-neurite-tracer/preprocessing-data-for-better-results.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_Preprocessing_Data_for_Better_Results -title: Simple Neurite Tracer › Preprocessing Data for Better Results -nav-links: true -nav-title: Preprocessing Data ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -Simple Neurite Tracer's "Hessian-based analysis" option for filtering for tube-like structures is an quick way of improving the efficiency and accuracy of path-finding. However, for best results, I would recommend using a slower but more accurate method to preprocess the data. - -## Using Pre-Processed Data - -If the file you are tracing was originally called "example.tif" or "example.lsm", then the plugin will check for the existence of a file in the same directory called "example.tubes.tif". If such a file exists, the plugin will offer to load it for you: - -![](/media/plugins/simple-neurite-tracer/snt-confirm-tubes-tif.png) - -The "\*.tubes.tif" file must be a 32-bit float image. Then, if you select the "Use preprocessed image" option: - -![](/media/plugins/simple-neurite-tracer/snt-use-preprocessed-image.png) - -... then tracing will take place on the preprocessed image rather than the raw image data or the "Hessian-based analysis" filtered values. - -## An Example Using Frangi et al.'s method - -### A single image - -To process a single image, load your image ("test.lsm", say) into Fiji and select {% include bc path='Plugins | Process | Frangi Vesselness'%}. (There is more information about this plugin [on its page](/plugins/frangi).) By way of example, let's say that you select 4 scales from half the x voxel separation to twice that value. - -Then save that file in the same directory as "test.tubes.tif". - -When you start up Simple Neurite Tracer with "test.lsm" as the current image, it will offer to load the preprocessed image you have just generated. - -### Preprocess Multiple Images - -The easiest way to preprocess multiple images is to record a macro for processing a single images, and then wrap it it in a loop to iterate over all the files in a directory. For example: - -```javascript -d = getDirectory("Select a directory"); -files = getFileList(d); - -extension = ".tif"; - -for( i = 0; i < files.length; ++i ) { - filename = files[i]; - if( endsWith(filename,extension) ) { - l = lengthOf(filename); - el = lengthOf(extension); - basename = substring(filename,0,l-el); - expected_window_name = "vesselness of "+filename; - output_filename = d + File.separator + basename + ".tubes.tif"; - open(filename); - run("Frangi Vesselness (imglib, experimental)", "number=1 minimum=0.288387 maximum=0.288387"); - selectWindow(expected_window_name); - saveAs("Tiff", output_filename); - } -} -``` diff --git a/_pages/plugins/simple-neurite-tracer/screencasts.md b/_pages/plugins/simple-neurite-tracer/screencasts.md deleted file mode 100644 index f8dc797c16..0000000000 --- a/_pages/plugins/simple-neurite-tracer/screencasts.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -mediawiki: -- Simple_Neurite_Tracer:_Introductory_Screencast -- Simple_Neurite_Tracer:_Old_Screencast1 -- Simple_Neurite_Tracer:_Old_Screencast2 -- Simple_Neurite_Tracer:_Old_Screencasts -title: Simple Neurite Tracer › Screencasts -nav-links: true -nav-title: Screencasts ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -This screencast (which needs audio) explains basic use of the plugin. It -probably won't be clear what's going on unless you make it full-screen: - -{% include video platform="youtube" id="y6ZPdDfUOjI" width=420 %} - -## Older screencasts - -These screencasts are from very early versions of the plugin, but may still be of some use since all the functionality is still present. - -This first screencast shows the basic operation of the plugin on a fairly indistinct confocal scan. After about a minute I turn on the option to use a Hessian-based cost function for the search, based on code written by Stephan Preibisch at the Janelia Farm Hackathon. You may notice that the searches after that point follows the neurons more closely. However, in some cases that finds erroneous paths or the naive cost function performs better, so in practice one switches back and forth. \[Note that this demo was recorded from an earlier version that didn't have support for branching.\] - -{% include video platform='youtube' id='SSXx3DLCJD8'%} - -This next video demonstrates more of the functionality that I added at Janelia Farm, in particular the fitting of centre lines and the filling-out of neurons. I use Benjamin Schmid's [3D Viewer](/plugins/3d-viewer) in this demo for visualizing the results, and as an example export the mesh and load it into Blender at the end - thanks to Albert Cardona for his advice on all matters Blender. - -{% include video platform='youtube' id='sjSsNsr_2YM'%} diff --git a/_pages/plugins/simple-neurite-tracer/selecting-paths.md b/_pages/plugins/simple-neurite-tracer/selecting-paths.md deleted file mode 100644 index 84c38d66cf..0000000000 --- a/_pages/plugins/simple-neurite-tracer/selecting-paths.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_Selecting_paths -title: Simple Neurite Tracer › Selecting paths -nav-links: true -nav-title: Selecting Paths ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -There are three ways of selecting a particular path in [Simple Neurite Tracer](/plugins/snt). - -### In the Path Window - -You can select a path in the Path Window. You can also use the up and down cursor keys to go through the list quickly, and see which paths turn green in the 2D and 3D tracing views. - -### In the 2D tracing view - -If you press the {% include key key='G' %} key with your mouse over a path in the 2D tracing view, that path should be selected. Note that this is the nearest path to the point shown in the image, so if you're showing paths projected through all slices, this may not be the one you expect. You can make this more obvious by switching the 'View paths (2D)' option to 'parts in nearby slices'. Alternatively, just move through the stack to a nearby slice before pressing {% include key key='G' %}. - -### In the 3D tracing view - -There are various ways to select a path in the 3D viewer, from easiest to most difficult: - -- If you press {% include key key='G' %} when the mouse is over a path in the 3D Viewer, it will be selected. - - - -- If you select a path in the 3D viewer, it should now also be selected in the rest of the tracing interface. One way of doing this is via the "Select" menu. - - - -- Alternatively, you can click on the path in the 3D view. Note that you will probably have the problem that clicks in the 3D view only select the volume rather than the paths - you can get around this by selecting the volume and then unticking {% include bc path='Edit | Hide/Show | Show content'%} to hide the volume rendering. Then clicking on the paths will be easy. diff --git a/_pages/plugins/simple-neurite-tracer/sholl-analysis.md b/_pages/plugins/simple-neurite-tracer/sholl-analysis.md deleted file mode 100644 index 0e4947468b..0000000000 --- a/_pages/plugins/simple-neurite-tracer/sholl-analysis.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_Sholl_analysis -title: Simple Neurite Tracer › Sholl Analysis -nav-links: true -nav-title: Sholl Analysis ---- - -{% include notice icon="warning" content='This is an old tutorial on how to call the [Sholl Analysis](/plugins/sholl-analysis) plugin from [Simple Neurite Tracer](/plugins/snt). **It is rather outdated. More up-to-date information is provided in [SNT: Analysis](/plugins/snt/analysis#sholl-analysis).** For an overview of the technique refer to the [Sholl Analysis](/plugins/sholl-analysis) documentation page.' %} - -# Introduction - -This tutorial assumes that you've already traced an image with Simple Neurite Tracer (SNT) and that you are familiar with the [variants of Sholl methods](/plugins/sholl-analysis#methodstable) and the [Sholl Analysis](/plugins/sholl-analysis) plugin. This tutorial will use an olfactory projection fibre image, freely available from the [Diadem challenge data set](http://www.diademchallenge.org/olfactory_projection_fibers_readme.html). - -# Retrieving Profiles - -When you've loaded the traces, that should look something like this: - -Now you have to pick a centre point for the analysis. This might be the soma or a [relevant focal point](http://forum.imagej.net/t/sholl-analysis-validation-parameters/3065/2). The centre point must be on one of your existing paths. First, select the path on which your centre point lies: - -Now hold down {% include key keys='Ctrl|Shift' %} (on Windows or Linux) or {% include key keys='option|shift' style='mac' %} (on Mac) and move the mouse along the path. A red cross-hair should track along the path: - -... when you've got the red cross-hairs at a suitable point, still holding down {% include key key='Ctrl' %} / {% include key key='Alt' %} and {% include key key='Shift' %}, press the {% include key key='A' %} key. Then you can release the other keys. You should see the Sholl analysis interface appear like this: - -Consider the first two options: you should probably select the top option *Use all N paths in analysis?* unless you're only wanting to include a subset of the paths, for example if your image stack contains multiple separate neurons. Next you can click on *Plot Profile* so that you can visualize how the intersections with concentric spheres vary with distance from your centre point: - -This graph shows exactly how many times a sphere of a particular radius will intersect with paths (i.e., *continuos sampling*). To consider spheres of evenly spaced radii (see definition of [Step size](/plugins/sholl-analysis#stepsize)), you have to enter a value into the *Radius step size* box. E.g., - -# Data Normalization - -If you need to preview the effect of [normalizing](/plugins/sholl-analysis#methodstable) the number of intersections by the volume (or area) enclosed by the sphere (or circle) - you can do that by selecting the *Normalize for volume enclosed by circle* option: - -The *Use standard axes* / *Use semi-log axes* / *Use log-log axes* controls whether the analysis is based on the log of normalized intersections and distance (*log-log*), the log of normalized intersections (*semi-log*) or unmodified values (linear axes) (see [Sholl Plots](/plugins/sholl-analysis#sholl-plots) for details. Note that the [Regression coefficient](/plugins/sholl-analysis#sholldecay) is always calculated in real time even if no normalization options are chosen. - -# Exporting Profiles - -You can export profiles by clicking on "Save Profile" which will prompt for a CSV filename to save to. If you want to export the profile, so that you can edit in some other software or include it in a presentation, you can select *Export graph as SVG* in the graph window. You can then load the SVG file (e.g., in Inkscape): - -
-{% include img src="sholl-analysis-10" width="350" %} {% include img src="sholl-analysis-11" width="350" %} -
- -# Analyzing Profiles - -Press *Analyze Profile* to run the [Sholl Analysis](/plugins/sholl-analysis) plugin. Once [Parameters](/plugins/sholl-analysis#parameters) have been specified, the plugin will [automatically calculate](/plugins/sholl-analysis#dratio) the normalization method thought to be the most informative. Metrics will be displayed in a [detailed table](/plugins/sholl-analysis#metrics). - -{% capture analyzing-profiles-tip %} -You can perform batch analysis using [{% include bc path="Analysis | Sholl | Sholl Analysis (Existing Profiles)..." %}](/plugins/sholl-analysis#analysis-of-existing-profiles) or [{% include bc path="Analysis | Sholl | Sholl Analysis (Tracings)..." %}](/plugins/sholl-analysis#analysis-of-traced-cells) -{% endcapture %} -{% include notice icon="tip" content=analyzing-profiles-tip %} - -# Sholl Image - -Another option that might be useful is *Make Sholl image*, equivalent to the [Intersections mask](/plugins/sholl-analysis#output-options) created by the [Sholl Analysis](/plugins/sholl-analysis) plugin when parsing images directly. This will produce a stack which shows the number of intersections at each distance from the centre point on a colour scale. You can see the exact number of intersections corresponding to a colour by mousing over that region and looking in the status bar. For example, this shows you that the orange colour corresponds to 2 intersections ("value=2"): - -If you go back to the main tracer interface, keeping that *Sholl image stack* open, you can visualize those colours on the traces by switching the *Use colors / labels from* option to *Sholl analysis of all paths* (volume of original image made transparent for clarity): - - diff --git a/_pages/plugins/simple-neurite-tracer/step-by-step-instructions.md b/_pages/plugins/simple-neurite-tracer/step-by-step-instructions.md deleted file mode 100644 index 8b30ede1f2..0000000000 --- a/_pages/plugins/simple-neurite-tracer/step-by-step-instructions.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_Step-By-Step_Instructions -title: Simple Neurite Tracer › Step-By-Step Instructions -nav-links: true -nav-title: Step-By-Step Instructions ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -# Step-by-Step Tracer Instructions - -These "step-by-step" instructions below assume that you have done the preliminary steps described on the [Simple Neurite Tracer: Basic Instructions](/plugins/simple-neurite-tracer/basic-instructions) page including starting up the plugin and turning on "Hessian-based analysis". Note that the screenshots here are from an early pre-release version of the plugin. The path list in the current version is in a separate window, but otherwise the interface is the same. - -## Trace a basic path: - -### 1. Pick a start point - -Before you pick a start point for your first path, the tracer will look like this: ![](/media/snt-cropped-before-starting.png) Move through the image stack to find the start point of a path, then click there with the left mouse button. - -### 2. Click a subsequent point - -A small blue square should appear, showing the start of the path: ![](/media/snt-cropped-after-starting.png) Move through the stack to find a subsequent point further along the same neuron, blood vessel, or whatever, and click there. During tracing, if a part cannot be found immediately, you may see the progress of the search in cyan: ![](/media/snt-cropped-mid-tracing.png) You can scroll through the stack while such a search is in progress - if it appears not be making good progress, it's probably best to click "Abandon search" (or press {% include key key='Esc' %}) and pick a point closer to the start point. - -### 3. Confirm the temporary path - -Once the search has found that point, it is shown in blue (to indicate that this is still a temporary path) and you are asked to confirm (by clicking "Yes" or pressing {% include key key='Y' %}) that this path is following the route through the stack that you expect. If it is not, then click "No" {% include key key='N' %} and you'll go back to step 2. ![](/media/snt-cropped-confirmation.png) - -### 4. After confirming the temporary path - -Assuming you confirmed the path, the confirmed path will appear in red, like this: ![](/media/snt-cropped-confirmed.png) Now you are essentially back at step 2. Normally you will go on top pick further points along the structure. However, if you have finished with that path, click "Finish Path" {% include key key='F' %} and you will go back to step 1. - -### 5. After completing a path - -If you completed that path it will be shown in magenta: ![](/media/snt-cropped-completed-path.png) - -## Branching: Start a path on an existing path - -Before you pick a start point for your first path, the tracer will look like this: (We've zoomed in on the region of interest) ![](/media/plugins/simple-neurite-tracer/snt-sb-before-selecting.png) - -### 1. Select the path to branch off - -To select the path you want to branch off from, you can either select it in the path list, or press {% include key key='G' %} while your mouse pointer is over the path. When the path is first selected, it will be shown in the default green color, as below: ![](/media/plugins/simple-neurite-tracer/snt-sb-before-starting-path.png) - -### 2. Click while holding the branch modifier to start the branch - -To force the start of the new path to be a branch off the selected path, hold down the {% include key keys='Ctrl|Shift' %} keys while you move the mouse to find the right point under the red cross-hairs. Then click with the left mouse button - {% include key keys='Ctrl|Shift' %} should still be held down. Finally release the keys. **N.B. on MacOS you must use {% include key keys='Alt|Shift' %} instead.** Once you've started a path, it looks like this: ![](/media/snt-sb-started-branch.png) - -### 3. Continue adding to the path as normal - -From this point on, you can carry on adding to the path as above, e.g. create a temporary path: ![](/media/snt-sb-temporary-path.png) ... and confirm it: ![](/media/snt-sb-confirmed-path.png) When you decide to complete the path you should see in the path list that it has been recorded as starting on the existing path: ![](/media/snt-sb-completed-branch.png) - -## Joining: End a path on an existing path - -Supposing you want the end of a path that you're tracing to join onto an existing path, you just use the same modifier key when selecting the end point of the last part of the path. To go into that in more detail, if you're half way through tracing a path like this: ![](/media/snt-ej-cropped-half-finished.png) - -... and you want the final part of that path to join up with the existing path running from the bottom to the top of the image. First, select that path in the path list, so that it turns green: ![](/media/snt-ej-cropped-selected-destination-path.png) - -Now hold down {% include key keys='Ctrl|Shift' %} (or {% include key keys='Alt|Shift' %} on MacOS) to restrict the end point to be a "join" on that existing path. Click (while still holding down the modifier keys) to start the search for that end point and make it join the existing path. If the search can find a path to the end point, the result should look like this: ![](/media/snt-ej-cropped-end-join-created.png) - -If you're happy with that, confirming the temporary path will automatically complete the whole path, since if you're creating an end join there cannot be any more to the path. The result will look like this: ![](/media/snt-ej-cropped-path-completed.png) - -Note that the path list indicates that this new path (1) ends on the existing one (0). diff --git a/_pages/plugins/simple-neurite-tracer/testing-procedure.md b/_pages/plugins/simple-neurite-tracer/testing-procedure.md deleted file mode 100644 index 5e1980d411..0000000000 --- a/_pages/plugins/simple-neurite-tracer/testing-procedure.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -mediawiki: Testing_Procedure_for_Simple_Neurite_Tracer -title: Simple Neurite Tracer › Testing Procedure -nav-links: true -nav-title: Testing Procedure ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -This is a set of instructions to follow to test as much of the code as possible in [Simple Neurite Tracer](/plugins/snt). It does not give complete coverage, but following this before each new release should stop the more obvious problems from getting through. The coverage results for this procedure with VIB at 6840872c6a492e31caa453a6776d1e9fac26f58d are [here](https://fiji.sc/~longair/coverage-VIB-6840872c6a492e31caa453a6776d1e9fac26f58d/_files/2b.html). - -## Basic Tracing - -- Open example-for-tracing.tif -- Run "Simple Neurite Tracer", selecting "Create new 3D Viewer" and "Use three pane view" -- Rotate the 3D view -- Use the slice selector to run through the slices in each pane -- Hold down Shift while moving the red crosshair around in each pane in turn -- Click to start a path -- Cancel Path -- Click to start a path -- Select a further point along the path -- Check with "Shift" that the cyan search progress appears in each pane -- Check that blue path is create in each pane, and in the 3D viewer -- Click "No" to answer the question "Keep new path segment" -- Try again to select a further point along the path -- Click "Abandon Search" half way through the search for the path. -- Try again to select a further point along the path, but allow it to continue to completion -- Click "Yes" to confirm the temporary path -- Check that the red path appears in all panes and the 3D viewer -- Pick a further point and confirm that next segment. -- Click on "Complete Path" -- Check that the magenta path appears in all of the viewers -- Select the path in the Path Window -- Hold down Control and click a point on the existing path where you want a branch point to start -- Add a few more segments to the the new path, complete it normally -- Start a new path at a random point in the stack, and end it on an existing path by holding down Control when you select the final point -- Create a new path that both starts and ends on an exisiting path -- Check that these paths appear sensibly in the Path window -- Try selecting and deselecting the paths in the Path window, check that the right paths are highlighted in each pane and in the 3D viewer -- Turn on the "Only Show Selected Paths" option and do the same, checking that only the selected paths appear -- Turn off the "Only Show Selected Paths" -- Select "2D: parts in nearby slices" -- Look through all the slices to check that they're displayed properly -- Try changing the "slices on either side" parameter and doing the same -- Turn on "Hessian based analysis" -- Add an extra path -- Turn off "Hessian based analysis" -- Click on "Pick Sigma Visually" -- Click on an interesting point in the image -- In the Sigma Palette, try adjusting the maximum, adjusting the slice and click on one of the boxes with a different sigma -- Close the palette and wait for the Gaussian to finish calculating -- Try adding a path -- Turn off "Hessian based analysis" -- Click "Pick Sigma Visually", click in the image, but close the window while the palette is generating to check that this cancels the generation properly -- Click "Pick Sigma Manually" and try setting some values - check that the Gaussian is recalculated and you can trace a new path -- Click on the green rectangle and then change the colour. Check that the colour changes in the panes and in the 3D Viewer -- Click on the magenta rectangle and then change the colour. Check that the colour changes in the panes and in the 3D Viewer. -- Use "Show / Hide Fill List" and "Show / Hide Path List" to display and hide the two windows -- Select a single path in the Path Window, hold down Shift and click "Fit Volume" -- "Fly Through" the normal path which is fitted -- Select all paths in the Path Window and click "Fit Volume" -- Check that they are all fitted in the 3D Viewer (note bug here: selection is not preserved afterwards) -- Try selectively unfitting two of the paths -- Refit one of them. -- Select a (not top level path) and click "Make Primary" -- Check that the path list is rearranged -- Click on a path and rename it (not bug here: only the non-fitted path's name is changed) -- Delete the path with start and end joins -- Don't quit the tracer but move onto the next set of tests... -- Select a single path and click "Fill Out" (note bug here: panes stop updating due to NPE) - -``` -Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException - at tracing.SearchThread.anyNodeUnderThreshold(SearchThread.java:682) - at tracing.SearchThread.drawProgressOnSlice(SearchThread.java:729) - at tracing.FillerThread.drawProgressOnSlice(FillerThread.java:365) - at tracing.TracerCanvas.drawOverlay(TracerCanvas.java:87) -``` - -- (FIXME: add further filling test script here.) -- Click "Cancel Fill" -- Move on to the next section - -## Saving and Loading - -- Click "Export as CSV" -- Check that the CSV file has been created properly -- Repeat, checking there's a warning about overwriting and overwriting -- Repeat, checking there's a warning about overwriting and not overwriting -- Click "Save Traces File", save to foo.nonstandard -- Quit the tracer (there should be no "unsaved paths" warning...) -- Close the 3D Viewer -- Start "Simple Neurite Tracer" and select "Create new 3D Viewer" and "Three Pane View" -- Click "Load Traces" and select foo.nonstandard -- Look through the stack and check that all are reloaded, the renamed path is still renamed, etc. -- Add a new path -- Click "Quit Tracer", check that you're warned about unsaved paths - cancel, check that it doesn't quit -- Click "Quit Tracer", check that you're warned about unsaved paths - go ahead and quit -- Rename "foo.nonstandard" to "foo.traces" -- Start "Simple Neurite Tracer" and select "Create new 3D Viewer" and "Three Pane View" -- Click "Load Traces" and check that it offers to load the renamed traces file. -- Click "No", and select it manually. -- Quit the tracer and try again, this time loading the default when it offers. - -## Test Different 3D Views - -- Load up the traces file, make sure that some paths are fitted, some not -- Try each of the View Paths (3D) options, check they all work -- Change back to surface reconstructions - -## Reuse an existing 3D viewer - -- Select "Show only selected paths", pick two fitted paths -- Change the fitted path colour to something different from the default (e.g. yellow) -- Quit the tracer, don't save -- Select the "image for tracing" in the 3D Viewer, remove it -- With the original ImagePlus as the current image, start the 3D viewer, but select "Reuse 3D Viewer", and pick the existing 3D Viewer -- Add a new path, check that the existing yellow reconstructions are still there -- Quit the tracer and close the 3D Viewer - -## Load Labels - -- Load up an image which has a corresponding labels file -- Click "load labels", select the right labels file -- Hover the mouse over different regions and check that the ImageJ status updates to tell you the region's name -- Quit the tracer - -## Show Correspondences To Traces - -- Load a file for which you have a traces file -- Start the tracer -- Draw a few paths -- Click "Show Corresponding Traces" and select the existing traces file -- Change 3D view to "lines" and check that the correspondences are shown correctly -- Quit the tracer - -## SWC Import - -- Load an image file for which you have a corresponding SWC file diff --git a/_pages/plugins/simple-neurite-tracer/using-mip-overlays.md b/_pages/plugins/simple-neurite-tracer/using-mip-overlays.md deleted file mode 100644 index d381c55f4a..0000000000 --- a/_pages/plugins/simple-neurite-tracer/using-mip-overlays.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_Using_MIP_Overlays -title: Simple Neurite Tracer › Using MIP Overlays -nav-links: true -nav-title: Using MIP Overlays ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -If you are tracing bright neurons with a structure that appears clear when viewed in a Maximum Intensity Projection of the stack, you can now use a couple of new features of Simple Neurite Tracer to speed up your tracing. These are: - -- The menu option "Show MIP overlays at 20% opacity". This overlays the Maximum Intensity Projection over the slice views of your data, regardless of which your current slice is. -- The key shortcut 'm', while your mouse is over a point in the image, is the same as a left mouse click at the point of maximum intensity under that point throughout the whole stack. - -These features are demonstrated in the following screencast. (I'm afraid that the 3D viewer hasn't been captured properly in this screencast, but I hope it's still pretty clear what's going on.) - -{% include video platform='youtube' id='pXpMRb1AC4I'%} diff --git a/_pages/plugins/simple-neurite-tracer/wishlist.md b/_pages/plugins/simple-neurite-tracer/wishlist.md deleted file mode 100644 index 63f0afe79a..0000000000 --- a/_pages/plugins/simple-neurite-tracer/wishlist.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -mediawiki: Simple_Neurite_Tracer:_Wishlist -title: Simple Neurite Tracer › Wishlist -nav-links: true -nav-title: Wishlist ---- - -{% include warning/deprecated new="[SNT](/plugins/snt)" - old="[Simple Neurite Tracer](/plugins/simple-neurite-tracer)" %} - -This is a list of the most commonly requested (or most important) wishlist items for Simple Neurite Tracer. - -- Add a page to the wiki about accuracy considerations, particularly for people who are measuring lengths of processes. - - - -- Path finding and filling are very memory hungry in large stacks. The data structures for storing the progress of these searches should be much more efficient. - - - -- It would be nice to be able to export paths to NeuroML - - - -- The "fill volume" option works well, but currently isn't rendered in the 3D viewer and doesn't calculate radii around the path for export. It would be useful to fit spheres within the fill to optimize the midpoint and generate radii. - - - -- Make the Tubular Geodesics plugins available through the Fiji [Updater](/plugins/updater). - - - -- There should be an Undo option when tracing - a big job to implement, unfortunately - - - -- The way that fills are stored in the .traces file format is very inefficient at the moment - it stores enough information to be able to restart the fill from the exact state that the search reached, and this isn't really necessary. - ------------------------------------------------------------------------- - -Done: - -- An option to optionally colour the paths by their SWC type -- An option to set paths to a particular colour -- An option to export paths as SWC -- An option to export all neurons as SWC files, i.e. one per connected set of paths -- You should be able to split paths -- You should be able to merge branches that meet at a single point. This is important for when people forget to use the join modifier when creating a branch. The suggested course of action is to go back and create a tiny joining path between the original process and the branch. However, to avoid having this additional tiny branch, it would be best to be able to merge them -- It has been requested that for RGB images, the tracer should continue to convert the image stack to luminance values for tracing internally, but in the interface should instead display the full colour images. I agree, but would like to go further and add an option to display any one of: - - The original image data. - - The values which are being traced on, which might be preprocessed or just a simple transformation of the original data -- The "fit volume" option is very naive, and doesn't work well for noisy stacks. For clear processes it's still a nice way to visualize the traces, but it should be replaced by a better algorithm. Update: this option should be deprecated - for reconstruction it's vastly better to use [the Tubular Geodesics method](/plugins/snt/tubular-geodesics). -- You should be able to do all the basic tracing operations in the 3D Viewer. e.g. selecting the start point, selecting the subsequent points, and creating joins and branches. This is partially implemented now - you can try switching between the "hand" and "wand" tool and clicking in the 3D viewer. There's no visual feedback yet for what you're doing, however. Ideally it would be nice not to have to switch tool, as well diff --git a/_pages/plugins/snt/analysis.md b/_pages/plugins/snt/analysis.md index cd6a0470f4..f18bb3175c 100644 --- a/_pages/plugins/snt/analysis.md +++ b/_pages/plugins/snt/analysis.md @@ -8,133 +8,154 @@ forum-tag: snt update-site: Neuroanatomy --- -# Sholl Analysis +# Brain Area Analysis +See [Graph-based Analysis](#graph-based-analysis). -There are two [Sholl Analysis](/plugins/sholl-analysis) commands available in SNT's *Analysis* menu. The {% include bc path='Analysis|Shuoll Analysis...'%} option provides a set of pre-defined focal points the user can choose from. Note for the morphology-based focal points (e.g., *Soma*, *Root node(s): Primary apical dendrite(s)*) , the relevant morphology tag(s) must be assigned to the set of paths considered by the analysis. To select a focal point manually, see the following section. +# Convex Hull Analysis +_Convex hull_ commands (in SNT main dialog, [Rec. viewer](/plugins/snt/reconstruction-viewer) and [Rec. plotter](/plugins/snt/manual#plotter)) compute the 2D or 3D convex hull of a reconstruction (i.e., the smallest convex polygon/polyhedron that contains the nodes of its paths). Convex hull measurements are defined in [Metrics](/plugins/snt/metrics#convex-hull-boundary-size). -{% capture text%} -Sholl Analysis has a dedicated [documentation page](/plugins/sholl-analysis) detailing [parameters](/plugins/sholl-analysis#parameters), [plots](/plugins/sholl-analysis#sholl-plots), and [metrics](/plugins/sholl-analysis#metrics). -{% endcapture %} -{% include notice icon="info" content=text %} +# Measurements -## Sholl Analysis (by Focal Point) +SNT provides a couple ways to measure reconstructions. To measure complete cells use {% include bc path='Analysis|Measure...'%} in the main SNT dialog (or {% include bc path='Analyze & Measure'%} in Reconstruction Viewer). A simplified _Quick Measurements_ variant of this command also exists, in which common metrics are immediately retrieved using default settings. To get measurements only on a select group of Paths, first select or filter for the Paths you want to measure in the Path Manager, then use the commands in the Path Manager's {% include bc path='Analyze|Measurements'%} menu. -Initiating Sholl Analysis: coarse method -It is also possible to initiate [Sholl Analysis](/plugins/sholl-analysis) on a tracing in the canvas by manually selecting a focal point. You can do it coarsely by right-clicking near a node and choosing *Sholl Analysis at Nearest Node* from the contextual menu (Shortcut: {% include key keys='Alt|Shift|A' %}. +{% include img align="center" name="Measurements dialog" src="/media/plugins/snt/snt-measurements-prompt.png" caption="The measurements dialog features an offline guide accessible through the Gear menu." %} -Alternatively, for precise positioning of the center of analysis: +The reason for distinguish between branch-based (ie., cell-based) and path-based measurements is flexibility: Path-based measurements can be performed on any structures, even those with loops, while branch-based measurements require the structure to be a [graph-theoretic tree](#graph-based-analysis). The bulk of SNT measurements is described in [Metrics](/plugins/snt/metrics). Measurements available in the GUI are typically single-value metrics. Many others measurements are available via [scripting](/plugins/snt/scripting). -1. Mouse over the path of interest. Press {% include key key='G' %} to activate it. -2. Press {% include key keys='Alt|Shift' %} to select a node along the path. -3. Press {% include key keys='Alt|Shift|A' %} to start analysis. +Batch measurements of reconstructions can be accomplished via scripting. See, e.g., the [bundled template script](/plugins/snt/scripting#bundled-templates) *Measure\_Multiple\_Files.py*, and related batch scripts for examples. -
- 1) Select path - 2) Snap cursor to node - 3) Sholl dialog -
+**Note on Fitted Paths:**
+Some branch-based metrics may not be available when mixing fitted and un-fitted paths because paths are fitted independently from one another and may not be aware of the original connectivity. When this happens, metrics may be reported as NaN and related errors reported to the Console (when running in Debug mode). +If this becomes an issue, consider fitting paths in situ using the Replace existing nodes option instead. Also, remember that you can also use the Path Manager's Edit>Rebuild... command to re-compute relationships between paths - The Sholl dialog created by this approach differs slightly from the dialog created by running the {% include bc path='Analyze|Sholl|Sholl Analysis (From Tracings)...'%} plugin in the main Fiji menu. First, the center of analysis is automatically taken from the nearest (or exact) node where the user clicks. In addition to morphology and custom tag filters, the *Path filtering* drop-down menu provides an additional option to restrict the analysis to the subset of paths selected in the Path Manager. Another advantage is that the display canvas allows the radius step size to be previewed visually. To do this, toggle on the *Preview* checkbox under the *Sampling* section and experiment with different step sizes. +# Statistics +SNT assembles comparison reports and simple statistical reports (two-sample t-test/one-way ANOVA) for up to six groups of cells. This is described in [Comparing Reconstructions](#comparing-reconstructions). In addition, descriptive statistics are commonly reported in histograms from *Frequency/Distribution Analysis* commands. -
- Step Size = 0 - Step Size = 5 -
+{% include img align="center" src="/media/plugins/snt/snt-combined-histograms.png" caption="Example of histograms obtained from the Path Manager's _Branch-based Distributions..._ command."%} -In addition to the Sholl Profile plot and table, the output of the analysis can be visualized as a color mapping of the reconstruction . To color code the tracing, choose *Color coded paths* from the *Annotations* drop-down menu and select a Lut from the *Annotations Lut* drop-down menu before pressing *Run Analysis*. To output the Sholl Image, choose *3D viewer labels image* from the *Annotations* drop-down menu and select the desired LUT. + +# Graph-based Analysis +Analyses based on [graph-theory](https://en.wikipedia.org/wiki/Tree_(graph_theory)) are better performed via the [scripting](/plugins/snt/scripting). However, SNT features a quite-capable _Graph Viewer_ that has many built-in options for handling graph objects. -
- Sholl Profile Plot - Sholl Profile Table - Color Coded Tracing - Ice Lut -
+The viewer provides controls for orientation, zoom level, panning, vertex editing and traversal as well as options to customize the display vertices (shape and labels) and edges (shape and weight labels). Basic support for themes (including _dark_, _light_ and _formal_) are also supported. The_Graph Viewer_ canvas may be exported in several file formats, including HTML, PNG and SVG. -# Strahler Analysis +Typically, the most common types of graphs handled by _Graph Viewer_ are: -To conduct [Strahler Analysis](/plugins/strahler-analysis) on the current contents of the Path Manager, choose the {% include bc path='Utilities|Strahler Analysis'%} command in the main SNT dialog. This command will output the results of the analysis as a table and plot. These figures contain morphometric statistics on the group of paths associated with each Horton-Strahler Number. Note that this feature analyzes traced reconstructions. To run Strahler analysis on images, use the {% include bc path='Analyze|Skeleton|Strahler Analysis...'%} plugin in the main Fiji dialog. + - **Dendrograms**: {% include wikipedia title="Dendrogram" %}s can be obtained from single rooted tree structure, and provide a high-level overview of neurite branching topology. In the GUI, dendrograms can be created from {% include bc path='Utilities|Create Dendrogram'%} in the main SNT dialog or {% include bc path='Analyze & Measure|Create Dendrogram'%} in [Reconstruction Viewer](/plugins/snt/reconstruction-viewer). -{% capture text%} -*Strahler Analysis (from Images)* has a dedicated [documentation page](/plugins/strahler-analysis) with useful information. -{% endcapture %} -{% include notice icon="info" content=text %} + - **Annotation Graphs** These rely on brain annotations (i.e., neuropil labels) and are typically used to summarize projectomes or relationships between brain areas, including ferris-wheel diagrams. Note that annotation graphs can be generated for a single cell or groups of cells. -
- Strahler Analysis table - Strahler Analysis plot -
+{% include gallery align="fill" content= +" +/media/plugins/snt/graph-viewer-dendrogram-simple.png | Dendrogram of a neuronal tree (_Toy neuron_ demo dataset) under the _vertical hierarchical_ layout. Edges depict branch length (µm). Vertices depict the root node (1), branch-, and end- points. +/media/plugins/snt/graph-viewer-dendrogram-color-coded.png | Dendrogram of a neuronal tree (_Toy neuron_ demo dataset) color-coded by edge weight, i.e., branch length (µm), under the default layout (_vertical tree_). +/media/plugins/snt/graph-viewer-ferris-wheel.png | Ferris-wheel diagram for a group of MouseLight PT-neurons (medulla-projecting) located in the secondary motor cortex (MOs, center vertex). Outer vertices depict target areas innervated by the cells' axons (automatically grouped by ontology). Edges encode axonal cable length (µm). +" +%} -# Path Order Analysis +Two other type of _Brain Area Analysis_ visualizations relying on graph-based analysis (but not _Graph Viewer_) include boxplots and Sankey (flow) diagrams reporting innervation across brain areas/neuropil regions: -Found at {% include bc path='Analysis|Path Order Analysis'%} in the main SNT dialog, this option analyzes the Paths in the Path Manager based on *Path Order* as opposed to Strahler classification in which branches are classified (more details on alternative branch classification schemes can be found e.g., [here](https://www.mbfbioscience.com/help/nx11/Content/Branch%20order/Branch_Order.htm)). Produces a table of results and a plot similar to the *Strahler Analysis* option, with morphometric statistics on the group of paths associated with each Branch Order. +{% include gallery align="fill" content= +" +/media/plugins/snt/sankey-flow-plot-with-tooltip.png | Flow-plot (Sankey diagram) for two groups of MouseLight PT-neurons: Medulla-projecting (MY Proj.) and Thalamus-projecting (TH Proj.) _Flows_ depict axonal cable length (µm) at target areas () colored using the default ontology color-scheme adopted by the Allen Mouse Brain Common Coordinate Framework, CCFv3). +/media/plugins/snt/brain-analysis-group-boxplot.png | The same flow-plot data in boxplot format (see *Flow and Ferris-Wheel Diagrams Demo* script) +/media/plugins/snt/brain-analysis-combined-boxplot.png | *Analysis › Brain Area Analysis...* histogram in which frequencies of a particular morphometric trait are retrieved across brain areas (neuropil labels). In this example, *No. of tips* was retrieved for the four cells in the *MouseLight dendrites* demo dataset (*File › Load Demo Dataset...*) +" +%} -
- Path Order Analysis table - Path Order Analysis plot -
+Ultimately, fine-grained programmatic control over SNT's Graph objects is achieved via scripting. Relevant resources: +- [JGraphT](https://jgrapht.org/): The underlying library handling graph theory data structures and algorithms ([JAVA API](https://jgrapht.org/javadoc/) and [Python API](https://pypi.org/project/jgrapht/). +- [SNT graph package](https://javadoc.scijava.org/SNT/index.html?sc/fiji/snt/analysis/graph/package-summary.html): High-level tools for graph creation within SNT +- *SNT Demo Scripts*: See e.g., *Graph\_Analysis.py* and *Flow\_and\_Ferris\-Wheel\_Diagrams\_Demo.groovy*, two [SNT demo scripts](/plugins/snt/scripting#snt-scripts).. +- *Python notebooks*: For [pyimagej](/scripting/pyimagej) examples, have a look at the *Hemisphere Analysis* [notebook](/plugins/snt/scripting#python-notebooks). -# Measurements +# Sholl Analysis + +{% capture sholl%} +There are several entry points to Sholl Analysis in SNT. You can find those in the _Neuroanatomy Shortcuts_ panel ({% include bc path='Plugins|Neuroanatomy|'%} or "SNT" icon in Fiji's toolbar): + +1. Sholl Analysis (Image): Direct parsing of images, bypassing tracing +2. Sholl Analysis (Tracings): Parsing of reconstructions +3. Sholl Analysis Scripts: These handle batch processing of files, specialized analysis, and misc. utilities + +Sholl Analysis has a dedicated [documentation page](/plugins/sholl-analysis) detailing [parameters](/plugins/sholl-analysis#parameters), [plots](/plugins/sholl-analysis#sholl-plots), and [metrics](/plugins/sholl-analysis#metrics). +{% endcapture %} +{% include notice icon="info" content=sholl %} -SNT provides several ways to measure reconstructions. A comprehensive selection of measurements can be found by going to {% include bc path='Analysis|Measure...'%}. in the main SNT dialog. -To quickly measure all existing paths with a common set of statistics, choose {% include bc path='Analysis|Quick Measurements'%}. In both cases the results of the measurements are displayed in a common table. +In the main SNT dialog, Sholl commands are available in the {% include bc path='Analysis| '%} menu and image contextual menu and include: -To get measurements only on a select group of Paths, first select or filter for the Paths you want to measure in the Path Manager, then choose either command from the {% include bc path='Analyze'%} menu in the Path Manager. +- **{% include bc path='Sholl Analysis...'%}** Analyzes cells based on a set of pre-defined, morphology-based focal points (e.g., *Soma*, *Root node(s): Primary apical dendrite(s)*). Note that this assumes the relevant morphology tag(s) have been assigned to the set of paths being analyzed. Since the center of analysis is only determined after the prompt has been dismissed, preview of sampling shells may not be available. -Batch measurements of reconstructions can be accomplished via scripting. See *Measure\_Multiple\_Files.py* in the SNT [Script Templates](/plugins/snt/scripting#script-templates) for a basic example. +- **{% include bc path='Sholl Analysis (by Focal Point)...'%}** Analyzes cells on an _exact_, user-defined focal point. It is described on the following section. -
- -
+- **{% include bc path='Sholl Analysis at Nearest Node'%}** Coarser alternative to {% include bc path='Sholl Analysis (by Focal Point)...'%}, run from the image contextual menu by right-clicking _near_ a node (Shortcut: {% include key keys='Alt|Shift|A' %}. -# Dendrogram Viewer +## Sholl Analysis (by Focal Point) -Dendrogram Viewer shortcuts +For precise positioning of the center of analysis: -Found at {% include bc path='Utilities|Create Dendrogram'%}, this option generates a {% include wikipedia title="Dendrogram" %} from one connected component (i.e., a single rooted tree structure) in the Path Manager, providing a high-level overview of neurite branching topology. Note that if multiple rooted trees exist in the Path Manager, you will be prompted to choose one of them. +1. Mouse over the path of interest. Press {% include key key='G' %} to activate it + +2. Then, select the node to be used as focal point. This can be done in one of two ways: + 1. Select a node along the path as you would for forking operation: i.e., by pressing {% include key keys='Alt|Shift' %} while moving the cursor along the path (Note the "Fork Point" label appearing near the cursor on non-display canvases). With {% include key keys='Alt|Shift' %} still pressed, press {% include key keys='A' %} to start the analysis + 2. Make the path editable (right-click on the image and choose _Edit Path_ from the contextual menu). Move the cursor along the path until the desired node is highlighted. Press {% include key keys='Alt|Shift|A' %} to start the analysis -The viewer provides controls for orientation, zoom level, panning, vertex editing and traversal as well as options to display vertex labels and edge weights (which by default are the euclidean distances between adjacent vertices). To see the available key shortcuts, right click on the viewer and choose *Available Shortcuts...*. The plot may be exported in several file formats, including HTML, PNG and SVG. +NB: The default {% include key keys='Alt|Shift' %} modifier can be simplified in the _Options_ tab of the main dialog. -Fine-grained programmatic control over SNT's Graph objects is achieved using the [JGraphT API](https://jgrapht.org/javadoc/) in a script. Also relevant is the [sc.fiji.snt.analysis.graph](http://fiji.github.io/SNT/sc/fiji/snt/analysis/graph/package-frame.html) package which provides high-level tools for Graph creation and conversion. See *Graph\_Analysis.py* in the SNT [Script Templates](/plugins/snt/scripting#script-templates) for a basic example. +The Sholl dialog created by this approach is a variant of the dialog created by running the {% include bc path='Sholl|Sholl Analysis (From Tracings)...'%} from the _Neuroanatomy Shortcuts_ panel, with a couple of changes: +1. Since the center of analysis is defined precisely on an image, radius step size can be previewed +2. The *Path filtering* drop-down menu provides additional options to restrict the analysis to the subset of paths selected in the Path Manager +3. The type of annotations is more specialized and includes: + - **Color coded nodes** Intersection counts will be color mapped into path nodes under the _annotation LUT_. + - **3D viewer labels image** This generates a synthetic image holding the number of intersections at each distance from the center under _annotation LUT_. This image can then be fed to the "Apply Color Labels" action of the legacy 3D viewer, to "overlay" the mapping on the legacy 3D viewer scene. -
- Dendrogram Viewer -
+Note that plots and tables can be directly saved to disk by selecting _Save_ and specifying a valid directory in the dialog. The remaining options in the dialog are described in the [Sholl documentation page](/plugins/sholl-analysis). -# Comparing Reconstructions +{% include img align="center" src="/media/plugins/snt/sholl-analysis-outputs.png" caption="Overview of Sholl analysis outputs: Linear and log-log profile (Sholl decay calculation), *detailed* and *summary* tables. Note that 'traditional' plots are obtained by disabling curve-fitting altogether."%} + +# Strahler Analysis +{% capture strahler%} +Similarly to _Sholl Analysis_, there are several entry points to Strahler Analysis in SNT. You can find those in the _Neuroanatomy Shortcuts_ panel ({% include bc path='Plugins|Neuroanatomy|'%} or "SNT" icon in Fiji's toolbar): -The {% include bc path='Utilities|Compare Reconstructions...'%} command will bring up a prompt which gives the user the option to compare two single reconstruction files against multiple metrics, or multiple groups of reconstruction files against a single metric. +1. Strahler Analysis (Image)... Direct parsing of images, bypassing tracing +2. Strahler Analysis (Tracings)... Parsing of reconstructions +3. Strahler Analysis Scripts: These handle batch processing of files -
- - - -
+_Strahler Analysis (Image)_ has a dedicated [documentation page](/plugins/strahler-analysis) with details on the classification. +{% endcapture %} +{% include notice icon="info" content=strahler %} -If you select, *Compare two files* and press *OK*, a file chooser dialog will appear allowing the user to select two SWC files and their respective colors for display in Reconstruction Viewer. +To conduct [Strahler Analysis](/plugins/strahler-analysis) on the current contents of the Path Manager, choose the {% include bc path='Analysis|Strahler Analysis...'%} in the main SNT dialog. This command will output the results of the analysis as a table and plot(s). These figures contain morphometric statistics of branches at each Horton-Strahler number. Refer to the _Strahler Analysis (Image)_ [documentation](/plugins/strahler-analysis) for details on the classification. +{% include img align="center" src="/media/plugins/snt/strahler-analysis-from-reconstructions.png" caption="Strahler Analysis detailed output."%} -Use the *Browse* button to select the two files and press 'OK' to run the analysis. The results will include a table containing results of the *Quick Measurements* function for both reconstructions, as well as an instance of the 3D Reconstruction Viewer displaying both reconstructions. +# Path Order Analysis -
- -
+Found at {% include bc path='Analysis|Path Order Analysis'%} in the main SNT dialog, this option is a variant of Strahler with the following differences: +- Classification is based on _Path Order_: Paths are the scope of classification (not branches) +- Ranking of orders is reversed relatively to Strahler analysis (reversed Strahler orders), with primary paths having _order 1_ and terminal paths having the highest order +- Classification accepts _any_ structure: Since classification is path-based, there are no topological constrains in the analysis. While Strahler requires structures to be valid mathematical trees, Path order analysis can be performed on any structures, even those with loops -To instead compare multiple groups of reconstruction files against a single metric, choose *Compare groups of cells (two or more)* in the initial prompt. +# Persistence Analysis +Currently, persistence analysis is only available via [scripting](/plugins/snt/scripting). See e.g., the *Persistence Landscape* [notebook](/plugins/snt/scripting#python-notebooks). - +# Comparing Reconstructions + +SNT can compare up to six groups of cells. The entry point for this type of comparison is twofold: +- **{% include bc path='Utilities|Compare Reconstructions/Cell Groups...'%}** in the main SNT dialog. This includes a convenience option to compare single reconstruction files. +- **{% include bc path='Neuronal arbors|Load & Compare Groups...'%}** in Reconstruction Viewer, allowing groups to be tagged, and imported into a common scene while being compared. -The file selection prompt for this option allows selection of up to four directories containing SWC files. The metric to compare against is chosen from the *Metric* drop-down menu. Optionally, the user may restrict the analysis to specific neurite compartments. After making your selections, press *OK* to run the analysis. The result include multi-panel figure(s) rendering up to ten reconstructions from each group, a window with the metric statistics on each group, a box-plot and a histogram. These figures can all be exported as PNG or SVG. +The dialog prompt for this feature allows selection of up to six directories containing reconstruction files (SWC, TRACES, JSON, NDF). The metric to compare against is chosen from the *Metric* drop-down menu. Optionally, it is possible to restrict the analysis to specific neurite compartments. After making your selections, press *OK* to run the analysis. The result typically includes: +- A simple statistical report, including descriptive statistics and a two-sample t-test (when comparing two groups) or one-way ANOVA (when comparing three or more groups) +- Comparison plots for the chosen metric: Grouped histogram and boxplot +- _Montages_ of groups. These are multi-panel vignettes of up to 10 group exemplars. These can all be exported as PNG or SVG. -
- - -
+{% include img align="center" src="/media/plugins/snt/snt-compare-reconstructions-overview.png" caption="Comparing _No. of branches_ between two cell groups: Overview of outputs."%} -
- - - -
+{% include notice icon="info" content="SNT performs statistical tests without verifying if samples fulfill basic test-criteria (e.g., normality, variance homogeneity, sample size, etc.)" %} # Custom Analyses It is possible to script your own analysis routines. See [SNT Scripting](/plugins/snt/scripting) for the link to SNT's API as well as script templates demonstrating a range of analysis possibilities. + + diff --git a/_pages/plugins/snt/extending.md b/_pages/plugins/snt/extending.md new file mode 100644 index 0000000000..648d0f8906 --- /dev/null +++ b/_pages/plugins/snt/extending.md @@ -0,0 +1,117 @@ +--- +title: Extending SNT +nav-links: true +nav-title: Extending +artifact: org.morphonets:SNT +icon: /media/icons/snt.png +forum-tag: snt +update-site: Neuroanatomy +--- + +## Using SNT in other projects +Currently, the easiest way to improve the code base is by following the guidance of the [source-code repository](https://github.com/morphonets/SNT#developing). You will likely need an [IDE](/develop/ides) and some _basic_ familiarity with [maven](/develop/maven). + +To use SNT as a software library in your own project, simply add SNT as a maven dependency in your project's pom, e.g.: +```xml + + + org.morphonets + SNT + 4.2.0 + +``` +See e.g., [this forum thread](https://forum.image.sc/t/minimal-autotrace-code-for-snt-java/51654/15) for a concrete example of SNT being used as a software library. + +## Tubular Geodesics + +The Tubular Geodesics plugins were developed several years ago for [Simple Neurite Tracer](/plugins/snt/faq#what-is-the-difference-between-snt-and-simple-neurite-tracer) but remain functional in modern [SNT](/plugins/snt). They can be installed manually as an SNT add-on. Once installed, they allow you to trace on a filtered-version of your image in which neuronal processes (or other tubular structures) are significantly enhanced using [ITK](/software/itk) segmentation. More details on the following pages: +- [Tubular Geodesics homepage](https://www.epfl.ch/labs/cvlab/software/biomedical/delin-fiji/) +- [Tracing on Filtered Images](/plugins/snt/manual#main-dialog#tracing-on-secondary-image) +- [Secondary Image Screencast](/plugins/snt/screencasts#secondary-images) +- [Generating Filtered Images](/plugins/snt/step-by-step-instructions#generating-filtered-images) + +Tubular geodesics reference: +{% include citation doi='10.1109/cvpr.2012.6247722' %} + + +## TRACES File Format + +The .traces files that are saved by [SNT](/plugins/snt) are gzipped compressed XML. SNT will also load/save uncompressed XML files, but by default, they are saved in the compressed form. + +The XML DTD is included in the DOCTYPE of each file. The root element is always <tracings>, and this can contain the following elements: + +- [<imagesize>](#.3Cimagesize.3E) +- [<samplespacing>](#.3Csamplespacing.3E) +- [<path>](#.3Cpath.3E) +- [<fill>](#.3Cfill.3E) +- [<node>](#.3Cnode.3E) + +### <imagesize> + +There must be exactly one of these elements present, with attributes that describe the size of the image in terms of number of voxels across, up and down, e.g.: + +```html + +``` + +### <samplespacing> + +There must be exactly one of these elements present, with attributes that describe the spacing of the samples in the image (voxels) in world-coordinates, e.g.: +```html + +``` + +### <path> + +The `` element can have the following attributes: + +- `id`: a non-negative integer ID unique among the ``s in this file +- `startson`: if this is present, it gives the ID of the path which the beginning of this path branches off from. If `startson` is specified, then either the deprecated attribute `startsindex` or the recommended attributes `startsx`, `startsy` `startsz` must be specified as well. +- **\[deprecated\]** `startsindex`: This attribute used to indicate the 0-based index of the point in the other Path where the branch occurred. Please use `startsx`, `startsy` and `startsz` instead. +- `startsx`, `startsy` and `startsz`: These attributes indicate where on the path specified by `startson` the branch occurs. If one of these is attributes is specified, all must be specified. +- `endson`: if this is present, it gives the ID of the path which the branch ends on. If `endson` is specified, then either the deprecated attribute `endsindex` or the recommended attributes `endsx`, `endsy` `endsz` must be specified as well. +- **\[deprecated\]** `endsindex`: This attribute used to indicate the 0-based index of the point in the other Path where this path joins it. Please use `endsx`, `endsy` and `endsz` instead. +- `endsx`, `endsy` and `endsz`: These attributes indicate where on the path specified by `endson` this path ends. If one of these is attributes is specified, all must be specified. +- `name`: A string giving the name of this path +- `reallength`: The length of this path found by summing the Euclidean distance between each consecutive pair of points, in the units specified in <samplespacing> +- `fitted`: If present, this attribute gives the ID of another path which is a version of this path after the centre-line has been adjusted and radiuses at each point found. If this attribute is present, the `fittedversionof` attribute may not be. +- `fittedversionof`: If present, this attribute gives the ID of another path which was the source version for this one. Typically the path specified does not have radiusese defined for each point, although this is not always the case. If this attribute is present, the `fitted` attribute may not be. +- `usefitted`: This attribute must be present if either the `fitted` or `fittedversionof` attributes are. This attribute is either `"true"` or `"false"`. It should only be "true" for paths that have a fitted version, when it implies that the user wants the fitted path to be display in favour of this (the unfitted) one. If "false" and this path has a fitted version, it means that this path should not be displayed. It should always be "false" for paths that are fitted versions of other paths. +{% include notice icon="note" content="This is confusing and regrettable; in later versions this will be replaced by attributes with simpler semantics." %} +- `swctype`: This should be an integer from 0 to 7 inclusive, indicating what the SWC type of the path is. If not present, the default value is 0. The conventional meaning of these values is: + - 0: UNDEFINED + - 1: SOMA + - 2: AXON + - 3: DENDRITE + - 4: APICAL_DENDRITE + - ~~~5: FORK_POINT~~~ (Deprecated) + - ~~~6: END_POINT~~~ (Deprecated) + - 7: CUSTOM + +The <path> element may contain zero or more <point> elements. These are described below: + +### <point> + +This represents a point in a path. A point element may have the following attributes: + +- `xd`, `yd`, `zd`: These three attributes give the position of the point in world coordinates. e.g. you can use these coordinates directly to calculate the length of paths. +- **\[deprecated\]** `x`, `y`, `z`: These attributes represent the position of the point in image coordinates (i.e. indices of voxels in each axis). They are still generated for backwards compatibility, but it's better to use `xd`, `yd` and `zd`. +- `r`: If present, this attribute gives the radius of the neuron at that point. +- `tx`, `ty`, `tz`: If present, these attributes give the tangent vector along the neuron at (`xd`, `yd`, `zd`) + +### <fill> + +The `` element represents a fill around a path. It contains all the points found in the search starting from points on the path, but those that actually make up the fill are just those below the threshold specified in the attributes. (This is so that the search can be restarted if the fill is reloaded.) The `` element can have the following attributes: + +- `id`: The ID of the fill, a non-negative integer unique among all the other fill IDs in this file. +- `frompaths`: A comma ( optional space) separated IDs of the paths from which this fill started. e.g. if this attribute is `frompaths="2, 0"` then there are nodes with distance 0 at each of the points on ` It is the most widely adopted format for encoding neuronal reconstructions, in which information is stored in plain text. It was first described by (Cannon et al., 1998) and since then became a somewhat loose *lingua franca* of a neuron's three dimensional structure. It is described in more detail [here](http://www.neuronland.org/NLMorphologyConverter/MorphologyFormats/SWC/Spec.html) and [here](https://neuroinformatics.nl/swcPlus/). SNT supports all known variants of the format including [ESWC](https://www.nature.com/articles/sdata2017207) and [SWC+](https://neuroinformatics.nl/swcPlus/). The extension stems from the last names of Stockley, Wheal, and Cole, who developed a neat computer system for reconstructing neuronal cells ( Stockley et al., 1993). Confusingly, it is also a {% include wikipedia title="Adobe SWC file" %} used by Adobe. ### In which format should I save my tracings: TRACES or SWC? - -When tracing 4D or 5D images, `TRACES` is preferable because the channel and/or time frame associated with the data are stored. With simpler 2/3D images `TRACES` is also preferable to preserve [Path Manager tags](/plugins/snt/manual#tag) across restarts. Note that the {% include bc path='[Scripts](/plugins/snt/manual#scripts)| '%} menu provides a [batch converter](#convert) for `TRACES` → `SWC` conversion. The following table summarizes the differences between the two formats: +When tracing 4D or 5D images, TRACES is preferable because the channel and/or time frame associated with the data are stored. With simpler 2/3D images TRACES is also preferable to preserve [Path Manager tags](/plugins/snt/manual#tag) across restarts. Note that the {% include bc path='[Scripts](/plugins/snt/manual#scripts)| '%} menu provides a [batch converter](#convert) for TRACES → SWC conversion. The following table summarizes the differences between the two formats: -| | SWC | TRACES | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | -| No. reconstructions / file | Formally only one. When multiple reconstructions exits, SNT splits them across multiple files appending unique suffixes to filenames | Multiple reconstructions per file allowed | -| Image metadata | Formally none. SNT stores the spatial calibration of the image in the header | Rich. Including channel and frame of the traced structure. | -| [Path Manager tags](/plugins/snt/manual#tag) | Not stored | Stored | -| Format | Plain text | XML or compressed XML (as per [preferences](/plugins/snt/manual#misc)) | -| Presence | Ubiquitous among reconstruction software. The *de facto* standard in data sharing | Exlusive to SNT. But [open and easily parsable](/plugins/snt/traces-file-format) | +| | SWC | TRACES | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| No. reconstructions per file | Formally only one. When multiple reconstructions exits, SNT splits them across multiple files appending unique suffixes to filenames | Multiple reconstructions per file allowed | +| Image metadata | Formally none. SNT stores the spatial calibration of the image in the header | Rich. Including channel and frame of the traced structure. | +| [Path Manager tags](/plugins/snt/manual#tag) | Not stored | Stored | +| [Fits](/plugins/snt/manual#refinefit) | Not stored, unless fitting replaces existing nodes | Stored | +| [Fills](/plugins/snt/manual#fill) | Not stored | Filling parameters stored | +| Format | Plain text | XML or compressed XML (as per [preferences](/plugins/snt/manual#misc)) | +| Presence | Ubiquitous among reconstruction software. The *de facto* standard in data sharing | Exclusive to SNT. But [open and easily parsable](/plugins/snt/extending#traces-file-format) | -### How do I (batch) convert TRACES to SWC? +### Which file formats for neuronal reconstruction are supported by SNT? +SNT can read TRACES, SWC, NDF (NeuronJ data format), and JSON files (as used by the MouseLight project). -In the [Script Editor](/scripting/script-editor) ({% include bc path='File|New|Script...'%}) look for {% include bc path='Templates|Neuroanatomy|Batch|Convert Traces to SWC'%} and run it. Note that all of SNT scripts are also listed in the main as regular GUI commands in the main [interface](/plugins/snt/scripting#script-templates). Don't see the scripts? Please ensure SNT is properly [installed](/plugins/snt#installation). +### Which image file formats are supported by SNT? +Any file format supported by ImageJ/bioformats with up to 5 dimensions. RGB images are strongly discouraged and are converted to multi-channel before loading. -### How can I improve SNT documentation? +### How do I (batch) convert TRACES to SWC? +Use the {% include bc path='Batch|Convert Traces to SWC'%} template script. +### How can I improve SNT documentation? Use the *Edit this page* option on the top of the documentation page and edit its contents at will. Don't be shy. All changes are undoable\! ## Tracing -### Having to confirm indivual segments is too cumbersome for me. Is it possible to trace without interruption, by clicking in succession? - -Yes. Uncheck the *Confirm temporary segments* in the *Options* tab (*Temporay Paths* section). +### Having to confirm individual segments is too cumbersome. Is it possible to trace without interruption, by clicking in succession? +Yes. Uncheck the *Confirm temporary segments* in the *Options* tab (*Temporary Paths* section). ### How can I browse voxel intensities around processes? - -Righ-click on the image canvas and select *Pause SNT* from the contextual menu. Voxel intensities will be reported in the ImageJ status bar. +Right-click on the image canvas and select *Pause SNT* from the contextual menu. Voxel intensities will be reported in the ImageJ status bar. +Alternative, you can can also obtain Path profiles, in which voxel intensities are plotted along selected path(s). ### Is there a way to process one image after another in a fast way? - Yes. Have a look at these [instructions](https://forum.image.sc/t/simple-neurite-tracer-for-multiple-2d-images/22564/6?u=tferr). ### How can I import an image sequence into SNT? - Loading of images that require input options is handled by ImageJ directly. To load a directory of images (e.g., one file per Z-slice), run {% include bc path='File| Import|Image Sequence' color='white'%} and select the first file in the sequence, adjusting any needed parameters in the subsequent dialog prompt. Once the sequence is imported adjust voxel dimensions using {% include bc path='Image|Properties...' color='white'%}. To save yourself from having to go through these steps again, you should save the imported stack as a single TIFF file using {% include bc path='File|Save As|Tiff...' color='white'%} diff --git a/_pages/plugins/snt/index.md b/_pages/plugins/snt/index.md index 6bc8f791e9..98374c8da1 100644 --- a/_pages/plugins/snt/index.md +++ b/_pages/plugins/snt/index.md @@ -16,7 +16,7 @@ doi: 10.1038/s41592-021-01105-7 SNT[^1] is ImageJ's framework for tracing, visualization, quantitative analyses and modeling of neuronal morphology. For tracing, SNT supports modern multi-dimensional microscopy data, semi-automated and automated routines, and options for editing traces. For data analysis, SNT features advanced visualization tools, access to all major morphology databases, and support for whole-brain circuitry data. {% capture text%} -**SNT is available through Fiji and is based on [several publications](/plugins/snt/faq#how-do-i-cite-snt). If you use it successfully for your research please be so kind as to cite our work!** +**SNT is available through Fiji and is based on [publications](/plugins/snt/faq#how-do-i-cite-snt). If you use it successfully for your research please be so kind as to cite our work!** {% endcapture %} {% include notice icon="info" content=text %} @@ -28,15 +28,16 @@ The [source repository](https://github.com/morphonets/SNT) contains more details {% include gallery align="fill" content= " -/media/plugins/snt/snt-overview.png | Overview diagram +/media/plugins/snt/snt-overview.png | Overview of SNT components & SNT functionality /media/plugins/snt/snt-4D-examples.png | Semi-automated tracing: Support for multi-channel and timelapse images /media/plugins/snt/snt-auto-tracing-overview.png | Fully automated tracing of segmented images -/media/plugins/snt/simpleneuritetracer2.png | Scripted routines co-exist with graphical user interface operations +/media/plugins/snt/snt-v3-overview.png | Scripted routines co-exist with graphical user interface operations /media/plugins/snt/snt-script-example.png | [Scripting](/plugins/snt/scripting) in any of Fiji's supported languages /media/plugins/snt/snt-notebook.png | Scripting in native python through [pyimagej](/scripting/pyimagej) /media/plugins/snt/snt-montage-light.png | Quantitative and publication quality visualizations /media/plugins/snt/snt-montage-dark.png | Data-rich 3D visualizations /media/plugins/snt/snt-ferris-wheel.png | Routines to summarize data from projectomes and connectomics +/media/plugins/snt/snt-non-neuronal-example.png | Not only neurons: SNT can be used to analyze many types of filamentous structures " %} @@ -57,12 +58,17 @@ SNT's documentation is extensive. Please use the navigation bar on top of the pa | Section | Contents | | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| **[Manual](/plugins/snt/manual)** | SNT's user guide for tracing operations | -| **[Walk-throughs](/plugins/snt/step-by-step-instructions)** | Detailed step-by-step instructions for specific tasks | -| **[Screencasts](/plugins/snt/screencasts)** | Video tutorials. If you are using SNT for the first time you probably want to start here | +| **[Analysis](/plugins/snt/analysis)** | Overview of GUI-based analyses | +| **[Extending](/plugins/snt/extending)** | Resources for developers interested in extending SNT or parsing TRACES files | +| **[FAQ](/plugins/snt/faq)** | Frequently asked questions | +| **[Keyboard Shortcuts](/plugins/snt/key-shortcuts)** | List of SNT shortcuts (cheatsheet) | +| **[Manual](/plugins/snt/manual)** | User guide for main interface and tracing operations | +| **[Metrics](/plugins/snt/metrics)** | Cheatsheet for common measurements | +| **[Modeling](/plugins/snt/modeling)** | Cx3D integration | | **[Reconstruction Viewer](/plugins/snt/reconstruction-viewer)** | SNT's entry point for visualization of pre-existing data. If you are analyzing neuronal reconstructions you may want to start here | -| **[Analysis](/plugins/snt/analysis)** | Overview of all analysis commands, accessible in either the tracing interface or [Reconstruction Viewer](/plugins/snt/reconstruction-viewer) | +| **[Screencasts](/plugins/snt/screencasts)** | Video tutorials. If you are using SNT for the first time you probably want to start here | | **[Scripting](/plugins/snt/scripting)** | Details on how to use SNT as a scripting library | +| **[Walk-throughs](/plugins/snt/step-by-step-instructions)** | Detailed step-by-step instructions for specific tasks | ## References diff --git a/_pages/plugins/snt/key-shortcuts.md b/_pages/plugins/snt/key-shortcuts.md index 4c9cf0b5e2..8d33f70c6b 100644 --- a/_pages/plugins/snt/key-shortcuts.md +++ b/_pages/plugins/snt/key-shortcuts.md @@ -1,7 +1,7 @@ --- title: SNT › Key Shortcuts nav-links: true -nav-title: Key Shortcuts +nav-title: Shortcuts artifact: org.morphonets:SNT icon: /media/icons/snt.png forum-tag: snt @@ -10,14 +10,20 @@ update-site: Neuroanatomy {% capture text%} Most SNT features are triggered by keyboard shortcuts. Shortcuts are typically single keystrokes and most do not require other modifier keys to be pressed. Most are highlighted in the user interface. E.g., to toggle the *Trace/Fill on Secondary Layer* checkbox, one only needs to press its highlighted letter, i.e., {% include key key='L' %}. + +_Typically_, when {% include key keys='ctlcmd' %} is pressed, hotkeys are not intercepted by SNT. E.g., During a tracing session pressing {% include key key='N' %} triggers No* in the interactive prompt while {% include key keys='ctlcmd|N' %} will trigger IJ"s built-in command {% include bc path='File|New|image...'%}. {% endcapture %} {% include notice icon="info" content=text %} -{% capture tip%} -SNT was designed so that its shortcuts minimally collide with those of ImageJ. Most SNT hotkeys do not require holding down {% include key keys='ctlcmd' %}. When such a modifier key is pressed, the hotkey will no longer be intercepted by SNT. E.g., During a tracing session pressing {% include key key='S' %} will toggle cursor snapping while Pressing {% include key keys='ctlcmd|S' %} will allow you to save the traced image using IJ"s built-in command {% include bc path='File|Save'%}. +{% capture cmdpalette%} +{% include img src="/media/plugins/snt/command-palette.png" align="right" width="450px" %} +The Command Palette is the fastest way to access actions and discover their respective shortcuts: +1. Press {% include key keys='ctlcmd|Shift|P' %} in either SNT or Reconstruction Viewer +2. Start typing to filter actions, scripts and available commands +3. Press {% include key keys='up' %} or {% include key keys='down' %} to select a command (or use the {% include key keys='mouse wheel' %}) +4. Press {% include key keys='Enter' %} to run it {% endcapture %} -{% include notice icon="tip" content=tip %} - +{% include notice background-color="white" icon="tech" content=cmdpalette %} ### Interactive Prompt @@ -47,13 +53,6 @@ SNT was designed so that its shortcuts minimally collide with those of ImageJ. M | {% include key key='G' %} | Selects the nearest path to the mouse cursor. Holding {% include key keys='Shift|G' %} adds the path nearest to the mouse cursor to the current list of selected paths. *Mnemonic: Group paths around cursor.* Note that Paths can only be edited one at a time, and thus {% include key keys='Shift|G' %} is disabled in *Edit Mode* | -{% capture tip2%} -The Command Palette is a faster way to access actions. Press {% include key keys='ctlcmd|Shift|P' %} and begin typing to filter an interactive list of actions, scripts and commands in SNT's or Reconstruction Viewer dialogs:\\ -{% include img src="/media/plugins/snt/command-palette.png" align="center" width="450px" %} -{% endcapture %} -{% include notice icon="tip" content=tip2 %} - - ### Tracing These shortcuts are available when running SNT in *Tracing Mode*: @@ -118,4 +117,4 @@ All shortcuts that are not specific to tracing canvases (XY, ZY and XZ views) *s ### Other -There are other key and mouse combinations used in e.g., [Sholl Analysis (by Focal Point)](/plugins/snt/analysis#sholl-analysis), and [Branching and Joining Paths](/plugins/snt/step-by-step-instructions#branching-start-a-path-on-an-existing-path), that are listed in the contextual menu, displayed when righ-clicking a tracing canvas. +There are other key and mouse combinations used in e.g., [Sholl Analysis (by Focal Point)](/plugins/snt/analysis#sholl-analysis), and [Branching and Joining Paths](/plugins/snt/step-by-step-instructions#branching-start-a-path-on-an-existing-path), that are listed in the contextual menu, displayed when right-clicking a tracing canvas. diff --git a/_pages/plugins/snt/manual.md b/_pages/plugins/snt/manual.md index 53a2b2a2ae..3ee5b5ad6f 100644 --- a/_pages/plugins/snt/manual.md +++ b/_pages/plugins/snt/manual.md @@ -7,33 +7,36 @@ icon: /media/icons/snt.png forum-tag: snt --- -# SNT Commands +{% capture version%} +**This manual was last revised for version 4.2. Some newer features may not be documented.**
+Please help us to keep this manual up-to-date by [editing](https://github.com/imagej/imagej.github.io/edit/main/_pages/plugins/snt/manual.md) this page directly to fill in any documentation gap. Do [reach out](https://forum.image.sc/tag/snt) if you need assistance! +{% endcapture %} +{% include notice icon="info" content=version %} -SNT registers several commands in Fiji's menu structure in the {% include bc path='Plugins|NeuroAnatomy|' %} sub-menu, namely: +# SNT Commands -**[SNT](#startup-prompt)...** The main interface with *all* available commands with access to all viewers and canvases. Tracing and path editing operations are done from this interface. -**[Rec. Viewer](/plugins/snt/reconstruction-viewer)** A fast, streamlined interface for analysis of existing neuroanatomical data. -**[Reconstruction Plotter](#RecPlotter)** A utility command for quickly render reconstructions in vector format without having to load other interfaces. +SNT registers commands in Fiji's menu structure in the {% include bc path='Plugins|Neuroanatomy|' %} sub-menu, namely: -The easiest way to access all of SNT commands is through the *Neuroanatomy Shortcuts Window* by pressing *SNT* in the ImageJ toolbar. +**Neuroanatomy Shortcuts Window** A toolbar panel listing _all_ SNT commands, actions, and scripts including entry points to Sholl and Strahler analyses. It can be open via {% include bc path='Plugins|Neuroanatomy|' %}, or more easily, by pressing *SNT* in the ImageJ toolbar:
- +
-{% capture version%} -This manual was originally written for version 3.0. Some newer features may not be documented.
-Please help us to keep this manual up-to-date by reaching out on [forum.sc](https://forum.image.sc/tag/snt). -{% endcapture %} -{% include notice icon="info" content=version %} +**[SNT](#startup-prompt)...** The main interface, from which tracing and path editing operations are done + +**[Rec. Viewer](/plugins/snt/reconstruction-viewer)** A fast, streamlined 3D viewer for analysis and quantification of existing neuroanatomical data + +**[Reconstruction Plotter](#reconstruction-plotter)** A utility for rendering 2D illustrations of reconstructions (including vector formats) without having to load other interfaces + # Startup Prompt SNT is initialized by running {% include bc path='Plugins|NeuroAnatomy|SNT...' %}. All the options in the startup prompt can be set once SNT is opened, but the startup prompt provides the convenience of setting the most important parameters at once. -- **Image**/**Image File** The image to be traced/analyzed. The drop-down menu will list all images currently open in ImageJ. Alternatively, an image path may be specified by clicking *Browse* and choosing an image file. If no image is chosen, SNT will create an empty display canvas from the computed bounding box of the reconstruction file (if provided). +- **Image**/**Image file** The image to be traced/analyzed. The drop-down menu will list all images currently open in ImageJ. Alternatively, an image path may be specified by clicking *Browse* and choosing an image file. If no image is chosen, SNT will create an empty display canvas from the computed bounding box of the reconstruction file (if provided). -- **Reconstruction file** The path of the reconstruction file to be imported. SNT will automatically try to guess if there is a reconstruction file associated with the chosen image by looking at all the reconstruction files (`.traces`, `.(e)swc`, or `.json`) in the image directory, and choosing one that more {% include wikipedia title="Levenshtein distance" %} the image filename. +- **Reconstruction file** The path of the reconstruction file to be imported. SNT will automatically try fill this field by looking at all the reconstruction files (.traces, .(e)swc, .ndf, or .json) in the image directory and retrieving the filename closer to _Image file_. - **User interface** Specifies which views to display for 3D images. The default setting provides the XY, ZY, and XZ views and allows for more [accurate node placement](/plugins/snt/step-by-step-instructions#accurate-point-placement) but requires more RAM. @@ -42,50 +45,87 @@ SNT is initialized by running {% include bc path='Plugins|NeuroAnatomy|SNT...' % # Main Dialog +{% include img align="center" src="/media/plugins/snt/snt-main-gui.png" caption="Overview of main dialog (left). Note that clicking on the headings separating the different widgets will point your browser to the relevant section of this manual!" %} + ## Menu Commands ### File - Lists commands for I/O operations. Most are self-explanatory. Noteworthy: -- {% include bc path='Choose Tracing Image| ' %} Specifies the image to trace on without having to restart SNT. To trace on an image currently open in ImageJ, use *From Open Image...*. A prompt with the currently open images will appear, allowing selection of one. To browse for an image file, use *From File...*. You should toggle the *validate spatial calibration* checkbox to ensure the image to be imported is compatible with the existing one. +- **{% include bc path='Choose Tracing Image| ' %}** Specifies the image to trace on without having to restart SNT. To trace on an image currently open in ImageJ, use *From Open Image...*. A prompt with currently open images will appear, allowing selection of one. To browse for an image file, use *From File...*. You should toggle the *validate spatial calibration* checkbox to ensure the image to be imported is compatible with the existing one. - +- **{% include bc path='Autotrace Segmented Image...| ' %}** If you have a binary mask of the image you want to trace saved to disk (i.e., a pre-processed version of the image in which background pixels have been zeroed), you can use this command to attempt automatic reconstruction. This is similar to {% include bc path='Utilities | Extract Paths from Segmented Image... ' %} but uses file paths as input. See [Full-automated tracing walkthrough](/plugins/snt/step-by-step-instructions#full-automated-tracing) for details. -- {% include bc path='Import| Labels (AmiraMesh)...' %} This option assumes you are tracing on the same spatial coordinates of an annotated neuropil, for which compartments have been segmented (*labeled*) and stored in an [Amira](https://amira.zib.de/) labels file. Once loaded, SNT will report the name of the compartments in the ImageJ status bar when hovering over the image. +- **{% include bc path='Load Tracings| ' %}** Imports of neuronal reconstructions from multiple sources, including: -- {% include bc path='Import| Remote Databases| ' %} Allows import of neuronal reconstructions from the [FlyCircuit](http://www.flycircuit.tw/), [MouseLight](https://ml-neuronbrowser.janelia.org/) and [NeuroMorpho](http://neuromorpho.org/) remote databases. + - **{% include bc path='Local Files' %}** [TRACES](/plugins/snt/faq#in-which-format-should-i-save-my-tracings-traces-or-swc), [SWC](/plugins/snt/faq#what-is-a-swc-file) (single files or bulk import of a directory of files), NDF ([NeuronJ](/plugins/neuronj) data format), or JSON. -- {% include bc path='Export As| SWC| ' %} Allows export of all traced paths in the [SWC](/plugins/snt/faq#what-is-a-swc-file) file format, the most common format for representing neuronal reconstructions. Note that you can also export subsets of paths using the [Path Manager](#path-manager). + - **{% include bc path='Remote Databases' %}** Import of neuronal reconstructions from [FlyCircuit](http://www.flycircuit.tw/), [InsectBrain](https://insectbraindb.org/app/), [MouseLight](https://ml-neuronbrowser.janelia.org/), and [NeuroMorpho](http://neuromorpho.org/). -- {% include bc path='Save Measurements...' %} Allows export of measurements generated by the *Measure...* and *Quick Measurements* commands in the {% include wikipedia title="Comma-separated values" %} file format. +{% capture dnd %} +All SNT dialogs (including the _Neuroanatomy Shortcut Window_ support drag-and-drop: E.g., you can import SWC files just by dragging and dropping them either into the main SNT dialog or the Path Manager. +{% endcapture %} +{% include notice icon="info" content=dnd %} -
- -
+- **{% include bc path='Load Labels (AmiraMesh)...' %}** This option assumes you are tracing on the same spatial coordinates of an annotated neuropil for which compartments have been segmented (*labeled*) and stored in an [Amira](https://amira.zib.de/) labels file. Once loaded, SNT will report the name of the compartments in the ImageJ status bar when hovering over the image. + +- **{% include bc path='Load Demo Dataset...' %}** Loads a demo dataset (a tracing image, a reconstruction, or both). Use this to familiarize yourself with the software. + +- **{% include bc path='Save Tracings|' %}** Options to save/export all of traced paths in the SWC and TRACES formats. Note that it is also possible to export subsets of paths using the [Path Manager](#path-manager). +This menu also includes controls to create _SNAPSHOT BACKUPS_. To use this feature: + +{% include img src="/media/plugins/snt/snt-recover-from-snapshot.png" align="right" width="300px" %} + 1. Trace one more paths + 2. Save them to a local file using {% include key key='ctlcmd|S' %} ({% include bc path='File|Save Tracings|Save' %}) + 3. Keep tracing paths. When pertinent, press {% include key key='ctlcmd|Shift|S' %} ({% include bc path='Save Tracings|Save Snapshot Backup' %}) to save current progress to a timestamped backup file + 4. Reinstate progress from backed up data using {% include bc path='File|Restore Snapshot Backup' %}, which allows you to go 'back in time': + +- **{% include bc path='Save Tables & Analysis Plots...' %}** Allows saving of any measurements and plots generated by analysis commands. Tables are saved in the {% include wikipedia title="Comma-separated values" %} file format. -- {% include bc path='Reset SNT and Restart...' %} Resets all preferences and restarts SNT. +- **{% include bc path='Reveal Directory| ' %}** Convenience shortcuts to reveal common directories (scripts, backups, folder of image being traced, etc.) in the native file explorer. + +- **{% include bc path='Reset SNT and Restart...' %}** Resets all preferences and restarts SNT using default options. ### Analysis -- {% include bc path='Path Order Analysis' %} Produces a table and plot from morphometric statistics on the group of paths associated with each Branch Order. See [1](/plugins/snt/analysis#path-order-analysis) for details. +- **{% include bc path='Convex Hull' %}** See [Analysis › Convex hull Analysis](/plugins/snt/analysis#convex-hull-analysis). + +- **{% include bc path='Path Order Analysis' %}** See [Analysis › Path Order Analysis](/plugins/snt/analysis#path-order-analysis). + +- **{% include bc path='Path Properties: Export CSV...' %}** Allows export of information regarding individual Paths (morphometrics, neurite compartments, linkage relationships to other Paths, start and end coordinates, etc.). -- {% include bc path='Sholl Analysis...' %} Brings up the [Sholl Analysis](/plugins/sholl-analysis) dialog with a pre-defined set of focal points the user can choose from. See [2](/plugins/snt/analysis#sholl-analysis) for details. +- **{% include bc path='Brain Area Analysis' %}** Summarizes projection patterns across brain areas. See [Analysis › Graph-based Analysis](/plugins/snt/analysis#graph-based-analysis) for details. -- {% include bc path='Sholl Analysis (by Focal Point)...' %} Allows precise positioning of the focal point used by Sholl Analysis. See [3](/plugins/snt/analysis#sholl-analysis-by-focal-point) for details. +- **{% include bc path='Sholl Analysis...' %}**/**{% include bc path='Sholl Analysis (by Focal Point)...' %}** See [Analysis › Sholl Analysis](/plugins/snt/analysis#sholl-analysis). -- {% include bc path='Strahler Analysis' %} Conducts [Strahler Analysis](/plugins/strahler-analysis) on existing paths, producing a table of analysis results and a Strahler plot. See [4](/plugins/snt/analysis#strahler-analysis) for details. +- **{% include bc path='Strahler Analysis...' %}** See [Analysis › Strahler Analysis](/plugins/snt/analysis#strahler-analysis). -- {% include bc path='Export CSV Properties...' %} Allows export of information regarding individual Paths, including (but not limited to) morphometrics, neurite compartments, linkage relationships to other Paths and start and end coordinates. -- {% include bc path='Measure...' %} Provides a comprehensive selection of measurements to apply to one connected component (i.e., rooted tree structure) from the Path Manager. See [5](/plugins/snt/analysis#measurements) for details. +- **{% include bc path='Measure...' %}** Provides a comprehensive selection of measurements to apply to one connected component (i.e., rooted tree structure) from the Path Manager. See [Analysis › measurements](/plugins/snt/analysis#measurements) for details. + +- **{% include bc path='Quick Measurements|' %}** Shortcut for running {% include bc path='Measure...' %} with common metrics. -- {% include bc path='Quick Measurements|' %} Shows a table with summary statistics for all existing paths. To measure only selected paths, use {% include bc path='Analyze|Measure' %} in the Path Manager. See [6](/plugins/snt/analysis#measurements) for details. ### Utilities -- {% include bc path='Reconstruction Plotter...' %} Plots a dynamic 2D projection of all existing paths. A control panel is included which allows adjustment of the spatial orientation of the tracing. If paths are assigned color tags, use {% include bc path='Actions|Render final (colorized) plot' %} from the control panel to render the (static) plot with color-mapped paths, with the final orientation matching that of the dynamic plot. +#### Command Palette +{% include img src="/media/plugins/snt/command-palette.png" align="right" width="450px" %} +The Command Palette is the fastest way to access actions and discover their respective shortcuts: +1. Press {% include key keys='ctlcmd|Shift|P' %} in either SNT or [Reconstruction Viewer](/plugins/snt/reconstruction-viewer) +2. Start typing to filter actions, scripts and available commands +3. Press {% include key keys='up' %} or {% include key keys='down' %} to select a command (or use the {% include key keys='mouse wheel' %}) +4. Press {% include key keys='Enter' %} to run it. If the record button is toggled, executed commands are recorded by the [Script Recorder](/plugins/snt/scripting#script-recorder). + + +#### Reconstruction Plotter + The _Reconstruction Plotter_ is a whole-purpose 2D viewer for neuronal reconstructions by plotting 2D projections of traced paths. A control panel allows for adjustment of the spatial orientation of the tracing. By default, the plot is monochrome. If paths are assigned color tags, or the structure has been color-coded use {% include bc path='Actions|Render final (colorized) plot' %} from the control panel to render a (static) plot with color-mapped paths, with the final orientation matching that of the dynamic plot. + +Features of _Reconstruction Plotter_ include: +- Dark/light theme (controls in plotter's contextual menu) +- Export as SVG +- Color legends when color mappings are present +- Can be combined in multi-panel viewers (mainly via scripting)
SNT-Reconstruction-Plotter-Example.png @@ -93,9 +133,15 @@ Lists commands for I/O operations. Most are self-explanatory. Noteworthy: SNT-Reconstruction-Plotter-Colored.png
-- {% include bc path='Compare Reconstructions...' %} Allows morphometric comparison of two single reconstruction files or multiple groups of reconstruction files. See [Comparing Reconstructions](/plugins/snt/analysis#comparing-reconstructions) for details. -- {% include bc path='Create Dendrogram' %} Generates a Dendrogram plot of a connected component (i.e, one rooted tree structure in the Path Manager). See [Dendrogram Viewer](/plugins/snt/analysis#dendrogram-viewer) for details. -- {% include bc path='Batch Scripts| ' %} A collection of batch processing scripts related to image processing, reconstruction analysis and data curation. See [Script Templates: Batch](/plugins/snt/scripting#batch) for details. +- **{% include bc path='Compare Reconstructions/Cell Groups...' %}** Allows morphometric comparisons of two single reconstruction files or multiple groups of reconstruction files (including statistical reports and two-sample t-test/one-way ANOVA analysis). Color-coded montages of analyzed groups can also be generated. See [Comparing Reconstructions](/plugins/snt/analysis#comparing-reconstructions) for details. + +- **{% include bc path='Create Dendrogram' %}** Generates a Dendrogram plot of a connected component (i.e, one rooted tree structure in the Path Manager). See [Analysis › Graph-based Analysis](/plugins/snt/analysis#graph-based-analysis) for details. + +- **{% include bc path='Create Annotation Graph...' %}** See [Analysis › Graph-based Analysis](/plugins/snt/analysis#graph-based-analysis) for details. + +- **{% include bc path='Extract Paths from Segmented Image...' %}** Similar to {% include bc path='File|Autotrace Segmented Image...| ' %} but using image(s) already open as input. See [Full-automated tracing walkthrough](/plugins/snt/step-by-step-instructions#full-automated-tracing) for details. + +- **{% include bc path='Batch Scripts| ' %}** A collection of batch processing scripts related to image processing, reconstruction analysis and data curation. See [SNT Scripts: Batch](/plugins/snt/scripting#batch) for details. ### Scripts @@ -105,139 +151,137 @@ See [SNT: Scripting](/plugins/snt/scripting). ### View -Contains commands for organizing tracing views on screen, plus commands for displaying cached data used for auto-tracing. +Contains commands for organizing tracing views on screen, plus commands for displaying cached data used for computation of paths. -- {% include bc path='Arrange Views' %} Resets the view pane on-screen positions to their default. +- **{% include bc path='Arrange Tracing Views' %}** Resets the view pane on-screen positions to their default. -- {% include bc path='Hide Tracing Canvas| ' %} Allows toggling of the visibility of the three orthogonal view panes as well as the Legacy 3D View window. +- **{% include bc path='Hide Tracing Canvas| ' %}** Allows toggling of the visibility of the three orthogonal view tracing panes as well as the Legacy 3D View window. -- {% include bc path='Show Cached Filtered Image' %} Displays the cached filtered image in a separate window. Note a filtered image must be loaded in order to use this feature. The process of loading a filtered image is detailed in [Generating Filtered Images](/plugins/snt/step-by-step-instructions#generating-filtered-images). +- **{% include bc path='Display Secondary Image' %}** Displays the cached filtered image being used as secondary tracing layer. -- {% include bc path='Show Cached Hessian Tubeness Image' %} Displays the cached *Hessian (Tubeness) image* in a separate window. Note there are two ways to enable this feature. Either 1) enable *Hessian-based analysis* then run the *Cache All Hessian Computations* command from the "Auto-tracing" gear drop-down menu or 2) use the *Load Precomputed "/plugins/tubeness" Image* option in the same gear menu. These features are detailed in the "Auto-tracing" section of the [Main Dialog](/plugins/snt/manual#main-dialog) overview guide. +- **{% include bc path='Toggle Fiji Console' %}** Toggles the visibility of Fiji's Console. The console displays errors and exceptions as well as informational messages when _Debug mode_ is activated. ## Main Tab This *home* tab aggregated widgets for tracing and frequent operations. +### Data Source + +If tracing on a multi-dimensional image (i.e., one with multiple data channels and/or a time axis), a particular channel/frame can be loaded into the views by selecting each and pressing the "Reload" button. + ### Cursor Auto-snapping **Enable Snapping checkbox** If active (the default) the cursor snaps to the brightest voxel in its vicinity (Toggling shortcut: {% include key key='S' %}). To accomplish this, SNT takes the cuboid of the specified dimensions (in pixels) centered on the current cursor position and searches quickly for local maxima in that neighborhood, moving the cursor to that position. The Z-plane in which the maximum was found is automatically selected if the "Z" parameter is greater than 0. Noteworthy: - + -- This feature assumes the signal is brighter than the background as typically found in fluorescent images. + - This feature assumes the signal is brighter than the background as typically found in fluorescent images. -- If multiple maxima exist (e.g., when the signal is saturated), it snaps to their centroid. + - If multiple maxima exist (e.g., when the signal is saturated), it snaps to their centroid. -- To streamline the computation: XYZ dimensions are constrained to even numbers and limited range. + - To streamline the computation: XYZ dimensions are constrained to even numbers and limited range. -- Snapping occurs in 2D (i.e., in the active plane) if Z=0. + - Snapping occurs in 2D (i.e., in the active plane) if Z=0. -- The XZ, ZY views are synchronized when 3D snapping is active (i.e., Z>0). + - The XZ, ZY views are synchronized when 3D snapping is active (i.e., Z>0). -- This functionallity was inspired by NeuronJ, that described it like this in its manual: + - This functionality was inspired by NeuronJ, that described it like this in its manual: > 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. ### Auto-tracing - -- **Enable A\* search algorithm** By default, SNT uses the {% include wikipedia title="A* search algorithm" text="A* search" %} to automatically trace paths between two manually selected points. To manually place nodes in a path, toggle this feature off. Note that it is also possible to enable other algorithms through the installation of SNT add-ons. See [Tubular Geodesics](/plugins/snt/tubular-geodesics) for details. + +- **Enable A\* search algorithm** By default, SNT uses the {% include wikipedia title="A* search algorithm" text="A* search algorithm" %} to automatically trace paths between two manually selected points. To manually place nodes along a path, toggle this feature off. Note that it is also possible to enable other built-in algorithms or algorithms provided by external SNT add-ons. Current options include: -- **Hessian-based analysis** (Toggling shortcut: {% include key key='H' %}) A quick way to improve the quality and efficiency of the pathfinding is to enable this feature, in which paths are computed after filtering the image for tube-like structures. Upon such filtering, SNT will use a measure of [Tubeness](/plugins/tubeness) at each point of the image to define the best path through it, based on eigenvalues and eigenvectors of the {% include wikipedia title="Hessian matrix" %}. The later can be used to infer the likelihood that a point in the image belongs to a tube-like structure. This concept is also known as *vesselness* or *neuriteness*. + - **A\* search**: Canonical and proven implementation of the historic algorithm, ported from [Simple Neurite Tracer](/plugins/snt/faq#what-is-the-difference-between-snt-and-simple-neurite-tracer) -- **Hessian options** (Specified in the *gear* drop-down menu) may be chosen *Manually* (if you already have a quantitative understanding of the image) or *Visually* (generally more intuitive). Hessian analysis requires two parameters to be specified: + - **NBA\* search (New Bidirectional A\*)**: [Newer implementation](https://repub.eur.nl/pub/16100/ei2009-10.pdf) of A* expected to be faster than original but not as thoroughly tested -- **Sigma** Controls the spatial scale of the filter. A lower *sigma* (σ) will capture small scale structure but is more sensitive to noise. A larger σ will consider larger scale structures but is less sensitive to local shape characteristics. It is generally advised to pick a value which reflects the average radius of the structures to be traced. It corresponds to the standard deviation of the 3D Gaussian kernel used to smooth the image prior to *Tubeness* filtering -- **Maximum** The maximum pixel intensity on the *Tubeness* image beyond which the cost function for A\* search is minimized. + - **Fast marching**: Provided by [Tubular Geodesics](/plugins/snt/tubular-geodesics), an external SNT add-on - If you choose *Visually*, the dialog will prompt you to click on a representative region of the image which has meaningful structure. Once you click there, a 9-square palette is generated showing increasing values of sigma (from top-left to bottom-right) applied to that region of the image. The palette is an image stack which can be scrolled through with the mouse wheel. + Independently of the algorithm used, the gear menu in this pane provides options to tweak the performance, accuracy and footprint of the computations involved in the search. These include: - + - **Data structure** Defines how data is stored internally: Either _Map_ (slightly slower, but lower footprint), or _Array_ (slightly faster, but higher footprint) -
-
- Adjusting max (v3.0) -
- {% include img src='sigma-palette-location' width="200" caption="" %} - {% include img src="sigma-palette-max" width="200" caption="Oversaturated" %} - {% include img src="sigma-palette-mid" width="200" caption="Default" %} - {% include img src="sigma-palette-min" width="200" caption="Undersaturated" %} -
- Choosing sigma and max. parameters visually for hessian analysis from a representative region in the image (orange box). With saturated max, the cost function for A* search is equivalent across the signal. Also, note how lower sigma values cause the axon to be dimmer on the center and brighter on the edges, while higher sigma values eliminate detail from the structure. -
-
+ - **Cost Function** Auto-tracing algorithms aim to find a path to the destination node under the smallest _cost_ of deviating from the signal along a neurite. A successful search between two points is thus the _cheapest_ path with the least deviations. This is implemented through a _cost function_ in which voxels along a neurite are assigned lower costs, while voxels outside the neurite are assigned higher costs or penalties. SNT implements several _cost functions_, namely: -
-
+ - **Reciprocal of Intensity** The default, robust under a wide range of conditions -Experiment with different *Adjusted max.* values to find a setting which captures the structures you are interested in while taking care to avoid over or under-saturation. In the former case, the search might consider pixels outside of the tubular structures, giving a less accurate result. In the latter case, the search might take significantly longer, since each pixel will carry greater cost than is reasonable. It is usually safe to choose a value somewhere near the default. Once you have chosen this value, click on the square in the palette with the sigma that best fits your application (its border will turn green) then press "Apply". The parameters will be transferred to the interface and a Gaussian convolution will be run over the image, which may take some time depending on its size. Once it's done, pathfinding will occur on the Hessian (a.k.a. *Tubeness*) image. + - **Difference of Intensity** Fast on images with right-shifted histograms (mean >> 0) - + - **Difference of Intensity Squared** (Usually) Faster flavor of _Difference of Intensity_ -The {% include bc path='Estimate Radii (Local Thickness)...' %} option in the Hessian gear menu will run the *Local Thickness (complete process)* plugin found in {% include bc path='Analyze|Local Thickness|Local Thickness (complete process)' %} in the main Fiji dialog. This allows automated radii estimation of processes across the image, which can inform the choice of sigma. The user can set the Z-slice range for the analysis to consider, as well as the pixel intensity threshold (pixel values below the threshold are treated as background). + - **Probability of Intensity** Fast, specially on noisy images. To be used with 'Real-time statistics' (see below) -The parameters are: + - **Image Statistics** Successful cost functions rely on _a priori_ understanding of the image (simpler cost functions may only require access to the image minimum (dimmest intensity) and maximum (brightest intensity), but many others may need access to the image's mean, standard deviation, etc.). Options include: -- **First Z-slice** The starting slice of the image to be considered in the estimation. + - **Compute Real-Time** The default. Image statistics are computed during _each_ auto-tracing operation, along a bounding-box defined by the start and end points of the search -- **Last Z-slice** The end slice of the image to be considered in the estimation. + - **Specify Manually** Advanced option for users with if a quantitative understanding of the image. Searches may consider pixels outside neurites when maximum in over-estimated, and may take significantly longer when it is under-estimated, since each pixel will carry a greater-than-reasonable cost -- **Dimmest intensity (approx.)** Pixel values below this value are treated as background when computing the distance map. Use -1 to adopt the default cutoff value (half of the image max). + - **Compute Once** Statistics are computed once for the whole image (may take a while for large images) and stored in memory. If enough RAM is available this _may_ speed-up searches. Although in real-word usage any speed-gains relatively to _Compute Real-Time_ seem negligible on modern hardware -Pressing *OK* will output a color-mapped image (based off local radius) and a histogram showing the distribution of radii across the image. To calibrate the Hessian analysis for smaller processes, one might select a sigma value closer to the minimum estimated thickness, or the opposite for larger processes. +### Tracing on Secondary Image (Layer) + + +This is one of SNT's most advanced and useful features. The [default auto-tracing](#Auto-tracing) provides a convenient and easy way to detect structures by their likelihood of *belonging* to a tube-like structure (such as a neurite). However, it is just _one_ approach for "tube-like" classification. What if your data requires different filtering?, or you want to experiment with other approaches?, or the perfect pre-processing algorithm for your images is not yet available in SNT? *Tracing on Secondary Layer* is the answer to these questions: It allows you to feed SNT with pre-processed data on which the A\* star search will operate. Because this option can be toggled at will, it becomes a secondary _layer_ for auto-tracing: E.g., you may decide to auto-trace certain neurites on the original image, while tracing other neurites on the secondary layer. -
- - -
+For the most part the secondary layer remains hidden because feedback on auto-tracing searches is always provided in the original image. When RAM is not limited, one can ping-pong between _secondary_ and _original_ image simply, by pressing {% include key key='L' %}, the shortcut for the _Trace/Fill on Secondary **L**ayer_ checkbox. Here are some specific usages for this feature: + +- **Frangi *Vesselness* filtering** For certain datasets [Frangi](/plugins/frangi) filtering is quite effective at enhancing tubular structures. However, it is more computation intensive, and thus, less suitable to be adopted by "compute-as-needed" approaches. Thus, Frangi-filtering can be computed once for the whole image, and the result loaded as secondary layer -Other options are also available in the *gear* drop-down menu: +- **Image Processing at multiple scales** Consider a structure formed simultaneously by very thick and very thin processes (e.g. axons and dendrites). To trace structures of variable diameters more effectively, one could pre-filter a copy of the current image at multiple scales, and load the result as _secondary layer_ -{% include img align="right" src="/media/plugins/snt/original-hessian-side-by-side.png" width="350" caption="OP1 demo dataset: Tubeness image overlay at 80% opacity" %} +- **Probability maps (p-maps)** Probability maps of classified images (generated using e.g., [machine learning](/plugins/tws/)) may not be 100% accurate. We find that, in many cases it is more effective to use p-maps as secondary layers, rather than attempting fully automated p-map reconstructions that typically require time-consuming _post-hoc_ corrections -- **Cached Computations (Main/Secondary Image)** By default SNT computes the Hessian matrix on a "compute-as-you-go" basis, which saves memory but increases the pathfinding time. If you have enough RAM, you can use this set of options to compute the matrix once for the full image and cache the result, which in certain cases, can lead to almost-instantaneous searches. Note that this computation adopts the current values of sigma and max. reported in the widget, so you should adjust those before running this command. -- **Flush Cached Data** Removes cached data from memory +#### Creating Secondary layers + -- **Show Cached "Tubeness Image"** Displays the *Tubeness* data currently cached. Useful for debugging purposes. Also mirrored in {% include bc path='View | Show Cached/Loaded Hessian (Tubeness) Image' %}. +Secondary layers are created/load using the second *gear* drop-down menu in the auto-tracing panel. The most common way to create a new layer is by calling the _Secondary Layer Creation Wizard_: +The wizard needs two types of information from the user: The type of filtering operation and the size(s) (scale(s)) of the structures being traced, which control the spatial scale of the filter (known as σ). +- **Filter** The filtering operation, including *Frangi*, *Tubeness*, *Gaussian blur* and *Median*. Note rh. -### Tracing on Secondary Image + - **Tubeness** This corresponds to the _Hessian-based analysis_ of older SNT versions. This filter enhances tube-like structures in the image, using an improved [Tubeness](/plugins/tubeness) approach, modified to support multiple scale(s) -This is one of SNT's most advanced features. [Hessian-based analysis](#Auto-tracing) provides a convenient and easy way to perform auto-tracing on pre-processed data in which voxels defining the traced structure are scored by their likelihood of *belonging* to a tube-like structure. However, it is just one approach for "tubeness" classification. What if your data requires different filtering?, or you want to experiment with other approaches?, or the perfect pre-processing algorithm for your images is not yet available in ImageJ? *Tracing on Secondary Image* is the answer to these questions: It allows you to feed SNT with pre-processed data on which the A\*star search will operate. Here are two specific usages for this option: + - **Frangi vesselness** A proven and consistent strategy for filtering tube-like structures. Described in [Frangi](/plugins/frangi) -- **Frangi *Vesselness* filtering** For certain datasets Frangi filtering ([Frangi et al. 1998](https://link.springer.com/content/pdf/10.1007%252FBFb0056195.pdf)) is more effective than [Tubeness](/plugins/tubeness) at enhancing tube-like structures in the image. However, it is more computation intensive, and thus, less suitable to be adopted by the "compute-as-needed" approach used in Hessian-based analysis. Thus, one can import a pre-computed Frangi-filtered image using this option. + - **Median** Filter for noise removal able to preserve neurite edges. Note that _Median_ accepts only one σ value, i.e., a single scale. -- **Hessian-analysis at multiple scales** Let's consider a structure formed simultaneously by very thick and very thin processes (e.g. axons and dendrites). To trace it one would need to adjust continuously the sigma parameter while tracing. Instead, to trace structures of variable diameters more effectively, one could load a copy of the current image as *secondary image*, and assign different hessian parameters to both images. + - **Gaussian blur** Filter for noise removal, capable of gentle smoothing with some ability to preserve neurite edges, specially under small σ values. -- **Adopting probability maps** Pre-classified images (using e.g., machine learning) could also be loaded here. -Importantly, this option can be toggled at will, during tracing. Indeed, one can ping-pong between *secondary image* and main image simply, by pressing {% include key key='I' %}, the shortcut for the *Trace on Secondary **I**mage* checkbox. +- **Scale(s)** Also known as _sigmas_ (σ). These should reflect average radii of the structures being traced. If smaller values are specified, the filter becomes more sensitive to noise. Larger values on the other hand, make the filtering operation less sensitive to local shape characteristics. There are two ways to select this values: -**Secondary Image options** can be specified in the *gear* drop-down menu, including commands for Loading/displaying the image file and the powerful *Generate Secondary Image* command: + - **Select visually...**: The wizard will prompt you to click on a representative region of the image which has a meaningful structure. Once you click there, a preview palette is generated showing increasing values of σ (from top-left to bottom-right) applied to that region of the image. Select the suitable scales - - + - **Estimate programmatically...**: This allows automated estimation of radii across the image, which can inform the choice of scale(s). The only parameter required is _Dimmest intensity (approx.)_: Pixel values below this value are treated as background when computing thicknesses. Use -1 to adopt the default cutoff value (half of the image max). After pressing *OK*, a color-mapped image (based off local radius) and a histogram showing the distribution of radii across the image are shown. The histogram can be used to validate values chosen _visually_ in the preview palette. -- **Load Specified File** Loads the filtered image specified in the *File* textbox. + NB: Analysis is performed via the *Local Thickness (complete process)* plugin ({% include bc path='Analyze|Local Thickness|Local Thickness (complete process)' %} in Fiji's menu bar). -- **Generate Secondary Image** Enables processing of the currently open image directly from SNT. Three routines are currently supported: *Frangi*, *Frangi (without Gaussian)* and *Tubeness*. Supports saving and display of the resulting image. To use the currently open image as the secondary image, choose *None. Duplicate Primary Image*. Noteworthy: It is assumed that the current sigma value in the Auto-tracing widget reflects the size of structures to be filtered. If that is not the case, the sigma should be adjusted before running this command. +NB: The wizard also allows you use a backup copy of the image being traced as secondary layer. This is only useful if you intend to modify the original image during a tracing session, but want to have convenient access to the initial image at a later time. -- **Adjust Min-Max** Sets the range of pixel intensities used by A\* search. -- **Show Cached image** Displays the currently loaded filtered image in a separate window. +
+ +
+Secondary Layer Wizard.
+Left: Visual selection of filtering kernel(s) using the Sigma palette. The palette features its own offline manual accessible by pressing H or F1. Right: Programmatic estimation of radii across the whole image using local thickness. +
+#### Loading Secondary layers -- **Show Path in File Explorer** Opens the directory containing the filtered image specified in the *File* textbox in the File Explorer GUI. +The second *gear* drop-down menu in the auto-tracing panel also allows for importing secondary images processed elsewhere: Either from a file or an image already open in Fiji. See the [Generating Filtered Images](/plugins/snt/step-by-step-instructions#generating-filtered-images) walk-through for more details. -See the [Generating Filtered Images](/plugins/snt/step-by-step-instructions#generating-filtered-images) walk-through for more details. +The same menu also provides options to import a [Weka](/plugins/tws) model. In the latter, the model is applied to the image being traced, and the resulting 'p-map' is loaded as secondary layer. ### Filters for Visibility of Paths - + By default, all the nodes of a path are projected onto the current Z-slice. This is useful to see how much has been completed and gives a sense of the overall structure of the reconstruction. However, SNT provides three additional visibility options for paths: 1. **Only selected paths (hide deselected)** Only show paths that have been manually selected in the Path Manager or with the {% include key key='G' %} key ({% include key keys='Shift|G' %} to select multiple paths). @@ -251,7 +295,6 @@ Any combination of these options may be toggled simultaneously. Note that these ### Default Path Colors - By default, finished paths are colored by their selection status (only selected paths can be edited, or extended). The default colors are Green (selected paths) and Magenta (deselected). Default colors can be customized by pressing the respective button in the widget and using the {% include wikipedia title="CMYK color model" %}. For customizing unconfirmed and temporary paths, see the *Colors* option in the [UI Interaction](#ui-interaction) widget. @@ -270,22 +313,17 @@ The [Path Manager](#path-manager) offers several ways to colorize Paths: {% include img src="color-tag-result" width=158 %} {% include img src="color-tag-result-image" width=221 %} - -Note that Path Manager commands are applied to all paths if no paths are selected. {% endcapture %} {% include notice icon="info" content=tip %} + ## Options Tab This tab aggregated widgets for advanced settings. -### Data Source - -If tracing on a multi-dimensional image (i.e., one with multiple data channels and/or a time axis), a particular channel/frame can be loaded into the views by selecting each and pressing the "Reload" button. - ### Views - + - **Overlay MIP(s) at X% opacity** Overlays the {% include wikipedia title="Maximum intensity projection" %} of the image "over" the image canvas at the specified opacity. The overlaid projection is only used as a visualization aid and is ignored by the auto-tracing algorithms. It is rendered using the LUT of the channel currently being traced. To reload the overlay (e.g., in case the image being traced changes during a tracing session) toggle the checkbox twice.
@@ -306,50 +344,60 @@ If tracing on a multi-dimensional image (i.e., one with multiple data channels a - **Display ZY/XZ views** If currently using the XY only view, display the ZY and XZ views as well. -### Temporary Paths - +### Temporary Paths - **Confirm temporary segments** If active, prompts for either confirmation or denial of whether or not to keep an unconfirmed path segment. If inactive, automatically confirms the path segment created on each subsequent node placement after starting a path. Applies to both auto-traced and manually traced path segments. The following two settings are only toggle-able when this setting is active. - **Pressing 'Y' twice finishes path** Finish a temporary path on two successive {% include key key='Y' %} key presses. + - **Pressing 'N' twice cancels path** Discard a temporary or unconfirmed path, including the start node, on two successive {% include key key='N' %} key presses. -### UI Interaction - +### UI Interaction - **Colors** Specifies how components should be rendered, including: + - **Canvas annotations** The label shown on the top-left corner of the views indicating the state of the UI ("Tracing Paused", "Choosing Sigma", etc.) + - **Fills** The pixels that have been reached by the Fill search + - **Unconfirmed** and **Temporary** paths. - **Path nodes rendering scale** Adjusts the radius of the drawn circles representing path nodes. A path node is rendered as a circle centered at the XYZ coordinate of the point annotation. The default scale is inferred from the current zoom level. - **Activate canvas on mouse hovering** If active, moving the mouse cursor over the any of the views automatically brings the view window into focus, allowing it to receive input. + ### Misc - **Skip confirmation dialogs** If active, disables the "*Are you sure?*" prompt preceding major actions. Note that this option does not apply to irreversible actions such as deleting paths. + - **Debug mode** If active, logs detailed information about actions in the console. + - **Preferences...** Allows setting other options, namely: + - Whether the position of dialogs should be remembered across restarts + - Whether {% include wikipedia title="Gzip" %} compression (lossless) should be used to reduce the storage footprint of ".traces" files. + - The max number of parallel threads to be used by SNT, as specified in ImageJ's {% include bc path='Edit|Options|Memory & Threads...' %} + - *Reset All Preferences...* Resets all options to their default values. A restart of SNT may be required for changes to take effect. + ## 3D Tab - + This tab aggregates widgets related to 3D interaction. ### Reconstruction Viewer -The [Reconstruction Viewer](/plugins/snt/reconstruction-viewer) is an advanced, fully scriptable OpenGL viewer enabling 3D visualization and interaction with reconstructions, OBJ meshes (including multiple model organism neuropil annotations and reference brains), computed surfaces (convex hulls) and other shape annotations. For performance reasons, some Path Manager changes may need to be synchronized manually from the RV controls. To open Reconstruction Viewer with the current contents of the Path Manager, press *Open Reconstruction Viewer*. To instead open the viewer as a standalone application, go to {% include bc path='Plugins|NeuroAnatomy|Reconstruction Viewer...' %} in the main Fiji dialog. +The [Reconstruction Viewer](/plugins/snt/reconstruction-viewer) is an advanced, fully scriptable OpenGL viewer enabling 3D visualization and interaction with reconstructions, OBJ meshes (including multiple model organism neuropil annotations and reference brains), computed surfaces (convex hulls) and other shape annotations. For performance reasons, some Path Manager changes may need to be synchronized manually from the RV controls. To open Reconstruction Viewer with the current contents of the Path Manager, press *Open Reconstruction Viewer*. To instead open the viewer press _Reconstruction Viewer_ on the [Shortcuts](#startup) dialog. ### sciview -[sciview](/plugins/sciview) is IJ2's modern replacement for the Legacy 3D Viewer, providing sophisticated 3D visualization and virtual reality capabilities for arbitrarily large image volumes and meshes. Since it is fully integrated with SNT, sciview can enhance tracing, analysis and visualization routines by providing a deeper, more contextualized view of the imagery at hand. Additionally, native integration with [Cx3D](https://github.com/morphonets/cx3d) enables simulation of neurodevelopmental processes, including neuronal growth and formation of cortical circuits. See [SNT: Modeling](/plugins/snt/modeling) for details. +This option assumes you have [sciview](/plugins/sciview) properly installed. sciview is a modern replacement for the Legacy 3D Viewer, providing sophisticated 3D visualization and virtual reality capabilities for arbitrarily large image volumes and meshes. Integration with [Cx3D](https://github.com/morphonets/cx3d) enables simulation of neurodevelopmental processes, including neuronal growth and formation of cortical circuits. See [SNT: Modeling](/plugins/snt/modeling) for details. ### Legacy 3D Viewer @@ -358,37 +406,48 @@ The Legacy 3D Viewer is a functional tracing canvas but it depends on outdated s # Contextual Menu -Contextual menu -Right-clicking on any of the image views will bring up a menu with various editing tools. The corresponding keyboard shortcuts are shown to the right of each option. +{% include img align="left" width="250" name="contextual menu" src="/media/plugins/snt/snt-contextual-menu.png" %} + +Right-clicking on any of the tracing views will bring up a menu with various editing tools. The corresponding [keyboard shortcuts](/plugins/snt/key-shortcuts) are shown to the right of each option. The list includes: + +**Select Nearest Path** {% include key key='G' %} or {% include key keys='Shift|G' %} Will select the path closest to the mouse cursor. -- **Select Nearest Path** {% include key key='G' %} or {% include key keys='Shift|G' %} Will select the path closest to the mouse cursor. +**Fork at Nearest Node** {% include key keys='Shift|Alt|Left Click' %} Creates a fork point at the node closest to the mouse cursor. Once a fork point is made, the branch may be extended as described in [Step-By-Step Instructions](/plugins/snt/step-by-step-instructions#branching-start-a-path-on-an-existing-path). -- **Fork at Nearest Node** {% include key keys='Shift|Alt|Left Click' %} Creates a fork point at the node closest to the mouse cursor. Once a fork point is made, the branch may be extended as described in [Step-By-Step Instructions](/plugins/snt/step-by-step-instructions#branching-start-a-path-on-an-existing-path). +**Continue Extending Path** Allows continued tracing of previously finished paths. Note only one path may be extended at a time. To extend a path: first select it, choose this option, then place additional nodes as shown in [Step-By-Step Instructions](/plugins/snt/step-by-step-instructions#ii-pick-a-subsequent-point). -- **Continue Extending Path** Allows continued tracing of previously finished paths. Note only one path may be extended at a time. To extend a path: first select it, choose this option, then place additional nodes as shown in [Step-By-Step Instructions](/plugins/snt/step-by-step-instructions#ii-pick-a-subsequent-point). +**Pause SNT** Waives all keyboard and mouse inputs to ImageJ, allowing you to interleave image processing routines with tracing operations. Note that if the image contents change while SNT is paused, the image should be reloaded so that SNT is aware of the changes. Tracing views are annotated with the *SNT Paused* [label](#ui-interaction) to indicate this state. -- **Pause SNT** Waives all keyboard and mouse inputs to ImageJ, allowing you to interleave image processing routines with tracing operations. Note that if the image contents change while SNT is paused, the image should be reloaded so that SNT is aware of the changes. Tracing views are annotated with the *SNT Paused* [label](/plugins/snt/manual#ui-interaction) to indicate this state. +**Pause Tracing** Disables tracing functions until this option is deselected. Tracing views are annotated with the *Tracing Paused* [label](/plugins/snt/manual#ui-interaction) to indicate this state. -- **Pause Tracing** Disables tracing functions until this option is deselected. Tracing views are annotated with the *Tracing Paused* [label](/plugins/snt/manual#ui-interaction) to indicate this state. +**Sholl Analysis at Nearest Node** {% include key keys='Shift|Alt|A' %} Described in [Analysis › Sholl Analysis (by Focal Point)](/plugins/snt/analysis#sholl-analysis-by-focal-point). -- **Sholl Analysis at Nearest Node** {% include key keys='Shift|Alt|A' %} Runs the [Sholl Analysis](/plugins/sholl-analysis) plugin found in {% include bc path='Analyze|Sholl|Sholl Analysis (From Tracings)' %}. Note the *Center* parameter, which sets the center point of the analysis, is left out as this value is given by the selected node. ### Editing Paths -Pressing *Edit Path* with a single path selected will activate *Edit Mode*, allowing use of the menu options under the *Edit Path* option. When *Edit Mode* is active, moving the mouse cursor along the path will activate the nearest node and synchronize the current Z-slice to the location of that node. Note that the ability to create new paths is temporarily disabled when in *Edit Mode*. +Pressing *Edit Path* with a single path selected will activate *Edit Mode*, allowing use of the menu options under the *Edit Path* option. When *Edit Mode* is active, moving the mouse cursor along the path will activate the nearest node and synchronize the current Z-slice to the location of that node. Note that the ability to create new paths is temporarily disabled when in *Edit Mode*. The list of editing commands includes: + +- **Reset Active Node** Clears the active node under the cursor. + +- **Delete Active Node** {% include key key='D' %} Permanently removes the active node from the path. -- **Reset Active Node** Clears the active node from the cursor. -- **Delete Active Node** {% include key key='D' %} or {% include key key='Backspace' %} Permanently removes the active node from the path. - **Insert New Node At Cursor Position** {% include key key='I' %} Inserts a new node at the cursor position. The inserted node is placed between the active node and its parent. + - **Move Active Node to Cursor Position** {% include key key='M' %} Moves the active node to the cursor position. + - **Bring Active Node to Current Z-plane** {% include key key='B' %} Moves the active node to the active Z-plane. Note that the translation is only done in Z. XY positions are unchanged. -- **Connect To (Start Join)** Allows two existing paths to be [merged or joined](/plugins/snt/step-by-step_instructions#mergingjoining-paths). + +- **Connect To (Start Join)** Allows two existing paths to be [merged or joined](/plugins/snt/step-by-step-instructions#mergingjoining-paths). + # Path Manager -![Path Manager](/media/plugins/snt/) The Path Manager dialog displays all existing paths in a hierarchical structure (tree), where one path is "primary" (path 0) and all other paths (paths 1...N) are children of the primary path. The dialog also contains several menus with various editing, tagging, refinement/fitting, filling and analysis options. Paths can be searched by name and/or tags in the text filter, with more sophisticated search capabilities in the Advanced Filtering Menu. +![Path Manager](/media/plugins/snt/) The Path Manager dialog displays all existing paths in a hierarchical structure (tree), where one path is "primary" or "root" (path 0) and all other paths (paths 1...N) are children of the primary path. This pattern repeats for each cell being traced. The dialog also contains several menus with various editing, tagging, refinement/fitting, filling and analysis options. Paths can be searched by name and/or tags in the text filter, with more sophisticated search capabilities in the Advanced Filtering Menu. + +{% include notice icon="info" content="Path Manager commands are applied to all paths if no paths are selected." %} + ## Menu Commands @@ -396,18 +455,33 @@ Pressing *Edit Path* with a single path selected will activate *Edit Mode*, allo -- {% include bc path='Delete...' %} Removes selected Path(s) from the Path Manager. If no Paths are selected, all Paths are deleted. -- {% include bc path='Rename...' %} Renames the selected Path. Only one Path may be renamed at a time. -- {% include bc path='Make Primary' %} Makes the selected Path the primary Path, moving it to the top of the tree hierarchy. Note that this will alter parent-child relationships between Paths and, by consequence, individual nodes. -- {% include bc path='Disconnect...' %} Disconnects the selected Path from all of its connected Path(s) (Undoable operation). -- {% include bc path='Merge...' %} Merges the selected Paths (at least two) into one. Note the starting node of Path *i* is merged to the endpoint of Path *i+1*. -- {% include bc path='Specify Radius...' %} Assigns a constant radius to all the nodes of selected Path(s). This setting only applies to unfitted Paths and overrides any existing values. -- {% include bc path='Ramer-Douglas-Peuker Downsampling...' %} Given an inputted maximum permitted distance between adjacent nodes, performs {% include wikipedia title="Ramer–Douglas–Peucker algorithm" %} downsampling on the selected Path(s). +- **{% include bc path='Delete...' %}** Removes selected Path(s) from the Path Manager. If no Paths are selected, all Paths are deleted. + +- **{% include bc path='Duplicate...' %}** Duplicates the selected path. Only one Path my be duplicated at a time + +- **{% include bc path='Rename...' %}** Renames the selected Path. Only one Path may be renamed at a time. Path names are expected to be unique. + +- **{% include bc path='Merge Primary Path(s) into Shared Root' %}** Takes two or more primary paths and merges them into a common root node placed at the centroid defined by starting nodes of the primary paths to be merged. This is useful, e.g., when all the paths around a soma have been traced without passing through it. Note that this will alter parent-child relationships between Paths and, by consequence, individual nodes. + +- **{% include bc path='Combine...' %}** Combines two or more _disconnected_ paths into one (undoable operation) + +- **{% include bc path='Concatenate...' %}** Concatenates two or more paths into a single un-branched segment. + +- **{% include bc path='Disconnect...' %}** Disconnects the selected Path from all of its connected Path(s) (Undoable operation). + +- **{% include bc path='Specify Radius...' %}** Assigns a constant radius to all the nodes of selected Path(s). This setting only applies to unfitted Paths and overrides any existing values. + +- **{% include bc path='Specify No. Spine\Varicosity Markers...' %}** Assigns the no. of markers (e.g., spines or varicosities) to be associated to selected path(s) + +- **{% include bc path='Ramer-Douglas-Peuker Downsampling...' %}** Given an inputted maximum permitted distance between adjacent nodes, performs {% include wikipedia title="Ramer–Douglas–Peucker algorithm" %} downsampling on the selected Path(s). + +- **{% include bc path='Rebuild...' %}** Resets all Path IDs and recompute connectivity for all paths. Useful to reset ill-relationships created from mis-editing paths. + ### Tag -Assigns tags to Paths. Tags are organized in the following categories: +Assigns tags to Paths. Tags allow for paths to be searched, selected, and bookmarked. Tags are organized in the following categories: - {% include bc path='Type| ' %} Type of neurite compartment (*Axon*, *(Basal) Dendrite*, *Soma*, etc.), as used by the SWC file format. It is also possible to pair each type with a color tag through the {% include bc path='Tag|Options..' %} dialog These tags are considered to be essential annotations and all paths are assigned the *Undefined*-type tag when created. For this reason they are not eliminated by the *Remove All Tags* command. @@ -418,19 +492,24 @@ Assigns tags to Paths. Tags are organized in the following categories: - {% include bc path='Morphometry| ' %} Morphometric properties, such as *Path length*, *Path mean radius* or *[Path order](/plugins/snt/analysis#path-order-analysis)*. -- {% include bc path='Custom...' %} Ad-hoc comments.sss +- {% include bc path='Custom...' %} Ad-hoc comments. Note that only SWC-type tags are preserved across restarts when saving traces in the SWC format. All others require data to be saved in SNT's own .Traces format. ### Refine/Fit +{% capture text%} +Fitted radii are only exported to [SWC files](/plugins/snt/faq#in-which-format-should-i-save-my-tracings-traces-or-swc) when _Replace existing nodes_ is chosen in {% include bc path='Refine|Parameters...' %}. +{% endcapture %} +{% include notice icon="info" content=text %} + SNT can use the fluorescent signal around traced Paths to optimize curvatures and estimate the thickness of traced structures to sub-voxel accuracy. The optimization algorithm uses pixel intensities to fit circular cross-sections around each node. Once computed, fitted cross-sections can be used to: 1) Infer the radius of nodes, and/or 2) refine node positioning, by snapping their coordinates to the cross-section centroid. The {% include bc path='Refine/Fit|' %} menu contains three entries: - {% include bc path='Fit Path(s).../Un-fit Path(s)/Apply Existing Fit' %} This option will change depending on which Path(s) are currently selected. You can use it to 1) Fit selected Path(s), 2) un-fit Path(s) that have already been fitted, or 3) apply a generated preview of the fit or an existing fit. Slice in "Explore/Preview Fit" image stack -- {% include bc path='Explore/Preview Fit' %} Carves out a region of the image along and around each Path node, generating an animated cross-view "fly-through" with the result of the fitting operation. The generated image is annotated with details of the fit: i) Fitted radius; ii) normalized score quantifying the "circularity" of a node's cross section, and iii) the angle between node and parent tangent vectors. +- {% include bc path='Explore/Preview Fit' %} Carves out a region of the image along and around each Path node, generating an animated cross-view "fly-through" with the result of the fitting operation. The generated image is annotated with details of the fit: i) Fitted radius; ii) normalized score quantifying the "circularity" of a node's cross-section, and iii) the angle between node and parent tangent vectors. - {% include bc path='Discard Fit(s)...' %} Deletes the existing fit(s) for the selected Path(s), or all fits if no Paths are selected. Before computing the fit, SNT will prompt you to specify two parameters: @@ -455,14 +534,20 @@ Assuming you chose to fit both centroids and radii, a fitted path might look lik ### Analyze -This menu contains several options which provide quick ways to analyze and visualize numerical properties of paths. Note that these operations are only applied to the subset of currently selected Path(s). To apply these operations to the entire Tree, deselect all Paths first. +This menu contains several options which provide quick ways to analyze and visualize numerical properties of paths and associated branches. Note that these operations are only applied to the subset of currently selected Path(s). To apply these operations to the entire Tree, deselect all Paths first. + -- {% include bc path='Color Coding...' %} Assigns color codes to paths based on the chosen metric. +- **{% include bc path='Color Coding...' %}** Assigns color codes to paths or cells based on the chosen metric. + - *Color by* Drop-down menu containing the metrics which inform the color mapping. + - *LUT* Drop-down menu containing the LUTs (Look Up Tables) that define the color palettes. The LUTs are those that come packaged with ImageJ. The selected LUT is displayed in the color bar directly underneath. + - *Rec. Viewer Color Map* If active, opens an instance of the Reconstruction Viewer with the selected paths color coded with the selected LUT. + - *Rec. Plotter Color Map* If active, open an instance of the Reconstruction Plotter with the selected paths color coded with the selected LUT. + - *Remove Existing Color Coding* Removes existing color coding from the selected paths.
@@ -470,19 +555,16 @@ This menu contains several options which provide quick ways to analyze and visua
-- {% include bc path='Distribution Analysis...' %} Plots a histogram of the selected metric. +- **{% include bc path='Frequency Analysis...' %}** Plots histograms of selected path/branch metrics - - *Measurement* - Drop-down menu with the available metrics. -
- - -
-- {% include bc path='Measure.../Quick Measurements' %} Shows a table of summary statistics for selected paths. The former command allows for specific selections of metrics. If measuring multiple tracings, the table can be sorted by column. -
- -
- -- {% include bc path='Convert to ROIs...' %} Allows conversion of Path(s) to ImageJ [ROIs](https://imagej.net/ij/docs/guide/146-10.html#sec:Selections-Intro) (Regions of Interest). Opens the [ROI Manager](https://imagej.net/ij/docs/guide/146-30.html#fig:The-ROI-Manager), if closed. Options include: + - *Measurement* Drop-down menu with the available metrics. + + - *Polar* Whether the histogram should be plotted using polar coordinates. Typically, this assumes that the data being profiled ranges between 0 and 360 degrees (e.g., bifurcation angles) + {% include img align="center" src="/media/plugins/snt/snt-combined-histograms.png" caption="Example of histograms obtained from the Path Manager's _Branch-based Distributions..._ command." %} + +- **{% include bc path='Measurements}' %}** Shows a table of summary statistics for selected paths/cells. See [Analysis › Measurements](/plugins/snt/analysis#measurements) for details + +- **{% include bc path='Convert to ROIs...' %}** Allows conversion of Path(s) to ImageJ [ROIs](https://imagej.net/ij/docs/guide/146-10.html#sec:Selections-Intro) (Regions of Interest). Opens the [ROI Manager](https://imagej.net/ij/docs/guide/146-30.html#fig:The-ROI-Manager), if closed. Options include: - *Convert* Drop-down menu specifying the structure(s) to convert (branches, branch-points, or end-points) @@ -497,18 +579,29 @@ This menu contains several options which provide quick ways to analyze and visua
-- {% include bc path='Plot Profile' %} Uses voxel intensities values under path nodes to generate *Intensity vs. Distance* plots for selected Path(s). Refer to the prompt's mouse over tooltips for details. +- **{% include bc path='Multimetric Plot' %}** Plots a Path metric against several others. + +- **{% include bc path='Plot Profile' %}** Uses voxel intensities values under path nodes to generate *Intensity vs. Distance* plots for selected Path(s). Refer to the prompt's mouse over tooltips for details.
-- {% include bc path='Skeletonize...' %} Outputs a binary image that is a topographic skeleton, ie, it generates an empty (zero-filled) image of the same dimensions of the one being traced, then paints a pixel at each node coordinates following the topographic rules of bitmap skeletons in which fork points, tips and slab voxels are determined by voxel connectivity. +- **{% include bc path='Skeletonize...' %}** Outputs a binary image that is a topographic skeleton, ie, it generates an empty (zero-filled) image of the same dimensions of the one being traced, then paints a pixel at each node coordinates following the topographic rules of bitmap skeletons in which fork points, tips and slab voxels are determined by voxel connectivity. - *Roi filtering*: If an area ROI exists over the image (you may need to pause SNT to create such an ROI), then only paths inside it will be converted. + - *Run "Analyze Skeleton" after conversion* Runs the [AnalyzeSkeleton](/plugins/analyze-skeleton) plugin on the skeletonized output image. -- {% include bc path='Save Subset as SWC...' %} Exports the selected subset of Path(s) as an [SWC](http://www.neuronland.org/NLMorphologyConverter/MorphologyFormats/SWC/Spec.html) file. Note the paths to be exported must include a primary path (i.e., one at the top level in the Path Manager hierarchy). +- **{% include bc path='Straighten' %}** Creates a 'linear image' from the pixels associated with a single paths, similarly to [/plugins/straighten](ImageJ's Straighten) command + +- **{% include bc path='Train Weka Classifier' %}** Uses selected Path(s) to train a random forest classifier (a machine learning algorithm for semantic segmentation) aimed at classifying neurite-associated pixels. Classification is performed by [/plugins//tws](Trainable Weka Segmentation). The resulting classification can be exported into other software, or loaded as secondary tracing layer. Refer to the prompt's built-in documentation for more details. + +- **{% include bc path='Spine/Varicosity Utilities| ' %}** This menu contains commands tools for analyzing at manually placed markers along paths such as dendritic spines or axonal varicosities. The starting point for such analyses are multipoint ROIs placed along paths. These are detailed in [Step-by-step instructions](/plugins/snt/step-by-step-instructions#spinevaricosity-analysis). + +- **{% include bc path='Time-lapse Utilities| ' %}** This menu contains commands tools for analyzing time-lapse videos, and assume that the same structure has been traced across multiple frames. Refer to [Step-by-step instructions](/plugins/snt/step-by-step-instructions#time-lapse-analysis) for more details. + +- **{% include bc path='Save Subset as SWC...' %}** Exports the selected subset of Path(s) as an [SWC](http://www.neuronland.org/NLMorphologyConverter/MorphologyFormats/SWC/Spec.html) file. Note the paths to be exported must include a primary path (i.e., one at the top level in the Path Manager hierarchy). ## Filter Toolbar @@ -518,13 +611,20 @@ The filter toolbar allows paths to be searched and filtered quickly using tags ( - **Color Filters** ![](/media/plugins/snt/snt-text-filter-color-button.png) Allows filtering of Paths by color tags. Custom colors may be selected by right-clicking an empty swatch, which will bring up the CMYK palette. The chosen color is temporarily saved in that swatch. + - **Morphology Filters** ![](/media/plugins/snt/snt-text-filter-morphology-button.png) Allows filtering of Paths by selected morphological properties (including cell identity). Note that these filters do not require Paths to be labeled using {% include bc path='Tag|Morphology| ' %}. - - *Path Order...* Filters for Paths of [Path order](/plugins/snt/analysis#path-order-analysis) in the inputted range. Example queries: `1-2`: selects all primary and secondary branches; `max-max`: selects all terminal branches. + + - *Path Order...* Filters for Paths of [Path order](/plugins/snt/analysis#path-order-analysis) in the inputted range. Example queries: `1-2`: selects all primary and secondary paths; `max-max`: selects all terminal paths. + - *Length...* Filters for Paths of length within the inputted range. Example queries: `10-20`: selects all Paths with lengths between 10 and 20μm; `max-max`: selects the longest path(s). + - *Mean Radius...* Filters for Paths of mean radius within the inputted range. + - *No. of Nodes...* Filters for Paths with node count within the inputted range. + - *SWC Type...* Filters for Paths with the selected SWC type tags. Note that the Paths of interest must have been [tagged](/plugins/snt/manual#tag) using the{% include bc path='Tag|Type|' %} menu. + # Fill Manager Provides controls for all filling operations. It is described in more detail in the [Filling: Step-By-Step Instructions](/plugins/snt/step-by-step-instructions#filling). diff --git a/_pages/plugins/snt/metrics.md b/_pages/plugins/snt/metrics.md new file mode 100644 index 0000000000..15c6c6d425 --- /dev/null +++ b/_pages/plugins/snt/metrics.md @@ -0,0 +1,274 @@ +--- +title: SNT › Metrics +nav-links: true +nav-title: Metrics +artifact: org.morphonets:SNT +icon: /media/icons/snt.png +forum-tag: snt +update-site: Neuroanatomy +--- + +## Metrics +{% capture text%} +This list reflects only the default measurements available in the GUI and is not exhaustive. Note that some of the metrics described here have been ported from [L-measure](http://cng.gmu.edu:8080/Lm/help/index.htm): {% include citation doi='10.1038/nprot.2008.51' %} +{% endcapture %} +{% include notice icon="info" content=text %} + + +###### Branch contraction + +The ratio between the Euclidean distance of a branch (i.e., Euclidean distance between the first and last node of the branch) and its path length Range of values: ]0--1[ (unitless) + +###### Branch fractal dimension +[L-measure metric](http://cng.gmu.edu:8080/Lm/help/index.htm). The slope obtained from the log-log plot of Path distance vs Euclidean distance. Is only computed for branches defined by at least five nodes. Described in: {% include citation doi='10.1002/cne.21418' %} + +###### Branch length +The path length of a branch (i.e., the sum of all its inter-node distances) + +###### Branch mean radius +The average of the radii of the nodes defining a branch + +###### Branch surface area +_Estimated_ surface area of a branch computed from treating each inter-node segment as a conical frustum and summing the surface area of all frusta + +###### Branch volume +_Estimated_ volume of a branch computed from treating each inter-node segment as a conical frustum and summing the volume of all frusta + + +###### Cable length +The total path length of a structure, i.e., the sum of all inter-node distances of its paths + +###### Complexity index +Also known as "Dendritic Complexity Index". An index based on the number of primary neurites, total arbor length, and the number and Strahler-order of terminal branches. Described in: {% include citation doi='10.1523/JNEUROSCI.19-22-09928.1999' %} + +###### Convex hull: Boundary size +The perimeter of the 2D polygon or the surface area of the 3D polyhedron of the convex hull + +###### Convex hull: Boxivity +The extent to which the convex hull approaches a rectangle (2D) or a cuboid (3D). Range of values: 0--1 (unitless) + +###### Convex hull: Centroid-root distance +The distance between the root of a neuronal arbor and the centroid of its convex hull + +###### Convex hull: Elongation +The caliper diameter of the convex hull + +###### Convex hull: Roundness +The extent to which the convex hull approaches a circle (2D) or a sphere (3D). Range of values: 0--1 (unitless) + +###### Convex hull: Size +Either the area of the 2D polygon, or the volume of the 3D polyhedron defining the convex hull + + +###### Depth +The depth of the bounding box embedding the structure being measured + + +###### Height +The height of the bounding box embedding the structure being measured + +###### Horton-Strahler bifurcation ratio +The average bifurcation ratio of [Strahler bifurcation ratios](https://en.wikipedia.org/wiki/Strahler_number#Bifurcation_ratio) + +###### Horton-Strahler number +The highest Horton-Strahler number of a tree, i.e., the Horton-Strahler number of its root node + + +###### Internode distance +The distance between nodes defining a branch or a Path + +###### Internode distance (squared) +The squared distance between nodes defining a branch or a Path. Alternative to _Internode distance_ when faster computations are required. + + +###### Length of inner branches +The sum of branch lengths of branches of highest Strahler order. Typically, these correspond to the most 'internal' branches of an arbor, in direct sequence from the root. Note that_Primary branches_ are _inner branches_ starting at the tree's root. + +###### Length of longest shortest path +Considering a [graph-theory tree](https://en.wikipedia.org/wiki/Tree_(graph_theory)), the _Length of longest shortest path_ corresponds to the [graph diameter](https://mathworld.wolfram.com/GraphDiameter.html). Note that this metric can only be computed for structures that are valid mathematical trees. + +###### Length of primary branches +The sum of branch lengths of primary (or root-associated) branches. Primary branches have origin in a tree's root, extending to the closest branch point or end-point, i.e., they are _inner branches_ starting at the root. Note that a primary branch can also be terminal. + +###### Length of terminal branches +The sum of branch lengths of branches ending at terminal endpoints (tips) + + +###### No. of branch nodes (branch fragmentation) + The total number of nodes (and thus _compartments_) in a branch + +###### No. of branch points +The total number (count) of branch points (also know as fork points) + +###### No. of branches +The total number (count) of branches + +###### No. of fitted paths +The total number (count) of [fitted](/plugins/snt/manual#refinefit) paths + +###### No. of inner branches +The number of branches of highest Strahler order. Typically, these correspond to the most 'internal' branches of an arbor, in direct sequence from the root + +###### No. of path nodes (path fragmentation) + The total number of nodes (and thus _compartments_) in a path + +###### No. of paths +The total number (count) of paths defining a structure + +###### No. of primary branches +The total number (count) of primary (or root-associated) branches. Primary branches have origin in a tree's root, extending to the closest branch point or end-point, i.e., they are _inner branches_ starting at the root. Note that a primary branch can also be terminal. + +###### No. of spines/varicosities +Sum of all spine/varicosity markers in a structure + +###### No. of spines/varicosities per path +Number of spines/varicosities associated with a path + +###### No. of terminal branches +The total number (count) of branches ending at terminal endpoints (tips) + +###### No. of tips +The total number (count) of terminal endpoints in a structure + +###### No. of total nodes +The total number (count) of nodes in a structure + +###### Node intensity values +The pixel intensity at each node location + +###### Node radius +The radius at each node, typically obtained from [fitting procedures](/plugins/snt/manual#refinefit) + + +###### Partition asymmetry +[L-measure metric](http://cng.gmu.edu:8080/Lm/help/index.htm). Computed at each bifurcation point of the structure being measured. Note that branch points with more than 2 children are ignored. Given _n1_, _n2_ the number of tips on each side of a bifurcation point, Partition asymmetry is defined as _abs(n1-n2)/(n1+n2-2)_. + +###### Path channel +The color channel associated with a path (multi-dimensional image) + +###### Path contraction +The ratio between the Euclidean distance of a path (i.e., Euclidean distance between the first and last node of the path) and its path length. Range of values: ]0--1[ (unitless) + +###### Path frame +The time-lapse frane associated with a path (multi-dimensional image) + +###### Path length +The sum of all inter-node distances in a path + +###### Path mean radius +The average of the radii of the nodes defining a path + +###### Path order +See [Path Order Analysis](/plugins/snt/analysis#path-order-analysis) + +###### Path spine/varicosity density +The number (count) of spine/varicosity markers associated with a path, divided by its path length + +###### Path surface area +_Estimated_ surface area of a path computed from treating each inter-node segment as a conical frustum and summing the surface area of all frusta + +###### Path volume +_Estimated_ volume of a path computed from treating each inter-node segment as a conical frustum and summing the volume of all frusta + + +###### Remote bif. angles +The angle between each bifurcation point and its children in the simplified graph, which comprise either branch points or terminal nodes. Note that branch points with more than 2 children are ignored. + + +###### Sholl: Decay +The [Sholl regression coefficient](/plugins/sholl-analysis#sholl-decay) + +###### Sholl: Degree of Polynomial fit +The polynomial degree used to fit the Sholl profile. See [Sholl › Fitting functions](/plugins/sholl-analysis#eq1) + +###### Sholl: Kurtosis +See [Kurtosis](/plugins/sholl-analysis#kurtosis) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Sholl: Max +See [Max inters.](/plugins/sholl-analysis#max-inters) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Sholl: Max (fitted) +See [Critical value](/plugins/sholl-analysis#critical-value) in [Sholl › Metrics based on fitted data](/plugins/sholl-analysis#metrics-based-on-fitted-data) + +###### Sholl: Max (fitted) radius +See [Critical radius](/plugins/sholl-analysis#critical-radius) in [Sholl › Metrics based on fitted data](/plugins/sholl-analysis#metrics-based-on-fitted-data) + +###### Sholl: Mean +See [Mean inters.](/plugins/sholl-analysis#mean-inters) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Sholl: No. maxima +The number of times _Max inters._ occurs in a Sholl profile. See [Max inters.](/plugins/sholl-analysis#max-inters) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Sholl: No. secondary maxima +The number of times a secondary peak occurs in a Sholl profile. See [Max inters.](/plugins/sholl-analysis#max-inters) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Sholl: Ramification index +See [Schoenen Ramification index](/plugins/sholl-analysis#schoenen-sampled) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Sholl: Skeweness +See [Skeweness](/plugins/sholl-analysis#skeweness) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Sholl: Sum +See [Sum inters.](/plugins/sholl-analysis#sum) in [Sholl › Metrics based on sampled data](/plugins/sholl-analysis#metrics-based-on-sampled-data) + +###### Surface area +Treating each inter-node segment as a conical frustum, the sum of the surface areas of all frusta + + +###### Volume +Treating each inter-node segment as a conical frustum, the sum of the volume of all frusta + +###### Width +The width of the bounding box embedding the structure being measured + +###### X,Y,Z coordinates +Cartesian coordinates in the three-dimensional space + + +## Statistics +SNT assembles comparison reports and simple statistical reports (two-sample t-test/one-way ANOVA) for up to six groups of cells. This is described in [Comparing Reconstructions](/plugins/snt/analysis#comparing-reconstructions). + + +## Glossary + +###### Mesh +A polygon mesh defines the shape of a three-dimensional polyhedral object. In neuronal anatomy, meshes define neuropil annotations, typically compartments of a reference brain atlas (e.g., the hippocampal formation in mammals, or mushroom bodies in insects) + +###### Multi-dimensional image +An image with more than 3 dimensions (3D). Examples include fluorescent images associated with multiple fluorophores (multi-channel) and images with a time-dimension (time-lapse videos). A 3D multi-channel timelapse has 5 dimensions + +###### Neurite +Same as neuronal process. Either an axon or a dendrite + +###### Path +Can be defined as a sequence of branches, starting from soma or a branch point until a termination. In manual and assisted (semi-automated) tracing, neuronal arbors are traced using paths, not branches. Fitting algorithms that take into account voxel intensities can be used to refine the center-line coordinates of a path, typically to obtain more accurate curvatures. Fitting procedures can also be used to estimate the volume of the neurite(s) associated with a path + +###### (Neuronal) morphometry +Quantification of neuronal morphology + +###### Neuropil +Any area in the nervous system. The cellular tissue around neuronal processes + +###### Out-of-core +Software with out-of-core capabilities is able to process data that is too large to fit into a computer’s main memory + +###### Reconstruction +See Tracing + +###### ROI +Region of Interest. Define specific parts of an image to be processed in image processing routines + +###### Skeleton +A thinned version of a digitize shape (such as a neuronal reconstruction) or of a binary image + +###### Tracing +A digital reconstruction of a neuron or neurite. The term predates computational neuroscience and reflects the manual ‘tracing’ on paper performed with camera lucida devices by early neuroanatomists + +###### Volume rendering +A visualization technique for displaying image volumes (3D images) directly as 3D objects + + +{% capture text%} +This glossary was assembled from the supplementary note of SNT's publication: {% include citation id='plugins/snt' %} +{% endcapture %} +{% include notice icon="info" content=text %} \ No newline at end of file diff --git a/_pages/plugins/snt/reconstruction-viewer.md b/_pages/plugins/snt/reconstruction-viewer.md index 736db24dfb..b5e58b27cc 100644 --- a/_pages/plugins/snt/reconstruction-viewer.md +++ b/_pages/plugins/snt/reconstruction-viewer.md @@ -1,7 +1,7 @@ --- title: SNT › Reconstruction Viewer nav-links: true -nav-title: Reconstruction Viewer +nav-title: Rec. Viewer artifact: org.morphonets:SNT icon: /media/icons/snt.png forum-tag: snt @@ -11,7 +11,7 @@ forum-tag: snt SNT's Reconstruction Viewer is a powerful OpenGL 3D visualization tool for both surface meshes and reconstructions. It can be used as a standalone program or from withing SNT. Some of its features include: - Interactive scenes (controlled rotations, panning, zoom, scaling, animation, "dark"/"light" mode) - - Suport for axes, transparency, color interpolation and path smoothing + - Support for axes, transparency, color interpolation and path smoothing - Tools for management and customization of scene elements - Ability to render both local and remote files on the same scene - Loading of surface meshes of several template brains (Drosophila, zebrafish, and mouse (Allen Mouse Brain Atlas)) diff --git a/_pages/plugins/snt/scripting.md b/_pages/plugins/snt/scripting.md index c2ed7087b4..f147edc767 100644 --- a/_pages/plugins/snt/scripting.md +++ b/_pages/plugins/snt/scripting.md @@ -9,7 +9,7 @@ update-site: Neuroanatomy --- {% capture api%} -The most up-to-date SNT API can be found at [https://morphonets.github.io/SNT](https://morphonets.github.io/SNT). +The most up-to-date SNT API can be found at [https://javadoc.scijava.org/SNT](https://javadoc.scijava.org/SNT). {% endcapture %} {% include notice icon="info" content=api %} @@ -17,78 +17,49 @@ The most up-to-date SNT API can be found at [https://morphonets.github.io/SNT](h A key feature of SNT is its extensibility via scripts.This section provides an overview to the ever-growing list of SNT scripts. These can be accessed through the {% include bc path='Plugins|NeuroAnatomy|Neuroanatomy Shortcut Window' %}, the *Scripts* menu in the main dialog, or the {% include bc path='Templates|Neuroanatomy'%} menu of Fiji's Script Editor. Typically, holding {% include key key='Shift' %} while selecting a script from a menu outside the [Script Editor](/scripting/script-editor) will open it. -SNT Scripts are intentionally written in multiple languages, but the majority is written in [Groovy](/scripting/groovy/)and [Python](/scripting/python) (Jython), for no other reason that those seem to be the most commonly used language by its developers +SNT Scripts are intentionally written in multiple languages to demonstrate flexibility, but the majority is written in [Groovy](/scripting/groovy/) and [Python](/scripting/python) (Jython), for no other reason that those seem to be the most commonly used language by its developers. [script parameters](/scripting/parameters) are typically used for rapid development. + +## Bundled Templates +{% include img align="right" src="/media/plugins/snt/snt-scripts-menu.png" width="200px" caption="Scripts menu in main dialog"%} +There are ~50 scripts currently bundled in SNT. These are organized into non-rigid categories: *Analysis* (typically handling quantifications) , *Batch* (Bulk processing of files), *Render* (visualization), *Skeletons & ROIs* (pixel-based analyses), *Tracing* (Tracing-related tasks), and *Demos*. + +Your script can also be bundled with SNT, or made available through the Neuroanatomy update site. Did you write a useful routine? Please [announce it](https://forum.image.sc/tag/snt), or submit a [pull request](https://github.com/morphonets/SNT/pulls) so that it can be distributed with Fiji! ## Adding Scripts to SNT There are a couple of ways to have your own scripts appear in SNT's *Scripts* menu: -Any script saved into Fiji's "scripts" sub-directory containing *SNT* in the filename (e.g., `C:\Users\user\Desktop\Fiji.app\scripts\My_SNT_Script.py` or `/home/user/Fiji.app/scripts/My_SNT_Script.py`) will be listed in {% include bc path='Scripts'%} menu: +Any script saved into Fiji's "scripts" sub-directory containing *SNT* in the filename (e.g., *C:\Users\user\Desktop\Fiji.app\scripts\My_SNT_Script.py* or */home/user/Fiji.app/scripts/My_SNT_Script.py*) will be listed in {% include bc path='Scripts'%} menu: -1. Go to {% include bc path='Scripts|New...'%} from the SNT dialog. This will open an instance of Fiji's Script Editor with pre-loaded boilerplate code in the scripting language of your choice. +1. Go to {% include bc path='Scripts|New...'%} from the SNT dialog. You can choose to open an instance of Fiji's Script Editor with pre-loaded boilerplate code in the scripting language of your choice or to assemble your boilerplate using the [Script Recorder](#script-recorder) -2. Save the script in `Fiji.app/scripts/` including 'SNT' anywhere in its file name +2. Save the script in *Fiji.app/scripts/* including 'SNT' anywhere in its file name 3. Run {% include bc path='Scripts|Reload...'%}, and your new script should appear in the full list of scripts found at {% include bc path='Scripts|Full List...'%}. -Did you write a useful script? Please submit a [pull request](https://github.com/morphonets/SNT/pulls) on GitHub so that it can be distributed with Fiji! - -## Script Interpreter - -Some of SNT's functionality is accessible in the [Script Interpreter](/scripting/interpreter). Here is an example: - -
- -
- -## Script Templates - - -These typically demonstrate various aspects of analysis, tracing, image processing and batch processing routines. - -### Analysis - -- **Analysis\_Demo\_(Interactive).py** Exemplifies how to programmatically interact with a running instance of SNT to analyze traced data. Because of all the GUI updates, this approach is *significantly slower* than analyzing reconstructions directly (see Analysis\_Demo.py for comparison) - -- **Analysis\_Demo.py** A [Jython](/scripting/jython) demo of how SNT can analyze neuronal reconstructions fetched from online databases such as MouseLight, NeuroMorpho or FlyCircuit. - -- **Download\_ML\_Data.groovy** Exemplifies how to programmatically retrieve data from MouseLight's database at \[//ml-neuronbrowser.janelia.org ml-neuronbrowser.janelia.org\]: It iterates through all the neurons in the server and downloads data (both JSON and SWC formats) for cells with soma associated with the specified Allen Reference Atlas (ARA) compartment. Downloaded files will contain all metadata associated with the cell (i.e., labeling used, strain, etc.) - -- **Get\_Branch\_Points\_in\_Brain\_Compartment.groovy** Exemplifies how to extract morphometric properties of a MouseLight cell associated with a specific brain region/neuropil compartment. Requires internet connection. +## Script Recorder -- **Graph\_Analysis.py** Demonstrates how to handle neurons as graph structures {% include wikipedia title="Graph theory" %} in which nodes connected by edges define the morphology of the neuron. SNT represents neurons as directed graphs (assuming the root -typically the soma- as origin) and allows data be processed using the powerful [jgrapht](https://jgrapht.org/) library. In this demo, the [graph diameter](http://mathworld.wolfram.com/GraphDiameter.html) (i.e., the length of the longest shortest path or the longest graph geodesic) of a cellular compartment is computed for a neuron fetched from the MouseLight database. +SNT features a script recorder that similarly to _ImageJ's macro recorder_ converts menu and button clicks into executable code. Note however that while the recorder captures simple commands well, it struggles to capture those that are more complex or particularly interactive. -- **Reconstruction\_Viewer\_Demo.py** Exemplifies how to render reconstructions and neuropil annotations in a stand-alone [Reconstruction Viewer](/plugins/snt/reconstruction-viewer). +The goal of the recorder is twofold: 1) simplify prototyping of new scripts and 2) Log your actions during a tracing session. This is particularly useful to assemble reproducible records. -- **SciView\_Demo.groovy** Exemplifies how bridge SNT with [sciview](/plugins/sciview). +There are two ways to start the recorder: {% include bc path='Scripts|New|Record...'%} or by pressing the _Record_ button in [Command Palette](/plugins/snt/manual#command-palette). -- **Extensive\_Sholl\_Stats.groovy** Exemplifies how to perform linear and polynomial regression on tabular [Sholl](/plugins/sholl-analysis) data. +As a rule-of-thumb, commands that are simple or do not involve prompts record flawlessly. This includes setting filters for visibility of tags, applying Tags, or filtering paths in the Path Manager. Commands for fully automated reconstructions, or generating secondary layers _should_ work well. However, many others remain limited. -### Boilerplate - -These scripts hold extensible boilerplate code in several programming languages, namely [BeanShell](/scripting/beanshell), [Groovy](/scripting/groovy) and [Jython](/scripting/jython). The most essential imports and [script parameters](/scripting/parameters) are included to facilitate rapid development. - -### Tracing - -- **Scripted\_Tracing\_Demo.py** Exemplifies how to programmatically perform A\* tracing between two points without GUI interaction, which allows for automated tracing of relatively simple structures (e.g., neurospheres neurites, microtubule bundles, etc). In this demo, points are retrieved from the SWC file of SNT's "demo tree", effectively recreating the initial SWC data. - -- **Scripted\_Tracing\_Demo\_(Interactive).py** Exemplifies how to programmatically interact with a running instance of SNT to perform auto-tracing tasks. - -- **Take\_Snapshot.py** Displays a WYSIWYG image of a tracing canvas. Exemplifies how to script SNT using SNTService. - -### Batch - -This menu hosts scripts that process files in bulk. Namely: +
+ +
-- **Convert\_Traces\_to\_SWC.py** Converts all .traces files in a directory into SWC. -- **Filter\_Multiple\_Images.py** Bulk filtering of image files using Frangi Vesselness. +## Script Interpreter -- **Measure\_Multiple\_Files.py**/**Measure\_Multiple\_Files\_(With\_Options).groovy** Bulk measurements of reconstruction files. +Some of SNT's functionality is conveniently accessible in the [Script Interpreter](/scripting/interpreter). Here is an example: -- **Render\_Cell\_Collection.groovy** Exemplifies how to quickly render large collections of cells from a directory of files in [Reconstruction Viewer](/plugins/snt/reconstruction-viewer). +
+ +
-- **Render\_Cell\_Collection\_(MultiPanel\_Figure).groovy** Exemplifies how to generate a publication-quality multi-panel figure in which multiple reconstructions are sorted and color-coded by a specified morphometric trait (e.g., cable length). # Python Notebooks @@ -130,9 +101,12 @@ def run(): {% endhighlight %} -# Examples +# Fiji Scripting + +Scripting in Fiji's script editor is perhaps best done using Groovy and python. The latter as quite good autocompletion for objects that are not script parameters. The best way to start a new script is by choosing a boilerplate {% include bc path='Scripts|New|From Template...'%} in SNT or {% include bc path='Neuroanatomy|Boilerplate|'%} in the script Editor. These templates hold boilerplate code in several programming languages (namely [BeanShell](/scripting/beanshell), [Groovy](/scripting/groovy) and [Jython](/scripting/jython)), and include the most essential imports and [script parameters](/scripting/parameters) to facilitate rapid development. + -## Scripting Reconstruction Viewer +## Example Programmatic control over an open instance of [Reconstruction Viewer](/plugins/snt/reconstruction-viewer) (either called from within SNT or as a standalone application) can be achieved by selecting the {% include bc path='Tools & Utilities|Script This Viewer...'%} [command](/plugins/snt/reconstruction-viewer#utilities). It will then open an instance of Fiji's script editor with a boilerplate template containing the most essential imports and [script parameters](/scripting/parameters). The default programming language for this template can be chosen from the drop-down menu of the *Preferred Language* [option](/plugins/snt/reconstruction-viewer#settings). diff --git a/_pages/plugins/snt/step-by-step-instructions.md b/_pages/plugins/snt/step-by-step-instructions.md index 44216d5144..d6de5c30d6 100644 --- a/_pages/plugins/snt/step-by-step-instructions.md +++ b/_pages/plugins/snt/step-by-step-instructions.md @@ -1,7 +1,7 @@ --- title: SNT › Step-By-Step Instructions nav-links: true -nav-title: Step-By-Step Instructions +nav-title: Walk-throughs artifact: org.morphonets:SNT icon: /media/icons/snt.png forum-tag: snt @@ -9,16 +9,21 @@ update-site: Neuroanatomy extensions: ["mathjax"] --- -# Tracing +# Semi-automated Tracing +{% capture op1-demo-incomplete%} +You can follow these instructions using {% include bc path='File|Load Demo Dataset...' %} and choosing the _Drosophila OP neuron (Complete 3D reconstruction)_ dataset. All of the neuronal processes are traced in this dataset, so you may want to delete some of the existing paths beforehand. +{% endcapture %} + +{% include notice icon="info" content=op1-demo-incomplete %} -These instructions assume that you have read the [Overview](/plugins/snt/manual) page, including starting up the plugin, enabling [Cursor Auto-snapping](/plugins/snt/manual#auto-snapping), and [Auto-tracing](/plugins/snt/manual#auto-tracing) options. This section is also documented in a [Screencast](/plugins/snt/screencasts#introduction-to-tracing). +These instructions assume that you have read the [Manual](/plugins/snt/manual), including starting up the plugin, enabling [Cursor Auto-snapping](/plugins/snt/manual#cursor-auto-snapping), and [Auto-tracing](/plugins/snt/manual#auto-tracing) options. Parts of this section are also documented in a [Screencast](/plugins/snt/screencasts#introduction-to-tracing). ## Starting A Path ### I. Pick The Starting Point Choosing a starting point -You may notice that, by default, the cursor [snaps](/plugins/snt/manual#auto-snapping) to the brightest pixel in its vicinity. If you prefer to manually control the placement of nodes, feel free to toggle feature by pressing {% include key key='S' %}. Now, to begin tracing, move through the image stack to find the start point of a path then click there with the left mouse button. +You may notice that, by default, the cursor [snaps](/plugins/snt/manual#cursor-auto-snapping) to the brightest pixel in its vicinity. If you prefer to manually control the placement of nodes, feel free to toggle this feature by pressing {% include key key='S' %}. Now, to begin tracing, move through the image stack to find the start point of a path then click there with the left mouse button. ### II. Pick A Subsequent Point @@ -26,13 +31,16 @@ You may notice that, by default, the cursor [snaps](/plugins/snt/manual#auto-sna A small circle should appear, highlighting the start of the path. Move through the stack to find a subsequent point further along the same structure to be traced (neuron, blood vessel, etc.), and click there. If a path between the two points cannot be found immediately, you may see the animated progress of the search. You can scroll through the stack while such a search progresses: If it appears to not be making good progress, it's probably best to press the "Cancel/Esc" button (shortcut: {% include key key='C' %}/{% include key key='Esc' %}) and pick a point closer to the start point. - -Note that increasing *Z* in the *Cursor Auto-snapping* panel allows for automated Z-navigation on signal mouseover. A* search animated progress +NB: +- Increasing *Z* in the *Cursor Auto-snapping* panel allows for automated Z-navigation on signal mouseover +- You can increase the contrast (opacity, size, etc.) of Path nodes in the _Path rendering_ widget of the [Options tab](/plugins/snt/manual#options-tab) + + ### III. Confirm The Temporary Segment -Once the search has reached the target point, the path is shown in cyan (to indicate that this is still a temporary path) and you are asked to confirm (by clicking "Yes" or pressing {% include key key='Y' %}) that this path is following the route through the image that you expect. If it is not, then click "No" {% include key key='N' %} and you'll go back to the [previous step](#ii-picking-a-subsequent-point). Assuming you confirmed the path, the confirmed path will appear in red. Now you are essentially back at [step II](#ii-picking-a-subsequent-point). Normally you will go on to pick further points along the structure. However, if you have finished with that path, click "Finish Path" {% include key key='F' %} and you will go back to [step I](#i-picking-a-start-point). If you completed that path it would be shown in magenta. +Once the search has reached the target point, the path is shown in cyan (to indicate that this is still a temporary path) and you are asked to confirm (by clicking "Yes" or pressing {% include key key='Y' %}) that this path is following the route through the image that you expect. If it is not, then click "No" {% include key key='N' %} and you'll go back to the [previous step](#ii-pick-a-subsequent-point). Assuming you confirmed the path, the confirmed path will appear in red. Now you are essentially back at [step II](#ii-pick-a-subsequent-point). Normally you will go on to pick further points along the structure. However, if you have finished with that path, click "Finish Path" {% include key key='F' %} and you will go back to [step I](#i-pick-a-start-point). If you completed that path it would be shown in magenta.
A* search completed @@ -40,20 +48,23 @@ Once the search has reached the target point, the path is shown in cyan (to indi A completed path
+NB: Once you become familiarized with the software you may want to disable the confirmation of temporary segments in _Temporary Paths_ section of the [Options tab](/plugins/snt/manual#options-tab) + + ## Branching: Start A Path On An Existing Path ### I. Select The Path To Branch Off -To select the path you want to branch off from, you can either select it in the Path Manager, or press {% include key key='G' %} while the mouse pointer is near the path. When the path is first selected, it will be shown in the default green color. +To select the path you want to branch off from, you can either select it in the Path Manager, or press {% include key key='G' %} while the mouse pointer is near the path. When the path is first selected, it will be shown in the default green color. Note that you can also right-click on the image and choose _Select Paths by 2D ROI_ from the contextual menu: This will allow you to draw coarsely around the path of interest to activate it. ### II. Select The Fork Point -To force the start of the new path to be a branch of the selected path, hold down the {% include key keys='Alt|Shift' %} keys while you move the mouse to find the branch point under the red cross-hairs, now decorated with a "Fork Point" annotation. With {% include key keys='Alt|Shift' %} held down, click with the left mouse button. - +To force the start of the new path to be a branch of the selected path, hold down the {% include key keys='Alt|Shift' %} keys while you move the mouse to find the branch point under the red cross-hairs, now decorated with a "Fork Point" annotation. With {% include key keys='Alt|Shift' %} held down, click with the left mouse button. Finally, release the keys. A newly created fork point - -Finally, release the keys. Note that it is also possible to zoom into the branch point, right-click on the image and choose *Fork at Nearest Node* from the contextual menu. +NB: +- It is also possible to zoom into the branch point, right-click on the image and choose *Fork at Nearest Node* from the contextual menu +- The forking shortcut can also be simplified (_Temporary Paths_ section of the [Options tab](/plugins/snt/manual#options-tab)) ### III. Extend The Path @@ -71,7 +82,7 @@ From this point on, you can carry on adding nodes to the branched path as [above - + @@ -84,7 +95,7 @@ From this point on, you can carry on adding nodes to the branched path as [above - + @@ -97,7 +108,7 @@ From this point on, you can carry on adding nodes to the branched path as [above - + @@ -110,7 +121,7 @@ From this point on, you can carry on adding nodes to the branched path as [above - + @@ -147,26 +158,30 @@ If both nodes are terminal, the paths are merged together. Otherwise, one path w ## Tracing in the Legacy 3D Viewer -### I.Starting the Viewer +### I. Starting the Viewer It remains possible to trace in the legacy 3D Viewer. To open it, select the *3D* menu tab in the SNT dialog and look for *Legacy 3D Viewer*. You will see 3 parameters: - Select *New with image* from the *Viewer* drop-down menu (selecting *New without image* would only allow you to look at reconstructions without the underlying signal). Note that you can recycle existing viewers you may have open by choosing their window titles from the drop-down menu. + - Select the preferred rendering style from the *Mode* drop-down menu. + - Once you *Apply* the viewer choice, a prompt will appear asking you to choose the resampling factor for the image. Then, the viewer window will appear with the currently open image. -### II.Tracing and Navigation +### II. Tracing and Navigation -- **Selecting points for tracing** Select the *Wand tool* ({% include key key='W' %} [shortcut](/plugins/snt/key-shortcuts#legacy-3d-viewer)) in the main ImageJ toolbar and click over the region you want to trace. Tracing works the same way as in the 2.5D view, i.e., click somewhere in the image to create a starting point, then click further along the structure of interest to find a path between the two points, then confirm or deny the temporary segment as described [above](#Tracing). Similarly, branching occurs as [described for 2D canvas(es)](#Branching:_Start_A_Path_On_An_Existing_Path), by holding the {% include key keys='Alt|Shift' %} modifier. +- **Selecting points for tracing** Select the *Wand tool* ({% include key key='W' %} [shortcut](/plugins/snt/key-shortcuts#legacy-3d-viewer)) in the main ImageJ toolbar and click over the region you want to trace. Tracing works the same way as in the 2.5D view, i.e., click somewhere in the image to create a starting point, then click further along the structure of interest to find a path between the two points, then confirm or deny the temporary segment as described [above](#Tracing). Similarly, branching occurs as [described for 2D canvas(es)](#branching-start-a-path-on-an-existing-path), by holding the {% include key keys='Alt|Shift' %} modifier. -- **Rotation** Either use the *Hand tool* ({% include key key='H' %} [shortcut](/plugins/snt/key-shortcuts#legacy-3d-viewer)) tool and left-click while dragging the mouse or drag mouse while holding the scroll wheel. +- **Rotation** Either use the *Hand tool* ({% include key key='H' %} [shortcut](/plugins/snt/key-shortcuts#legacy-3d-viewer)) tool and left-click while dragging the mouse or drag mouse while holding the scroll wheel + - **Translation** Hold {% include key key='Shift' %} and the scroll wheel while dragging the mouse. + - **Adjusting zoom depth** Scroll the mouse wheel. Once you have selected each of these tools (Wand and Hand) once, you should be able to switch between them by pressing the {% include key key='Esc' %} key. See [Key Shortcuts](/plugins/snt/key-shortcuts#legacy-3d-viewer) for the list of all supported shortcuts. @@ -175,13 +190,11 @@ Once you have selected each of these tools (Wand and Hand) once, you should be a -# Accurate Point Placement - -This section describes methods to increase the accuracy of node placement. - +## Accurate Point Placement +{% include notice icon="info" content=op1-demo-incomplete %}

Supposing you want the end of a path that you're tracing to join onto an existing path, you just use the same modifier key when selecting the end point of the last part of the path. To go into that in more detail, if you're halfway through tracing a path like [1]:

... and you want the final part of that path to join up with the existing path running from the top-left to top-right of the image. First, select that path in the path list (or using the {% include key key='G' %} shortcut) as in [2]:

Now hold down {% include key keys='Alt|Shift' %} to restrict the endpoint to be a "join" on that existing path. Click (while still holding down the modifier keys) to start the search for that endpoint and make it join the existing path. If the search can find a path to the end point, the result should look like [3]:

If you're happy with the result, confirming the temporary path will automatically complete the whole path, since if you're creating an end join there cannot be any more to the path. Note that the path list indicates that this new Path (1) ends on the existing Path (0). The result will look like [4]:

- + @@ -189,7 +202,7 @@ This section describes methods to increase the accuracy of node placement. - + - + @@ -208,7 +221,7 @@ This section describes methods to increase the accuracy of node placement. - + - + @@ -225,7 +238,7 @@ This section describes methods to increase the accuracy of node placement. - + @@ -233,7 +246,7 @@ This section describes methods to increase the accuracy of node placement. - + @@ -241,42 +254,128 @@ This section describes methods to increase the accuracy of node placement. - - - -

Accurate node placement requires XY, ZY and XZ views to be visible. You can do so at startup, by making sure that Default: XY, ZY and XZ views is selected, or by clicking in Display ZY/XZ Views in the Options tab if you have already started SNT.

Find the approximate location of your start point by moving your mouse in the XY window, holding down {% include key key='Shift' %} to synchronize the view in the other panes.

At this point, you should enable cursor auto-snapping in the Main tab using suitable parameters for your image. When this option is enabled, the cursor will automatically 'sniff' for local maxima and 'snap' to their average X,Y,Z position. The pixel that is most likely to be on a neurite is indicated by the red cross-hair cursor.

@@ -198,9 +211,9 @@ This section describes methods to increase the accuracy of node placement.
-

When you press {% include key key='+' %} to zoom in, all the panes will zoom in on the point that the crosshair is over, so each time you press {% include key key='+' %}, make sure you move your mouse pointer over the neurire so that it's still over the structure of interest. You may want to adjust in the Views widget (Options tab) whether all views should zoom synchronously.
+

When you press {% include key key='+' %} to zoom in, all the panes will zoom in on the point that the crosshair is over, so each time you press {% include key key='+' %}, make sure you move your mouse pointer over the neurite so that it's still over the structure of interest. You may want to adjust in the Views widget (Options tab) whether all views should zoom synchronously.
At this point, you should adjust a suitable snapping neighborhood both in XY (2D), and optionally Z (3D).

Note that when Z-snapping is enabled, all views become synchronized,

Locate the center of the structure to be clicked on. If cursor auto-snapping is enabled, simply mouse over the structure, otherwise, try moving the mouse and scroll wheel in each of the panes (holding down {% include key key='Shift' %} so synchronize the views in all three panes). Note that you can toggle the cursor auto-snapping feature at will, by pressing the shortcut {% include key key='S' %}. Also, note that you can "click" on the brightest voxel of a voxel column, by pressing {% include key key='M' %}.

When you're happy with the point under the crosshairs, left-click to start the path:

@@ -217,7 +230,7 @@ This section describes methods to increase the accuracy of node placement.

Zoom out again with the {% include key key='-' %} key, and similarly zoom in on the next point you want to be on your path to place it precisely:

The path along the neuron may not follow the center line perfectly:

... but you can later improve that with the {% include bc path='Refine/Fit|Fit Path...'%} option in the Path Manager, which tries to align the path to the midline of the structure to sub-voxel accuracy:

+# Full-automated Tracing +{% capture ddac-demo%} +You can follow these instructions using {% include bc path='File|Load Demo Dataset...' %} and choosing the _Drosophila ddaC neuron (Autotrace demo)_. It will load a binary (thresholded) image of a Drosophila space-filling neuron (ddaC) displaying autotracing options for automated reconstruction. +{% endcapture %} + +{% include notice icon="info" content=ddac-demo %} +
+ +
+ +# Spine/Varicosity Analysis +{% capture spines-demo%} +You can follow these instructions using {% include bc path='File|Load Demo Dataset...' %} and choosing the _L-systems fractal (Toy neuron)_ dataset, as it contains pre-placed multi-point ROIs emulating markers for dendritic spines. +{% endcapture %} +{% include notice icon="info" content=spines-demo %} + +This type of analysis uses (manually placed) multi-Point ROIs along paths as markers for neurite features such dendritic spines or axonal varicosities. Currently only counts and densities are supported. A typical workflow would proceed as follows. + + 1. Right-click on the image being traced and choose _Pause SNT_ from the contextual menu + 2. Click over the features to be counted. Point placement may not need to be accurate, but with 3D images points should be placed on the same plane (Z-plane) the feature being counted + 3. Once you have placed all the points, select the Path(s) associated with the features (or select none, if all Paths are to be considered) and run Path Manager's {% include bc path='Analyze|Spine/Varicosity Utilities|Extract Counts from Multi-point ROIs...' %}. The dialog allows you to specify: + + - **Source of Multi-point ROI(s)** The location of the markers. Particularly useful if the ROIs are being generated programmatically and stored in the ROI Manager + + - **Max. association distance** The maximum allowed distance between a point and its path in physical units. This option is ignored if set to -1 (the default). This works as follows: for every point ROI, the closest path node is identified. ROI is only considered to be associated with Path if its distance to the closest path node is less than or equal to _Max. association distance_. + + - **Add extracted counts to ROI Manager** Generates new ROIs from the assigned counts and adds them to the ROI Manager. This allows you to validate the extraction and ensure the assignments are correct, as each ROI gets tagged by its associated Path. + +NB: + +- Point ROIs can also be generated programmatically or in a semi-automated way, e.g.: + - Create a freehand area ROI around the path(s) of interest + - Run ImageJ's {% include bc path='Process|Find Maxima...' %}. Detection will be restricted to freehand selection + +- SNT only keeps a tally of the features being counted and location of ROIs are not saved in .traces files, so you may want to save the multipoint ROis for future reference + +- ImageJ has several ways to expedite handling of multipoint ROIs: + - Click on a point and drag to move it + - Alt-click on a point to delete it + - To delete multiple points, create an area selection while holding down {% include key key='alt' %} + - Use {% include bc path='Edit|Selection|Select None' %} to delete a multi-point selection + - Use {% include bc path='Edit|Selection|Restore Selection' %} to restore a deleted multipoint selection + - Double-click on the Multi-point tool in the ImageJ toolbar for further options + + +# Time-lapse analysis +{% capture timelapse-demo%} +You can follow these instructions using {% include bc path='File|Load Demo Dataset...' %} and choosing the _Hippocampal neuron (DIC timelapse)_ dataset: It features a timelapse video of a cultured neuron in which neurites have been traced across time. +{% endcapture %} +{% include notice icon="info" content=timelapse-demo %} + +1. Specify the first time-point to be traced using the [Data Source](/plugins/snt/manual#options-tab) widget. +2. Trace the path of interest +3. Repeat 1. and 2. for all the frames to be traced +4. Run Path Manager's {% include bc path='Analyze|Time-lapse Utilities|Match Path(s) Across Time...' %}. The dialog allows you match paths in the same time-series, by specifying several criteria: + + - **Time points** Only paths associated with these time-points (frames) will be considered for matching. Range(s) (e.g. 2-14), and comma-separated list(s) (e.g. 1,3,20,22) are accepted. Leave empty or type all to consider all frames + + - **Matching criteria** These are a series of conditions that matching paths must fulfill. Some require no further adjustments (e.g., _channel_, _path order_, _type tag_, _color tag_) while others (described below) have configurable settings. Criteria can be combined E.g., if _channel_ and _type tag_ are selected, paths need to share the same channel and the same type tag ('Axon', 'Dendrite', etc.) to be matched. + + The criteria with configurable settings are perhaps the most commonly used: + + - **Starting node location** If selected, matching paths need to share a common origin (starting node) in terms of (X, Y, Z) coordinates. Sample movement and focus drift are common during time-lapse sequences. To account for this, it is possible to specify a (X, Y, Z) 'motion-shift' neighborhood: Paths that originate within this neighborhood (in spatially calibrated units) are considered to share the same starting node location + + - **Custom tag** If selected, matching paths need to share the specified (case sensitive) tag. A regex pattern can also be specified + +5. Once paths have been matched across the time-lapse future analysis becomes simplified. {% include bc path='Analyze|Time-lapse Utilities|Time Profile...' %} can be used to e.g. plot growth across time. {% include bc path='Time Profile...' %} includes the following options: + + - **Metric** the measurement to be profiled across time + + - **Grouping strategy** Typically this would be set to _Matched path(s) across time_ to reflect the matching performed in 4. However, if there are many short-lived neurites (i.e., only visible in few frames) it may be beneficial to choose _Matched path(s) across time (≥2 time-points)_. This will only consider paths present in two or more frames. A _no grouping_ strategy is also available for cases where step 4 was skipped. + + - **Output** Whether a plot, a table or both should be created + + # Filling +{% capture op1-demo-full%} +You can follow these instructions using {% include bc path='File|Load Demo Dataset...' %} and choosing the _Drosophila OP neuron (Complete 3D reconstruction)_ dataset. +{% endcapture %} +{% include notice icon="info" content=op1-demo-full %} + +Paths can be "filled out" to volumes, i.e., converted into 3D images that can be used to improve the visualization of the shape of a neuron beyond what can be seen from traced center-lines, and/or subsequent image processing routines. The filling algorithm uses the center-line path coordinates as seeds in a 'signal search' that expands along neurites to encapsulate the neurite in 3D. The result can be exported as different types of images, including distance maps, binary masks or labeled image. - -There is a simple facility in this plugin for "filling out" paths to volumes. This is not particularly sophisticated, but often good enough for a rough visualization of the shape of a neuron beyond what can be seen from the traced path. +Fillings are controlled by the Fill Manager and share many of the same properties of auto-tracing: + +- Fillings can be performed on the main image or secondary tracing layer + +- The same cost function used in auto-tracing is used for filling -### I.Starting the Fill +- Fillings will be more accurate once SNT is aware of properties of the image being traced, so before filling imported paths you may need to re-trace a representative neurite (you can discard the result) -First, select the one or more paths that you want to fill out from in the Path Manager and select {% include bc path="Fill | Fill Out..." %} in the Path Manager menu options. The selected paths are shown in green so that you can check that you're starting from the right ones. After a couple of seconds if you scroll through the stack you should be able to see a thick green surround the path: -The filler continues to explore the image starting from the path until you click "Pause" or "Stop" in the dialog. However, the fill which is shown only includes those points up to a certain threshold distance from the path. (Note that in this section "distance" doesn't mean a real physical distance, but a measure which takes into account the intensity values of the pixels which must be passed through when moving away from the path.) Information about the current threshold and the progress of the search is shown in the dialog. +### I. Starting the Fill +First, select the one or more paths that you want to fill out from in the Path Manager and select {% include bc path="Fill|Fill Out..." %} in the Path Manager (or select none if you want to fill all the existing paths). Once the filling starts, you should be able to see a thick green surround the path while scrolling through the 3D stack: + +The filler continues to explore the image until you click "Pause" or "Stop" in the dialog, or until all the image has been fully explored. However, the fill which is shown only includes those points up to a certain threshold distance from the path. Note that this "distance" doesn't mean a real physical distance, but instead a 'likelihood-distance': a measure which takes into account the intensity values of the pixels which must be passed through when moving away from the path. Information about the current threshold and the progress of the search is shown in the dialog. Note that if your image is rather small, the entire image may be fully explored before you have time to interact with prompt. + The "Cursor position:" state under "Search Status" is updated as you move your mouse over the image. If the point under the mouse has been reached by the search then it will show you that point's distance from the path. Otherwise, it will read "Not reached by search yet". - -Two lines above, the "Current threshold distance:" shows your current threshold distance: so if this is set to 0.2 then that means that all points less than 0.2 from the path are included in the fill (and shown in green in the image.) The "Max. explored distance:" state under this line shows the maximum distance from the path that has been completely explored. +The _Search status_ shows your current threshold distance: so if this is set to 0.2 then that means that all points less than 0.2 from the path are included in the fill (and highlighted in green in the image). The "Max. explored distance:" shows the maximum distance from the path that has been completely explored. ### II.Adjusting the Fill Threshold You can change the fill threshold in one of three ways: -- Clicking on a point in the image that has been reached by the search (This is the most intuitive way of altering the threshold). It may be helpful to disable the "Enable Snapping within: XY-Z" feature for the cursor while doing this. +- Clicking on a point in the image that has been reached by the search (This is the most intuitive way of altering the threshold). It may be helpful to disable the "Enable Snapping within: XY-Z" feature for the cursor while doing this + - Manually changing the threshold in the "Specify manually:" input box and clicking the "Apply" button beside it. + - Clicking the "Use explored maximum" button below the threshold input box and click "Apply", which sets the threshold to the maximum explored distance (the value shown in "Max. explored distance:" under the "Search Status" dialog). -Anyway, assuming that you want to use the first of these approaches, you should use the approach described below. It is difficult to set the threshold accurately from the image unless you zoom in, so first zoom on part of the path that you want to set the threshold for. +We will assume that you want to use the first of these approaches: -Since the solid green fill obscures the intensity value of the points in the fill, I suggest that you switch to the semi-transparent view of the fill at this stage by selecting the "Transparent overlay" option in the "Rendering Options" dialog. Note that this may slow down filling. +- It is difficult to set the threshold accurately from the image unless you zoom in, so first zoom on part of the path that you want to set the threshold for. -As you can see in the middle image, the threshold is set too far from the path, since there are many completely dark points under the green fill, as well as points on different paths than those of interest. Experiment with clicking on different points closer to the path in order to adjust the threshold until you are happy with it. You might end up with something like the rightmost image: +- Since the solid green fill obscures the intensity value of the points in the fill, you may want to activate the _Transparent overlay_ checkbox. Note that this _could_ slow down filling, although the performance hit is usually negligible. + +- As you can see in the middle image, the threshold is set too far from the path, since there are many background voxels under the green fill, as well as voxels on different paths than those of interest. Experiment with clicking on different locations closer to the path in order to adjust the threshold until you are satisfied with thr result. You might end up with something like the rightmost image:
Fill, opaque @@ -284,51 +383,38 @@ As you can see in the middle image, the threshold is set too far from the path, Fill, refined
-### III.Completing the Fill +### III. Completing the Fill -If you are happy with this, then you might as well click "Pause" so that your computer isn't spending all its CPU on continuing to explore the image. Then you can either: +If the search is still active, you might as well click "Pause" so halt exploration of the image. Then you can either: -- Save the fill (which will add it to the fill list) by clicking "Stash Progress". -- Discard the fill by either clicking "Stop" while filling is in progress or, if you stashed the fill, select it in the fill list and click "Delete Fill(s)". -- Use the "Image Stack..." button to view the same image stack, but with only the points in that fill preserved. You can choose either a grayscale image or a binary mask. One reason why you might want to do this is that you can then smooth that image and use the [3D Viewer](/plugins/3d-viewer) to do a surface rendering of the neuron. Perhaps then you could overlay that onto a volume rendering of the complete image (see available [tutorials](/plugins/snt#tutorials)). Or, you could save those fill stacks for each of the neurons you fill and then combine them in ImageJ using "RGB Merge". +- Save the fill (which will add it to the fill list) by clicking "Store" -The image stack you would get from the image used in this example might look something like this: +- Discard the fill by either clicking "Cancel/Discard" while filling is in progress or, if you stashed the fill, select it in the fill list and click "Delete" -
- -
+### IV. Exporting -# Generating *Filtered Images* +- The "Export" button provides several export options, including: -This section describes how to generate [Filtered Images](/plugins/snt/manual#tracing-on-filtered-image) outside SNT. Note that the filtering used in this walk-through (*[Frangi](/plugins/frangi) Vesselness*) is already supported directly by SNT. This tutorial will assume you need to perform the filtering with adjusted parameters. + - Binary mask: Only the points in the fill are preserved under a constant value. This is useful to e.g., mask out structures outside the neuron being traced, or to train a [Weka model](/plugins/tws) -#### A Single Image + - Grayscale: Only the points in the fill are preserved under the original pixel intensities. This is useful to e.g., render the structure in the [legacy 3D Viewer](/plugins/3d-viewer) or [sciview](/plugins/sciview) to do a surface rendering of the neuron. -To process a single image with the Frangi Vesselness filter, pause SNT, and select {% include bc path='Process | Filters | Frangi Vesselness'%}. By way of example, let's say you need to enhance strucutres at two scales: twice the x voxel separation and five times that value. We apply a Gaussian convolution at each scale. Assuming your image has isotropic resolution with $$pixel width = pixel height = voxel depth = 1$$, the parameters would be: + - Labels: Each fill gets assigned a unique pixel value, so that all paths are distinguishable from each other. -
- -
- -{% capture tip%} -To get the spatial calibration for your image, go to {% include bc path='Image|Properties...'%} ({% include key keys='Ctrl|Shift|P' %}) in the main Fiji dialog. -{% endcapture %} -{% include notice icon="tip" content=tip %} Save the result using {% include bc path='File | Save As|Tiff...'%} ("test-filtered.tif", for example). Then, in SNT's dialog look for the "Tracing on Secondary Image" widget in the *Main* tab. Click the file folder button to specify the secondary image. Next, toggle the "Trace on Secondary Image" checkbox (you can do so using {% include key key='I' %}. Now the pathfinding will occur on the secondary image. To view a MIP of the secondary image "over" the original image during tracing, toggle the "Render in overlay at X% opacity" checkbox. + - Annotated Distance map: Points along the fill are assigned the _explored distance_ as described earlier. Useful for debugging and/or perusing the fill operation
- Step 1 - Step 2 +
-To display the image in a separate window, from the SNT dialog use {% include bc path='Show Cached Image'%} from the *gear* menu or {% include bc path='View | Show Cached *Secondary Image*'%}: - -
- Secondary Image MIP -
+{% capture text%} +Currently, only the output images/CSV summary of fills can be exported. TRACES files contain only the search parameters of fill operations which allows SNT to recapitulate the search. No information on fills is stored in [SWC files](/plugins/snt/faq#in-which-format-should-i-save-my-tracings-traces-or-swc). +{% endcapture %} +{% include notice icon="info" content=text %} -#### Multiple Images +# Generating *Filtered Images* in Bulk -The easiest way to preprocess multiple images is to record a macro for processing a single image, then wrap it in a loop to iterate over all files in a directory. For example, using IJ1 macro language: +This section describes how to generate [Filtered Images](/plugins/snt/manual#tracing-on-secondary-image-layer) outside SNT in bulk. The easiest way to process multiple images is to 1) record a macro that processes a single image, then 2) wrap it in a loop to iterate over all files in a directory. For example, using IJ1 macro language: {% highlight javascript %} d = getDirectory("Select a directory"); @@ -344,7 +430,7 @@ for( i = 0; i < files.length; ++i ) { expected_window_name = "result"; output_filename = d + File.separator + basename + ".tubes.tif"; open(filename); - run("Frangi Vesselness"); // arguments can be specified here + run("Gaussian Blur...", "sigma=2 scaled stack"); // processing step here selectWindow(expected_window_name); saveAs("Tiff", output_filename); } diff --git a/_pages/plugins/snt/traces-file-format.md b/_pages/plugins/snt/traces-file-format.md index bed4e8d3b7..d6026673e9 100644 --- a/_pages/plugins/snt/traces-file-format.md +++ b/_pages/plugins/snt/traces-file-format.md @@ -1,89 +1,11 @@ --- -mediawiki: SNT:_.traces_File_Format -title: SNT › .traces File Format -nav-links: true -nav-title: .traces File Format +title: TRACES file format +nav-links: false +nav-title: .traces file format +artifact: org.morphonets:SNT +icon: /media/icons/snt.png +forum-tag: snt +update-site: Neuroanatomy --- -## SNT's File Format - -The .traces files that are saved by [SNT](/plugins/snt) are gzipped compressed XML. SNT will also load/save uncompressed XML files, but by default, they are saved in the compressed form. - -The XML DTD is included in the DOCTYPE of each file. The root element is always <tracings>, and this can contain the following elements: - -- [<imagesize>](#.3Cimagesize.3E) -- [<samplespacing>](#.3Csamplespacing.3E) -- [<path>](#.3Cpath.3E) -- [<fill>](#.3Cfill.3E) -- [<node>](#.3Cnode.3E) - -### <imagesize> - -There must be exactly one of these elements present, with attributes that describe the size of the image in terms of number of voxels across, up and down, e.g.: - -```html - -``` - -### <samplespacing> - -There must be exactly one of these elements present, with attributes that describe the spacing of the samples in the image (voxels) in world-coordinates, e.g.: -```html - -``` - -### <path> - -The `` element can have the following attributes: - -- `id`: a non-negative integer ID unique among the ``s in this file -- `startson`: if this is present, it gives the ID of the path which the beginning of this path branches off from. If `startson` is specified, then either the deprecated attribute `startsindex` or the recommended attributes `startsx`, `startsy` `startsz` must be specified as well. -- **\[deprecated\]** `startsindex`: This attribute used to indicate the 0-based index of the point in the other Path where the branch occurred. Please use `startsx`, `startsy` and `startsz` instead. -- `startsx`, `startsy` and `startsz`: These attributes indicate where on the path specified by `startson` the branch occurs. If one of these is attributes is specified, all must be specified. -- `endson`: if this is present, it gives the ID of the path which the branch ends on. If `endson` is specified, then either the deprecated attribute `endsindex` or the recommended attributes `endsx`, `endsy` `endsz` must be specified as well. -- **\[deprecated\]** `endsindex`: This attribute used to indicate the 0-based index of the point in the other Path where this path joins it. Please use `endsx`, `endsy` and `endsz` instead. -- `endsx`, `endsy` and `endsz`: These attributes indicate where on the path specified by `endson` this path ends. If one of these is attributes is specified, all must be specified. -- `name`: A string giving the name of this path -- `reallength`: The length of this path found by summing the Euclidean distance between each consecutive pair of points, in the units specified in <samplespacing> -- `fitted`: If present, this attribute gives the ID of another path which is a version of this path after the centre-line has been adjusted and radiuses at each point found. If this attribute is present, the `fittedversionof` attribute may not be. -- `fittedversionof`: If present, this attribute gives the ID of another path which was the source version for this one. Typically the path specified does not have radiusese defined for each point, although this is not always the case. If this attribute is present, the `fitted` attribute may not be. -- `usefitted`: This attribute must be present if either the `fitted` or `fittedversionof` attributes are. This attribute is either `"true"` or `"false"`. It should only be "true" for paths that have a fitted version, when it implies that the user wants the fitted path to be display in favour of this (the unfitted) one. If "false" and this path has a fitted version, it means that this path should not be displayed. It should always be "false" for paths that are fitted versions of other paths. -{% include notice icon="note" content="This is confusing and regrettable; in later versions this will be replaced by attributes with simpler semantics." %} -- `swctype`: This should be an integer from 0 to 7 inclusive, indicating what the SWC type of the path is. If not present, the default value is 0. The conventional meaning of these values is: - - 0: UNDEFINED - - 1: SOMA - - 2: AXON - - 3: DENDRITE - - 4: APICAL_DENDRITE - - 5: FORK_POINT - - 6: END_POINT - - 7: CUSTOM - -The <path> element may contain zero or more <point> elements. These are described below: - -### <point> - -This represents a point in a path. A point element may have the following attributes: - -- `xd`, `yd`, `zd`: These three attributes give the position of the point in world coordinates. e.g. you can use these coordinates directly to calculate the length of paths. -- **\[deprecated\]** `x`, `y`, `z`: These attributes represent the position of the point in image coordinates (i.e. indices of voxels in each axis). They are still generated for backwards compatibility, but it's better to use `xd`, `yd` and `zd`. -- `r`: If present, this attribute gives the radius of the neuron at that point. -- `tx`, `ty`, `tz`: If present, these attributes give the tangent vector along the neuron at (`xd`, `yd`, `zd`) - -### <fill> - -The `` element represents a fill around a path. It contains all the points found in the search starting from points on the path, but those that actually make up the fill are just those below the threshold specified in the attributes. (This is so that the search can be restarted if the fill is reloaded.) The `` element can have the following attributes: - -- `id`: The ID of the fill, a non-negative integer unique among all the other fill IDs in this file. -- `frompaths`: A comma ( optional space) separated IDs of the paths from which this fill started. e.g. if this attribute is `frompaths="2, 0"` then there are nodes with distance 0 at each of the points on `binary or 8-bit grayscale image (2D or 3D) containing a single arbor, and calls [AnalyzeSkeleton](/plugins/analyze-skeleton)[^2] iteratively to retrieve [Horton-Strahler numbers](#References) from the [skeletonized centerlines](/plugins/skeletonize3d) of the input image. Each iteration includes three operations: + +1. A (re)-skeletonization step to ensure that arbor remains represented by its centerlines +2. an elimination step in which terminal-branches are pruned from the image +3. An analysis step in which pruned branches are counted and measured. The iteration ceases as soon as all branches have been eliminated or a unresolved [closed loop](#elimination-of-skeleton-loops) has been detected in the pruned arbor. +{% include img align="right" width="300" name="Strahler Analysis by iterative elimination of end-point branches" src="strahleranimation" caption="The direct analysis of images occurs through progressive pruning of terminal branches, *iterative tree simplification*, a method that requires detecting all terminal branches (i.e., branches that contain an end-point) and all the degree-one paths leading to them." %} -{% include img align="right" width="300" name="Strahler Analysis by iterative elimination of end-point branches" src="strahleranimation" caption="The analysis occurs through progressive pruning of terminal branches, *iterative tree simplification*, a method that requires detecting all terminal branches (i.e., branches that contain an end-point) and all the degree-one paths leading to them." %} -*Strahler Analysis* takes a binary or 8-bit grayscale image (2D or 3D) containing a single arbor, and calls [AnalyzeSkeleton](/plugins/analyze-skeleton)[^2] iteratively to retrieve [Horton-Strahler numbers](#References) from the [skeletonized centerlines](/plugins/skeletonize3d) of the input image. Each iteration includes three operations: 1) a (re)-skeletonization step to ensure that arbor remains represented by its centerlines, 2) an elimination step in which terminal-branches are pruned from the image and 3) an analysis step in which pruned branches are counted and measured. The iteration ceases as soon as all branches have been eliminated or a unresolved [closed loop](#elimination-of-skeleton-loops) has been detected in the pruned arbor. +**NB: While _Strahler Analysis (Image)..._ remains a functional plugin, you may find its simplicity rather limiting. A more flexible approach may be to convert skeletonized images into traced paths in SNT, and run [Strahler Analysis (Tracings)](/plugins/snt/analysis#strahler-analysis) on them.** ## Parameters ### Tree Classification -#### Infer root end-points from rectangular ROI - -This option is only available when a rectangular ROI is present. It is described in [Non-radial arbors](#non-radial-arbors). +**Infer root end-points from rectangular ROI**: This option is only available when a rectangular ROI is present. It is described in [root detection](#root-detection). -#### Ignore single-point arbors (Isolated pixels) - -Elimination of end-point branches may give rise to single point arbors. Such 'debris' have 1 end-point but no slab branches or junctions. When this option is selected, single-point arbors will be discarded on each iteration. If deselected, the total number of end-points may be overestimated. +**Ignore single-point arbors (Isolated pixels)** Elimination of end-point branches may give rise to single point arbors. Such 'debris' have 1 end-point but no slab branches or junctions. When this option is selected, single-point arbors will be discarded on each iteration. If deselected, the total number of end-points may be overestimated. ### Elimination of Skeleton Loops -#### Method - -*Strahler Analysis* cannot process skeletons containing closed loops and will output a warning message when such structures have been detected. The available methods in this drop-down menu define how closed loops should be resolved by and are described in the [AnalyzeSkeleton documentation page](/plugins/analyze-skeleton#loop-detection-and-pruning). - -#### Unsegmented image +**Method** *Strahler Analysis* cannot process skeletons containing closed loops and will output a warning message when such structures have been detected. The available methods in this drop-down menu define how closed loops should be resolved by and are described in the [AnalyzeSkeleton documentation page](/plugins/analyze-skeleton#loop-detection-and-pruning). -The initial non-thinned image to be used by [AnalyzeSkeleton](/plugins/analyze-skeleton) for [intensity-based](/plugins/analyze-skeleton#loop-detection-and-pruning) elimination of closed loops. This option is only used if either *Lowest intensity voxel* or *Lowest intensity branch* is chosen as *Method*. Note that if an intensity-based method is selected but the chosen image is a binary one, closed loops will not be resolved. +***Unsegmented image*** The initial non-thinned image to be used by [AnalyzeSkeleton](/plugins/analyze-skeleton) for [intensity-based](/plugins/analyze-skeleton#loop-detection-and-pruning) elimination of closed loops. This option is only used if either *Lowest intensity voxel* or *Lowest intensity branch* is chosen as *Method*. Note that if an intensity-based method is selected but the chosen image is a binary one, closed loops will not be resolved. ### Output Options -#### Display Iteration stack +***Display Iteration stack*** If checked, an image stack that documents individual pruning cycles will be displayed. End-points and Junction-points positions are appended to the stack. -If checked, an image stack that documents individual pruning cycles will be displayed. End-points and Junction-points positions are appended to the stack. - -#### Show detailed information - -If checked, analysis will run in *verbose* mode by outputting detailed measurements and by logging debug messages. +***Show detailed information*** If checked, analysis will run in *verbose* mode by outputting detailed measurements and by logging debug messages. ## Root Detection -The problem with undiscriminated elimination of terminal branches is that a root-branch containing an end-point is always eliminated on the first iteration step. In order to protect root branches from elimination, *Strahler Analysis* needs to know where root branches are located. Root-detection is implemented by means of a rectangular ROI containing the root branch and by activating the *Infer root end-points from rectangular ROI* option. Here is an example: +{% include img align="right" width="600px" src="/media/plugins/strahler-rootprotection.png" caption="**Left**: Arbor with rectangular ROI containing root. **Middle**: Analysis ignores ROI. Root-branch is interpreted as any other terminal-branch and the resulting classification is inaccurate. **Right**: Analysis takes ROI into account and infers that the end-point contained by the ROI is the root of the structure. Root branch is excluded from the iteration and the classification is accurate." %} -{% include img align="center" width="600px" src="/media/plugins/strahler-rootprotection.png" caption="**Left**: Arbor with rectangular ROI containing root. **Middle**: Analysis ignores ROI. Root-branch is interpreted as any other terminal-branch and the resulting classification is inaccurate. **Right**: Analysis takes ROI into account and infers that the end-point contained by the ROI is the root of the structure. Root branch is excluded from the iteration and the classification is accurate." %} +The problem with undiscriminated elimination of terminal branches is that a root-branch containing an end-point is always eliminated on the first iteration step. In order to protect root branches from elimination, *Strahler Analysis* needs to know where root branches are located. Root-detection is implemented by means of a rectangular ROI containing the root branch and by activating the *Infer root end-points from rectangular ROI* option. Here is an example: ### Notes on Root Detection @@ -68,59 +76,42 @@ The problem with undiscriminated elimination of terminal branches is that a root - Root detection may not be required in the case of radial arbors (i.e., tree-like structures that branch out evenly in multiple directions), if root(s) remain connected in the center of the arbor (as in the [animation above](#strahler-animation)). In neurobiology, radial-ramification is an anatomical hallmark of certain cell types such as Retinal Ganglion Cells, Chandelier neurons or Drosophila Class IV sensory neurons. - If you are batch processing multiple images you should work with .tif files: When saving as TIFF, ImageJ will store the active ROI in the image header, making it immediately available when the image is open. -## Results - -The plugin produces three types of outputs: +## Outputs -### Strahler Image +The plugin produces three types of results: -A heat-map image, in which branches are color-coded by their Horton-Strahler numbers. By default, a calibration ramp ({% include bc path='Analyze|Tools|Calibration Bar...'%}) is added as an overlay. WYSIWYG versions (RGB images) of this *Strahler Color Map* image can be obtained by pressing {% include key keys='Shift|F' %} (shortcut for {% include bc path='Image|Overlay|Flatten'%}). +1. ***Strahler Image***: A heat-map image, in which branches are color-coded by their Horton-Strahler numbers. By default, a calibration ramp ({% include bc path='Analyze|Tools|Calibration Bar...'%}) is added as an overlay. WYSIWYG versions (RGB images) of this *Strahler Color Map* image can be obtained by pressing {% include key keys='Shift|F' %} (shortcut for {% include bc path='Image|Overlay|Flatten'%}). -### Strahler table +2. ***Strahler table*** Table listing Horton-Strahler counts. The extension and format of this *Strahler Table* can be specified in {% include bc path='Edit|Options|Input/Output...'%}. It contains the following data: -Table listing Horton-Strahler counts. The extension and format of this *Strahler Table* can be specified in {% include bc path='Edit|Options|Input/Output...'%}. It contains the following data: + * End-point Branches - The number of branches for each Horton-Strahler order. + * Ramification ratios - Ramification or {% include wikipedia title='Strahler number#Bifurcation_ratio' text='bifurcation ratios'%} are the quotients between branches of consecutive orders. An overall ratio may be obtained by averaging ratios across orders. -* End-point Branches - The number of branches for each Horton-Strahler order. +3. ***Iteration log*** If *Show detailed information* is checked, *Average branch length*, *N. of trees*, *N. of branches*, *N. of junctions*, *N. of triple points*, *N. of quadruple points* are also retrieved for each iteration. These are described in the AnalyzeSkeleton's [documentation page](/plugins/analyze-skeleton#table-of-results). -* Ramification ratios - Ramification or {% include wikipedia title='Strahler number#Bifurcation_ratio' text='bifurcation ratios'%} are the quotients between branches of consecutive orders. An overall ratio may be obtained by averaging ratios across orders. -### Iteration log +## Limitations and Comparison to _Strahler Analysis (Tracings)_ +{% include img align="right" width="800px" src="/media/plugins/snt/strahler-analysis-from-reconstructions.png" caption="[Strahler Analysis (Tracings)](/plugins/snt/analysis#strahler-analysis) provides more detailed quantifications at the expense of reconstruction." %} +There are two major limitations with parsing images directly: -If *Show detailed information* is checked, *Average branch length*, *N. of trees*, *N. of branches*, *N. of junctions*, *N. of triple points*, *N. of quadruple points* are also retrieved for each iteration. These are described in the AnalyzeSkeleton's [documentation page](/plugins/analyze-skeleton#table-of-results). +1. Accuracy of skeletonization: The analysis can only be as accurate as the image segmentation. For many images (specially those depicting simpler structures) this may not be an issue, but you should always be critical of results obtained from ill-segmentation. If your images are not ameanable to direct parsing, consider reconstructing them in SNT beforehand -## Installation +2. Simple morphometry: Because no reconstruction is performed, the type of measurements that is performed at each Strahler order is rather limited. For detailed morphometry, consider automatic reconstruction of the skeletonized image in SNT using the _Extract Paths from Segmented Image..._ command. -To use *Strahler Analysis* you must install [SNT](/plugins/snt#installation). ## Related Tools -- [SNT](/plugins/snt) - [Sholl Analysis](/plugins/sholl-analysis) - [AnalyzeSkeleton](/plugins/analyze-skeleton) and [Skeletonize3D](/plugins/skeletonize3d), analysis of topographic skeletons (see also [BoneJ](/plugins/bonej) that has made several improvemts to skeletonization routines) -## Citing - -The authoritative reference for *Strahler Analysis* is: - -{% include citation id='plugins/snt' %} - -The authoritative reference for *AnalyzeSkeleton* is: - -{% include citation id='plugins/analyze-skeleton' %} +## Citing -## Acknowledgments +- The authoritative reference for *Strahler Analysis* plugins is the SNT publication: {% include citation id='plugins/snt' %} +- The authoritative reference for *AnalyzeSkeleton* is: {% include citation id='plugins/analyze-skeleton' %} -To all the developers of [AnalyzeSkeleton](https://github.com/fiji/AnalyzeSkeleton/graphs/contributors). ## References -Original publications by {% include wikipedia title='Robert E. Horton' text='Robert E. Horton'%} and {% include wikipedia title='Arthur Newell Strahler' text='Arthur N. Strahler'%}: - -- Arthur N, Strahler H. Hypsometric (Area-Altitude) Analysis Of Erosional Topography. GSA Bulletin 1952;; 63 (11): 1117–1142. doi: [10.1130/0016-7606(1952)63[1117:HAAOET]2.0.CO;2](https://doi.org/10.1130/0016-7606(1952)63[1117:HAAOET]2.0.CO;2) - -- {% include citation doi='10.1029/TR038i006p00913' %} ([PDF](http://www.uvm.edu/~pdodds/files/papers/others/1957/strahler1957a.pdf)) - - -[^1]: {% include citation id='plugins/snt' %} [^2]: {% include citation id='plugins/analyze-skeleton' %} +[^3]: Original publications by {% include wikipedia title='Robert E. Horton' text='Robert E. Horton'%} and {% include wikipedia title='Arthur Newell Strahler' text='Arthur N. Strahler'%}:
Arthur N, Strahler H. Hypsometric (Area-Altitude) Analysis Of Erosional Topography. GSA Bulletin 1952; 63 (11): 1117–1142. doi: [10.1130/0016-7606(1952)63[1117:HAAOET]2.0.CO;2](https://doi.org/10.1130/0016-7606(1952)63[1117:HAAOET]2.0.CO;2)
{% include citation doi='10.1029/TR038i006p00913' %} ([PDF](http://www.uvm.edu/~pdodds/files/papers/others/1957/strahler1957a.pdf)) \ No newline at end of file diff --git a/_pages/plugins/tubeness.md b/_pages/plugins/tubeness.md index a9914f81f2..2a0dcc618f 100644 --- a/_pages/plugins/tubeness.md +++ b/_pages/plugins/tubeness.md @@ -1,25 +1,26 @@ --- -mediawiki: Tubeness name: "Tubeness" title: Tubeness +project: /software/imagej2 +artifact: net.imagej:imagej-ops +icon: /media/icons/imagej2.png +doi: 10.1016/s1361-8415(98)80009-1 categories: [Uncategorized] -dev-status: "stable" -team-founders: ['@mhl', '@StephanPreibisch'] -team-maintainer: '@mhl' --- +_Tubeness_ is an algorithm for enhancing filamentous structures of a specified thickness (blood vessels, neurites, and other tube-like structures)described by Sato et al 1998.[^1]. It can be applied to 2D and 3D images. It can be a faster alternative to [Frangi](/plugins/frangi). The algorithm is explained in more detail [here](https://github.com/imagej/imagej-ops/pull/527). There are three _Tubeness_ implementations in ImageJ: -{% capture source%} -{% include github org='fiji' repo='VIB' branch='master' source='features/Tubeness_.java' %} -{% endcapture %} -{% include info-box filename='VIB\_.jar' source=source %} +- Legacy plugin (In Fiji registered under {% include bc path='Plugins|Analyze|Tubeness' %} ([source code](https://github.com/fiji/VIB/blob/master/src/main/java/features/Tubeness_.java)). This is now deprecated. +- An [ImageJ Op](/libs/imagej-ops/index). This is a modernized, multithreaded version of the initial implemenation that has been validated/benchmarked more carefully ([details](https://github.com/imagej/imagej-ops/pull/527)) -{% capture text%} -A multithreaded implementation of the original IJ1 Tubeness plugin has been [developed](https://github.com/imagej/imagej-ops/pull/527) by {% include person id='tinevez' %} in the context of [ImageJ\_Ops](/libs/imagej-ops). -{% endcapture %} -{% include notice icon="info" content=text %} +- An [SNT](/plugins/snt) implementation ([source code](https://github.com/morphonets/SNT/tree/master/src/main/java/sc/fiji/snt/filter)) that extends the ImageJ Op approach to multiple scales (similarly to [Frangi](/plugins/frangi)) for better detection of neurites. SNT's [Secondary Layer Wizard](/plugins/snt/manual#tracing-on-secondary-image) can also be used to preview the effect of scale size in the result. -The original documentation for the IJ1 Tubeness plugin can be found at http://homepages.inf.ed.ac.uk/s9808248/imagej/tubeness/. +{% include img align="center" width="600px" src="/media/plugins/tubeness-before-and-after.png" caption="Tubeness: Left: Original image. Right: Filtered image." %} + + + + +{% include citation fn=1 %} diff --git a/media/before-frangi.png b/media/before-frangi.png deleted file mode 100644 index 110228e2b5..0000000000 Binary files a/media/before-frangi.png and /dev/null differ diff --git a/media/plugins/frangi-before-and-after.png b/media/plugins/frangi-before-and-after.png index 81dfd11cce..e2a1572611 100644 Binary files a/media/plugins/frangi-before-and-after.png and b/media/plugins/frangi-before-and-after.png differ diff --git a/media/plugins/snt/brain-analysis-combined-boxplot.png b/media/plugins/snt/brain-analysis-combined-boxplot.png new file mode 100644 index 0000000000..2c8f3f37a0 Binary files /dev/null and b/media/plugins/snt/brain-analysis-combined-boxplot.png differ diff --git a/media/plugins/snt/brain-analysis-group-boxplot.png b/media/plugins/snt/brain-analysis-group-boxplot.png new file mode 100644 index 0000000000..6606ba9806 Binary files /dev/null and b/media/plugins/snt/brain-analysis-group-boxplot.png differ diff --git a/media/plugins/snt/command-palette.png b/media/plugins/snt/command-palette.png index e7a563c931..fef5a61fe3 100644 Binary files a/media/plugins/snt/command-palette.png and b/media/plugins/snt/command-palette.png differ diff --git a/media/plugins/snt/cursor-snap.png b/media/plugins/snt/cursor-snap.png index 1cc4f63993..7fd148472b 100644 Binary files a/media/plugins/snt/cursor-snap.png and b/media/plugins/snt/cursor-snap.png differ diff --git a/media/plugins/snt/fill-manager-v420.png b/media/plugins/snt/fill-manager-v420.png new file mode 100644 index 0000000000..a99acadb61 Binary files /dev/null and b/media/plugins/snt/fill-manager-v420.png differ diff --git a/media/plugins/snt/filling-output-examples.png b/media/plugins/snt/filling-output-examples.png new file mode 100644 index 0000000000..078920ee77 Binary files /dev/null and b/media/plugins/snt/filling-output-examples.png differ diff --git a/media/plugins/snt/graph-viewer-dendrogram-color-coded.png b/media/plugins/snt/graph-viewer-dendrogram-color-coded.png new file mode 100644 index 0000000000..30fb3deb63 Binary files /dev/null and b/media/plugins/snt/graph-viewer-dendrogram-color-coded.png differ diff --git a/media/plugins/snt/graph-viewer-dendrogram-simple.png b/media/plugins/snt/graph-viewer-dendrogram-simple.png new file mode 100644 index 0000000000..d21e5fd08d Binary files /dev/null and b/media/plugins/snt/graph-viewer-dendrogram-simple.png differ diff --git a/media/plugins/snt/graph-viewer-ferris-wheel.png b/media/plugins/snt/graph-viewer-ferris-wheel.png new file mode 100644 index 0000000000..f3bc25337e Binary files /dev/null and b/media/plugins/snt/graph-viewer-ferris-wheel.png differ diff --git a/media/plugins/snt/path-visibility-filters.png b/media/plugins/snt/path-visibility-filters.png index 2b5ec5c6da..1be5b8ec4a 100644 Binary files a/media/plugins/snt/path-visibility-filters.png and b/media/plugins/snt/path-visibility-filters.png differ diff --git a/media/plugins/snt/sankey-flow-plot-with-tooltip.png b/media/plugins/snt/sankey-flow-plot-with-tooltip.png new file mode 100644 index 0000000000..502a4ea194 Binary files /dev/null and b/media/plugins/snt/sankey-flow-plot-with-tooltip.png differ diff --git a/media/plugins/snt/sholl-analysis-by-focal-point.png b/media/plugins/snt/sholl-analysis-by-focal-point.png new file mode 100644 index 0000000000..929318af9e Binary files /dev/null and b/media/plugins/snt/sholl-analysis-by-focal-point.png differ diff --git a/media/plugins/snt/sholl-analysis-outputs.png b/media/plugins/snt/sholl-analysis-outputs.png new file mode 100644 index 0000000000..cf1d8838f5 Binary files /dev/null and b/media/plugins/snt/sholl-analysis-outputs.png differ diff --git a/media/plugins/snt/snt-3d-tab.png b/media/plugins/snt/snt-3d-tab.png index f1ff0932fe..a6e6954dfd 100644 Binary files a/media/plugins/snt/snt-3d-tab.png and b/media/plugins/snt/snt-3d-tab.png differ diff --git a/media/plugins/snt/snt-auto-tracing.png b/media/plugins/snt/snt-auto-tracing.png index 3c804effc1..ceacdc62ca 100644 Binary files a/media/plugins/snt/snt-auto-tracing.png and b/media/plugins/snt/snt-auto-tracing.png differ diff --git a/media/plugins/snt/snt-combined-histograms.png b/media/plugins/snt/snt-combined-histograms.png new file mode 100644 index 0000000000..c315eeb24b Binary files /dev/null and b/media/plugins/snt/snt-combined-histograms.png differ diff --git a/media/plugins/snt/snt-compare-groups-prompt.png b/media/plugins/snt/snt-compare-groups-prompt.png new file mode 100644 index 0000000000..b748658e16 Binary files /dev/null and b/media/plugins/snt/snt-compare-groups-prompt.png differ diff --git a/media/plugins/snt/snt-compare-reconstructions-overview.png b/media/plugins/snt/snt-compare-reconstructions-overview.png new file mode 100644 index 0000000000..44a5d1fb58 Binary files /dev/null and b/media/plugins/snt/snt-compare-reconstructions-overview.png differ diff --git a/media/plugins/snt/snt-contextual-menu.png b/media/plugins/snt/snt-contextual-menu.png new file mode 100644 index 0000000000..4ce92790fb Binary files /dev/null and b/media/plugins/snt/snt-contextual-menu.png differ diff --git a/media/plugins/snt/snt-data-source-widget.png b/media/plugins/snt/snt-data-source-widget.png index 4171de00eb..66ce650229 100644 Binary files a/media/plugins/snt/snt-data-source-widget.png and b/media/plugins/snt/snt-data-source-widget.png differ diff --git a/media/plugins/snt/snt-fully-automated-reconstructions.png b/media/plugins/snt/snt-fully-automated-reconstructions.png new file mode 100644 index 0000000000..669bf46820 Binary files /dev/null and b/media/plugins/snt/snt-fully-automated-reconstructions.png differ diff --git a/media/plugins/snt/snt-main-gui.png b/media/plugins/snt/snt-main-gui.png new file mode 100644 index 0000000000..dcc0e0aad1 Binary files /dev/null and b/media/plugins/snt/snt-main-gui.png differ diff --git a/media/plugins/snt/snt-measurements-prompt.png b/media/plugins/snt/snt-measurements-prompt.png new file mode 100644 index 0000000000..c5402eafdc Binary files /dev/null and b/media/plugins/snt/snt-measurements-prompt.png differ diff --git a/media/plugins/snt/snt-non-neuronal-example.png b/media/plugins/snt/snt-non-neuronal-example.png new file mode 100644 index 0000000000..75f11631ed Binary files /dev/null and b/media/plugins/snt/snt-non-neuronal-example.png differ diff --git a/media/plugins/snt/snt-options-tab.png b/media/plugins/snt/snt-options-tab.png new file mode 100644 index 0000000000..9f55d96e5a Binary files /dev/null and b/media/plugins/snt/snt-options-tab.png differ diff --git a/media/plugins/snt/snt-path-edit-right-click-menu-active.png b/media/plugins/snt/snt-path-edit-right-click-menu-active.png index bf877715ef..d5276d3623 100644 Binary files a/media/plugins/snt/snt-path-edit-right-click-menu-active.png and b/media/plugins/snt/snt-path-edit-right-click-menu-active.png differ diff --git a/media/plugins/snt/snt-recover-from-snapshot-old.png b/media/plugins/snt/snt-recover-from-snapshot-old.png new file mode 100644 index 0000000000..3fac87c674 Binary files /dev/null and b/media/plugins/snt/snt-recover-from-snapshot-old.png differ diff --git a/media/plugins/snt/snt-recover-from-snapshot.png b/media/plugins/snt/snt-recover-from-snapshot.png new file mode 100644 index 0000000000..26fd5c9813 Binary files /dev/null and b/media/plugins/snt/snt-recover-from-snapshot.png differ diff --git a/media/plugins/snt/snt-script-recorder.png b/media/plugins/snt/snt-script-recorder.png new file mode 100644 index 0000000000..9cdebe79c2 Binary files /dev/null and b/media/plugins/snt/snt-script-recorder.png differ diff --git a/media/plugins/snt/snt-scripts-menu.png b/media/plugins/snt/snt-scripts-menu.png new file mode 100644 index 0000000000..dbf00a45c0 Binary files /dev/null and b/media/plugins/snt/snt-scripts-menu.png differ diff --git a/media/plugins/snt/snt-secondary-layer-menu.png b/media/plugins/snt/snt-secondary-layer-menu.png new file mode 100644 index 0000000000..ca1b88e004 Binary files /dev/null and b/media/plugins/snt/snt-secondary-layer-menu.png differ diff --git a/media/plugins/snt/snt-secondary-layer-wizard-prompt.png b/media/plugins/snt/snt-secondary-layer-wizard-prompt.png new file mode 100644 index 0000000000..3873675b7a Binary files /dev/null and b/media/plugins/snt/snt-secondary-layer-wizard-prompt.png differ diff --git a/media/plugins/snt/snt-secondary-layer-wizard.png b/media/plugins/snt/snt-secondary-layer-wizard.png new file mode 100644 index 0000000000..641f55101e Binary files /dev/null and b/media/plugins/snt/snt-secondary-layer-wizard.png differ diff --git a/media/plugins/snt/snt-startup-prompt.png b/media/plugins/snt/snt-startup-prompt.png index a409f0267f..0f401e75ae 100644 Binary files a/media/plugins/snt/snt-startup-prompt.png and b/media/plugins/snt/snt-startup-prompt.png differ diff --git a/media/plugins/snt/simpleneuritetracer2.png b/media/plugins/snt/snt-v3-overview.png similarity index 100% rename from media/plugins/snt/simpleneuritetracer2.png rename to media/plugins/snt/snt-v3-overview.png diff --git a/media/plugins/snt/strahler-analysis-from-reconstructions.png b/media/plugins/snt/strahler-analysis-from-reconstructions.png new file mode 100644 index 0000000000..525b39a83a Binary files /dev/null and b/media/plugins/snt/strahler-analysis-from-reconstructions.png differ diff --git a/media/plugins/snt/default-path-colors.png b/media/plugins/snt/unused/default-path-colors.png similarity index 100% rename from media/plugins/snt/default-path-colors.png rename to media/plugins/snt/unused/default-path-colors.png diff --git a/media/plugins/snt/display-filtered-image.png b/media/plugins/snt/unused/display-filtered-image.png similarity index 100% rename from media/plugins/snt/display-filtered-image.png rename to media/plugins/snt/unused/display-filtered-image.png diff --git a/media/plugins/snt/filtered-image-load.png b/media/plugins/snt/unused/filtered-image-load.png similarity index 100% rename from media/plugins/snt/filtered-image-load.png rename to media/plugins/snt/unused/filtered-image-load.png diff --git a/media/plugins/snt/filtered-image-toggle.png b/media/plugins/snt/unused/filtered-image-toggle.png similarity index 100% rename from media/plugins/snt/filtered-image-toggle.png rename to media/plugins/snt/unused/filtered-image-toggle.png diff --git a/media/plugins/snt/frangi-parameters.png b/media/plugins/snt/unused/frangi-parameters.png similarity index 100% rename from media/plugins/snt/frangi-parameters.png rename to media/plugins/snt/unused/frangi-parameters.png diff --git a/media/plugins/simple-neurite-tracer/accurate-point-placement-1.png b/media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-1.png similarity index 100% rename from media/plugins/simple-neurite-tracer/accurate-point-placement-1.png rename to media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-1.png diff --git a/media/plugins/simple-neurite-tracer/accurate-point-placement-2.png b/media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-2.png similarity index 100% rename from media/plugins/simple-neurite-tracer/accurate-point-placement-2.png rename to media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-2.png diff --git a/media/plugins/simple-neurite-tracer/accurate-point-placement-3.png b/media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-3.png similarity index 100% rename from media/plugins/simple-neurite-tracer/accurate-point-placement-3.png rename to media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-3.png diff --git a/media/plugins/simple-neurite-tracer/accurate-point-placement-4.png b/media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-4.png similarity index 100% rename from media/plugins/simple-neurite-tracer/accurate-point-placement-4.png rename to media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-4.png diff --git a/media/plugins/simple-neurite-tracer/accurate-point-placement-5.png b/media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-5.png similarity index 100% rename from media/plugins/simple-neurite-tracer/accurate-point-placement-5.png rename to media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-5.png diff --git a/media/plugins/simple-neurite-tracer/accurate-point-placement-6.png b/media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-6.png similarity index 100% rename from media/plugins/simple-neurite-tracer/accurate-point-placement-6.png rename to media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-6.png diff --git a/media/plugins/simple-neurite-tracer/accurate-point-placement-7.png b/media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-7.png similarity index 100% rename from media/plugins/simple-neurite-tracer/accurate-point-placement-7.png rename to media/plugins/snt/unused/simple-neurite-tracer/accurate-point-placement-7.png diff --git a/media/plugins/simple-neurite-tracer/export-to-swc-tutorial-1.png b/media/plugins/snt/unused/simple-neurite-tracer/export-to-swc-tutorial-1.png similarity index 100% rename from media/plugins/simple-neurite-tracer/export-to-swc-tutorial-1.png rename to media/plugins/snt/unused/simple-neurite-tracer/export-to-swc-tutorial-1.png diff --git a/media/plugins/simple-neurite-tracer/export-to-swc-tutorial-2.png b/media/plugins/snt/unused/simple-neurite-tracer/export-to-swc-tutorial-2.png similarity index 100% rename from media/plugins/simple-neurite-tracer/export-to-swc-tutorial-2.png rename to media/plugins/snt/unused/simple-neurite-tracer/export-to-swc-tutorial-2.png diff --git a/media/plugins/simple-neurite-tracer/export-to-swc-tutorial-3.png b/media/plugins/snt/unused/simple-neurite-tracer/export-to-swc-tutorial-3.png similarity index 100% rename from media/plugins/simple-neurite-tracer/export-to-swc-tutorial-3.png rename to media/plugins/snt/unused/simple-neurite-tracer/export-to-swc-tutorial-3.png diff --git a/media/plugins/simple-neurite-tracer/save-all-as-swc.png b/media/plugins/snt/unused/simple-neurite-tracer/save-all-as-swc.png similarity index 100% rename from media/plugins/simple-neurite-tracer/save-all-as-swc.png rename to media/plugins/snt/unused/simple-neurite-tracer/save-all-as-swc.png diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-1.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-1.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-1.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-1.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-10.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-10.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-10.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-10.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-11.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-11.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-11.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-11.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-12.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-12.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-12.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-12.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-13.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-13.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-13.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-13.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-2.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-2.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-2.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-2.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-3.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-3.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-3.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-3.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-4.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-4.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-4.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-4.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-5.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-5.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-5.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-5.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-6.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-6.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-6.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-6.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-7.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-7.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-7.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-7.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-8.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-8.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-8.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-8.jpg diff --git a/media/plugins/simple-neurite-tracer/sholl-analysis-9.jpg b/media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-9.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/sholl-analysis-9.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/sholl-analysis-9.jpg diff --git a/media/plugins/simple-neurite-tracer/simple-neurite-tracer.jpg b/media/plugins/snt/unused/simple-neurite-tracer/simple-neurite-tracer.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/simple-neurite-tracer.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/simple-neurite-tracer.jpg diff --git a/media/plugins/simple-neurite-tracer/simpleneuritetracer.jpg b/media/plugins/snt/unused/simple-neurite-tracer/simpleneuritetracer.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/simpleneuritetracer.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/simpleneuritetracer.jpg diff --git a/media/plugins/simple-neurite-tracer/snapshot.jpg b/media/plugins/snt/unused/simple-neurite-tracer/snapshot.jpg similarity index 100% rename from media/plugins/simple-neurite-tracer/snapshot.jpg rename to media/plugins/snt/unused/simple-neurite-tracer/snapshot.jpg diff --git a/media/plugins/simple-neurite-tracer/snt-after-setting-swc-types.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-after-setting-swc-types.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-after-setting-swc-types.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-after-setting-swc-types.png diff --git a/media/plugins/simple-neurite-tracer/snt-confirm-tubes-tif.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-confirm-tubes-tif.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-confirm-tubes-tif.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-confirm-tubes-tif.png diff --git a/media/plugins/simple-neurite-tracer/snt-confirmed-path.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-confirmed-path.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-confirmed-path.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-confirmed-path.png diff --git a/media/plugins/simple-neurite-tracer/snt-initial-dialog.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-initial-dialog.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-initial-dialog.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-initial-dialog.png diff --git a/media/plugins/simple-neurite-tracer/snt-multiple-paths.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-multiple-paths.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-multiple-paths.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-multiple-paths.png diff --git a/media/plugins/simple-neurite-tracer/snt-sb-before-selecting.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-sb-before-selecting.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-sb-before-selecting.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-sb-before-selecting.png diff --git a/media/plugins/simple-neurite-tracer/snt-sb-before-starting-path.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-sb-before-starting-path.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-sb-before-starting-path.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-sb-before-starting-path.png diff --git a/media/plugins/simple-neurite-tracer/snt-searching-for-path.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-searching-for-path.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-searching-for-path.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-searching-for-path.png diff --git a/media/plugins/simple-neurite-tracer/snt-set-to-soma.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-set-to-soma.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-set-to-soma.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-set-to-soma.png diff --git a/media/plugins/simple-neurite-tracer/snt-temporary-path.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-temporary-path.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-temporary-path.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-temporary-path.png diff --git a/media/plugins/simple-neurite-tracer/snt-tracer-starting.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-tracer-starting.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-tracer-starting.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-tracer-starting.png diff --git a/media/plugins/simple-neurite-tracer/snt-use-preprocessed-image.png b/media/plugins/snt/unused/simple-neurite-tracer/snt-use-preprocessed-image.png similarity index 100% rename from media/plugins/simple-neurite-tracer/snt-use-preprocessed-image.png rename to media/plugins/snt/unused/simple-neurite-tracer/snt-use-preprocessed-image.png diff --git a/media/plugins/snt/snt-compare-reconstruction-group-box-plot.png b/media/plugins/snt/unused/snt-compare-reconstruction-group-box-plot.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstruction-group-box-plot.png rename to media/plugins/snt/unused/snt-compare-reconstruction-group-box-plot.png diff --git a/media/plugins/snt/snt-compare-reconstruction-group-histogram.png b/media/plugins/snt/unused/snt-compare-reconstruction-group-histogram.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstruction-group-histogram.png rename to media/plugins/snt/unused/snt-compare-reconstruction-group-histogram.png diff --git a/media/plugins/snt/snt-compare-reconstruction-group-render1.png b/media/plugins/snt/unused/snt-compare-reconstruction-group-render1.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstruction-group-render1.png rename to media/plugins/snt/unused/snt-compare-reconstruction-group-render1.png diff --git a/media/plugins/snt/snt-compare-reconstruction-group-render2.png b/media/plugins/snt/unused/snt-compare-reconstruction-group-render2.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstruction-group-render2.png rename to media/plugins/snt/unused/snt-compare-reconstruction-group-render2.png diff --git a/media/plugins/snt/snt-compare-reconstruction-group-statistics-window.png b/media/plugins/snt/unused/snt-compare-reconstruction-group-statistics-window.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstruction-group-statistics-window.png rename to media/plugins/snt/unused/snt-compare-reconstruction-group-statistics-window.png diff --git a/media/plugins/snt/snt-compare-reconstructions-group-file-chooser.png b/media/plugins/snt/unused/snt-compare-reconstructions-group-file-chooser.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstructions-group-file-chooser.png rename to media/plugins/snt/unused/snt-compare-reconstructions-group-file-chooser.png diff --git a/media/plugins/snt/snt-compare-reconstructions-single-3dviewer-result.png b/media/plugins/snt/unused/snt-compare-reconstructions-single-3dviewer-result.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstructions-single-3dviewer-result.png rename to media/plugins/snt/unused/snt-compare-reconstructions-single-3dviewer-result.png diff --git a/media/plugins/snt/snt-compare-reconstructions-single-file-chooser.png b/media/plugins/snt/unused/snt-compare-reconstructions-single-file-chooser.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstructions-single-file-chooser.png rename to media/plugins/snt/unused/snt-compare-reconstructions-single-file-chooser.png diff --git a/media/plugins/snt/snt-compare-reconstructions-single-measurements-table.png b/media/plugins/snt/unused/snt-compare-reconstructions-single-measurements-table.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstructions-single-measurements-table.png rename to media/plugins/snt/unused/snt-compare-reconstructions-single-measurements-table.png diff --git a/media/plugins/snt/snt-compare-reconstructions-single-or-group-choice.png b/media/plugins/snt/unused/snt-compare-reconstructions-single-or-group-choice.png similarity index 100% rename from media/plugins/snt/snt-compare-reconstructions-single-or-group-choice.png rename to media/plugins/snt/unused/snt-compare-reconstructions-single-or-group-choice.png diff --git a/media/plugins/snt/snt-dendrogram-shortcuts.png b/media/plugins/snt/unused/snt-dendrogram-shortcuts.png similarity index 100% rename from media/plugins/snt/snt-dendrogram-shortcuts.png rename to media/plugins/snt/unused/snt-dendrogram-shortcuts.png diff --git a/media/plugins/snt/snt-dendrogram-viewer.png b/media/plugins/snt/unused/snt-dendrogram-viewer.png similarity index 100% rename from media/plugins/snt/snt-dendrogram-viewer.png rename to media/plugins/snt/unused/snt-dendrogram-viewer.png diff --git a/media/plugins/snt/snt-estimate-radii-histogram-result.png b/media/plugins/snt/unused/snt-estimate-radii-histogram-result.png similarity index 100% rename from media/plugins/snt/snt-estimate-radii-histogram-result.png rename to media/plugins/snt/unused/snt-estimate-radii-histogram-result.png diff --git a/media/plugins/snt/snt-estimate-radii-image-result.png b/media/plugins/snt/unused/snt-estimate-radii-image-result.png similarity index 100% rename from media/plugins/snt/snt-estimate-radii-image-result.png rename to media/plugins/snt/unused/snt-estimate-radii-image-result.png diff --git a/media/plugins/snt/snt-filling-statistics-2.png b/media/plugins/snt/unused/snt-filling-statistics-2.png similarity index 100% rename from media/plugins/snt/snt-filling-statistics-2.png rename to media/plugins/snt/unused/snt-filling-statistics-2.png diff --git a/media/plugins/snt/snt-filling-viewed-2.png b/media/plugins/snt/unused/snt-filling-viewed-2.png similarity index 100% rename from media/plugins/snt/snt-filling-viewed-2.png rename to media/plugins/snt/unused/snt-filling-viewed-2.png diff --git a/media/snt-measure-results-table.png b/media/plugins/snt/unused/snt-measure-results-table.png similarity index 100% rename from media/snt-measure-results-table.png rename to media/plugins/snt/unused/snt-measure-results-table.png diff --git a/media/plugins/snt/snt-path-manager-measurements.png b/media/plugins/snt/unused/snt-path-manager-measurements.png similarity index 100% rename from media/plugins/snt/snt-path-manager-measurements.png rename to media/plugins/snt/unused/snt-path-manager-measurements.png diff --git a/media/plugins/snt/snt-path-order-analysis-plot.png b/media/plugins/snt/unused/snt-path-order-analysis-plot.png similarity index 100% rename from media/plugins/snt/snt-path-order-analysis-plot.png rename to media/plugins/snt/unused/snt-path-order-analysis-plot.png diff --git a/media/plugins/snt/snt-path-order-analysis-table.png b/media/plugins/snt/unused/snt-path-order-analysis-table.png similarity index 100% rename from media/plugins/snt/snt-path-order-analysis-table.png rename to media/plugins/snt/unused/snt-path-order-analysis-table.png diff --git a/media/plugins/snt/snt-sholl-coarse-intructions.png b/media/plugins/snt/unused/snt-sholl-coarse-intructions.png similarity index 100% rename from media/plugins/snt/snt-sholl-coarse-intructions.png rename to media/plugins/snt/unused/snt-sholl-coarse-intructions.png diff --git a/media/plugins/snt/snt-sholl-color-map-mask.png b/media/plugins/snt/unused/snt-sholl-color-map-mask.png similarity index 100% rename from media/plugins/snt/snt-sholl-color-map-mask.png rename to media/plugins/snt/unused/snt-sholl-color-map-mask.png diff --git a/media/plugins/snt/snt-sholl-color-map.png b/media/plugins/snt/unused/snt-sholl-color-map.png similarity index 100% rename from media/plugins/snt/snt-sholl-color-map.png rename to media/plugins/snt/unused/snt-sholl-color-map.png diff --git a/media/plugins/snt/snt-sholl-precise-step-1.png b/media/plugins/snt/unused/snt-sholl-precise-step-1.png similarity index 100% rename from media/plugins/snt/snt-sholl-precise-step-1.png rename to media/plugins/snt/unused/snt-sholl-precise-step-1.png diff --git a/media/plugins/snt/snt-sholl-precise-step-2.png b/media/plugins/snt/unused/snt-sholl-precise-step-2.png similarity index 100% rename from media/plugins/snt/snt-sholl-precise-step-2.png rename to media/plugins/snt/unused/snt-sholl-precise-step-2.png diff --git a/media/plugins/snt/snt-sholl-precise-step-3.png b/media/plugins/snt/unused/snt-sholl-precise-step-3.png similarity index 100% rename from media/plugins/snt/snt-sholl-precise-step-3.png rename to media/plugins/snt/unused/snt-sholl-precise-step-3.png diff --git a/media/plugins/snt/snt-sholl-preview-step-size-1.png b/media/plugins/snt/unused/snt-sholl-preview-step-size-1.png similarity index 100% rename from media/plugins/snt/snt-sholl-preview-step-size-1.png rename to media/plugins/snt/unused/snt-sholl-preview-step-size-1.png diff --git a/media/plugins/snt/snt-sholl-preview-step-size-2.png b/media/plugins/snt/unused/snt-sholl-preview-step-size-2.png similarity index 100% rename from media/plugins/snt/snt-sholl-preview-step-size-2.png rename to media/plugins/snt/unused/snt-sholl-preview-step-size-2.png diff --git a/media/plugins/snt/snt-sholl-profile-plot-new.png b/media/plugins/snt/unused/snt-sholl-profile-plot-new.png similarity index 100% rename from media/plugins/snt/snt-sholl-profile-plot-new.png rename to media/plugins/snt/unused/snt-sholl-profile-plot-new.png diff --git a/media/plugins/snt/snt-sholl-profile-table-new.png b/media/plugins/snt/unused/snt-sholl-profile-table-new.png similarity index 100% rename from media/plugins/snt/snt-sholl-profile-table-new.png rename to media/plugins/snt/unused/snt-sholl-profile-table-new.png diff --git a/media/plugins/snt/snt-strahler-analysis-plot.png b/media/plugins/snt/unused/snt-strahler-analysis-plot.png similarity index 100% rename from media/plugins/snt/snt-strahler-analysis-plot.png rename to media/plugins/snt/unused/snt-strahler-analysis-plot.png diff --git a/media/plugins/snt/snt-strahler-analysis-table.png b/media/plugins/snt/unused/snt-strahler-analysis-table.png similarity index 100% rename from media/plugins/snt/snt-strahler-analysis-table.png rename to media/plugins/snt/unused/snt-strahler-analysis-table.png diff --git a/media/plugins/snt/snt-temporary-paths-dialog.png b/media/plugins/snt/unused/snt-temporary-paths-dialog.png similarity index 100% rename from media/plugins/snt/snt-temporary-paths-dialog.png rename to media/plugins/snt/unused/snt-temporary-paths-dialog.png diff --git a/media/plugins/snt/snt-tracing-on-filtered-image-gear-options.png b/media/plugins/snt/unused/snt-tracing-on-filtered-image-gear-options.png similarity index 100% rename from media/plugins/snt/snt-tracing-on-filtered-image-gear-options.png rename to media/plugins/snt/unused/snt-tracing-on-filtered-image-gear-options.png diff --git a/media/plugins/snt/snt-ui-interaction-widget.png b/media/plugins/snt/unused/snt-ui-interaction-widget.png similarity index 100% rename from media/plugins/snt/snt-ui-interaction-widget.png rename to media/plugins/snt/unused/snt-ui-interaction-widget.png diff --git a/media/plugins/snt/snt-views-widget.png b/media/plugins/snt/unused/snt-views-widget.png similarity index 100% rename from media/plugins/snt/snt-views-widget.png rename to media/plugins/snt/unused/snt-views-widget.png diff --git a/media/plugins/strahler-classification-example.png b/media/plugins/strahler-classification-example.png new file mode 100644 index 0000000000..20eb7c10c0 Binary files /dev/null and b/media/plugins/strahler-classification-example.png differ diff --git a/media/plugins/tubeness-before-and-after.png b/media/plugins/tubeness-before-and-after.png new file mode 100644 index 0000000000..93a0657663 Binary files /dev/null and b/media/plugins/tubeness-before-and-after.png differ