SNT shortcut changes

Hi all. Just updated to the newer version of SNT (from neuroanatomy instead of segmentation plugin list) to find that there are a couple changes that make tracing much slower.
First, you must use alt-shift to snap the cursor to an existing branch instead of ctrl.
Second, anytime a new branch is completed, it highlights that one as active automatically, meaning if you’re tracing branches off of one main branch, you have to reselect the main branch each time. Very annoying.

Is there any way to change preferences such that I can assign the ctrl key back to cursor snapping and make it so that new branches are not selected as active automatically?

Welcome to the forum @ihertzler!

  • On the Ctrl to Alt+Shift change:
    On MacOs, Ctrl+click mimics a right-click event. Since SNT has its own contextual menu (triggered by right-clicking on the image canvas), we had to replace it. The reason for the double modifier Alt and Shift is due to the fact that Shift is used to synchronize the YZ and XZ views when using the three-pane view. If it is really a major bottleneck, we could consider full customization of existing shortcuts, but with all of the existing features that are keyboard controlled, it will always be a frustrating task to find good conflict-free key combinations. @arshadic and I spent quite some time thinking about the existing keyboard controls, but do let us know if you have other suggestions.
    Also, note that you can also right-click near a node and select ‘Fork at the nearest node’ without having to use the Alt+Shift combination.

  • On the auto-selection of complete paths:
    That is a reasonable request. We implemented such option on the ‘Options’ pane (see snapshot). It will be available on the next release (in a week or so).

Hi, thanks for the reply and I appreciate the option to not auto select completed paths.
I know one can’t reasonably expect free software to be designed around individuals but at least for me, the ctrl to alt-shift change is a pretty drastic one. I use this to trace drosophila class 4 sensory neurons, which (per screenshot attached) can have upwards of 1000 branches. It can take 2-3 hours to trace an individual neuron, so the ease with which the fingers lay on ctrl, y, and f simultaneously to complete small branches and just draw another one is really important. With alt shift this finger movement is pretty hindered.
If an option could be implemented to just customize your own key shortcuts that would be really helpful but understand if that’s not worth the time.

On a different note, as I opened this image file and its .trace file to find an example, the trace opened in the path manager, but the purple/green overlay did not appear… does the new version of SNT prevent traces made with the old SNT from opening and being edited?

Hi @ihertzler

Just as an aside, you can toggle the confirmation of temporary segments in the options tab (removing the need to press ‘Y’ after each point placed).
The idea of fully custom key mappings is interesting, and certainly something we can look into for the future.
On the traces not appearing over the image, does the reconstruction render properly without an image (i.e., only using an empty display canvas)?

@arshadic
It does not, I even made the blank canvas the exact size of the real image (in old SNT, a trace would not open for a differently sized image).

On the traces not being displayed:
@ihertzler, can you please share the tif image and the traces file with us (use e.g, wetransfer, or similar if you have problems uploading it here).

On the cumbersome shortcuts:

Commercial software is also affected by this. We all use software in different ways, and what some of us see as feature-rich options, others see as clutter, so things to need to be balanced. What about using just Alt? We could have it so that as soon as you press it, the fork operation starts. Would that work for you?

As a side note, for mouse-intensity work (such as tracing), having a mouse with programmable buttons does help. You can customize your clicks, and even assign keystroke triggers to them, for the ultimate customization. They are not that expensive nowadays.

On the da4 neurons:

Amazing cells. As large as a rodent Purkinje neuron! I traced several of those myself back in my Drosophila years! What you would need is a significant speed boost, not just customization tweaks.

How confident are you with scripting SNT? In the Script Editor, have a look at Templates>Neuroanatomy>Tracing> Reconstruction from Skeleton (Python) : It takes a thresholded image of a ddaC cell (File>Open Samples>ddaC Neuron (84K)) , and automatically converts the foreground into editable paths. Of course it makes mistakes, but the expectation is that curating such errors is significantly faster than starting a fresh. Here is how the it looks: original image on left, rendered traces on the right:

1 Like

On the shortcuts: just alt would be okay, or just shift (or left shift key specifically if that makes any difference?). Sorry for nitpicking.

On the da neurons: On my laptop, speed of pathfinding used to be a significant hindrance, but on my desktop (along with using fused ppk::mCD4-GFP instead of ppk:gal4 , uas-mCD8-GFP for almost zero background) speed is not an issue. I can click from the soma to the end of the neurite and have it trace almost instantly. It’s having to make so many different paths that takes so long which is why key strokes are the time limiting steps. I also exclusively use maximum intensity projections so do not have to worry about 3 dimensions or slices.

Ideally, one would just convert the image file into binary, and do a scholl analysis on that. But, few images are crisp and clear enough to do that safely; they leave a few little white pixels as a haze around neurites which, if a scholl circle intersects, counts wrongly as an intersection. We have tried the thresholder tool (image>adjust>auto threshold) and some of them are very good but none of them are perfect. But, even with a perfect binary skeleton, parameters such as total dendrite length, # of branches, etc are not available until it is traced in SNT.

I have absolutely zero knowledge of scripting or coding or python… I opened script editor and under “templates” there is neuroanatomy but the only option under that is “scholl>extensive scholl stats (groovy)”. Is there something extra I have to install for this? I’ll definitely give that a go.

Here is the tif but I am unsure how to get a .traces file to you.
102519_superfly x 105493_1branchyboi(2)MIP.tif (3.4 MB)

We will make it so that Alt can be used solely.

Note that Scholl is an unrelated Dutch-German surname (and a brand of shoes), the technique is named after its creator Donald Arthur Sholl, then a Reader in Neuroanatomy at the University of London. Sorry for nitpicking :stuck_out_tongue_winking_eye:

This is unrelated to this thread but do have a look at the Sholl Analysis documentation, and the manuscript (namely the sup. booklet). We used it extensively to parse images of class IV da neurons directly (using the same exact genotype) with success.

No, not at all. It should be there. And I have no explanation as per why you don’t see it. Note that all scripts in the Script Editor’s Template>Neuroanatomy> menu are also mirrored in the Scripts menu in the main SNT dialog. Maybe try it from there?

Use an online file transfer service (such as wetransfer.com that I proposed above), or simply append a .txt extension to the file and upload it here.

Okay, the script/templates/neuro/tracing stuff shows up now. I also see it in SNT. Not sure why it didn’t show up before. It runs fine on the ddaC sample neuron but I don’t know how to make it run on an image open in imageJ… I replaced the “ddaC Neuron (84K)” in the script with the file name but that did not work. I really have no knowledge of scripts or python.

I see your manuscript and that looks convincing that the auto generated Sholl analysis is good - and really, for our lab’s purposes, all we really need is the intersections-per-distance Sholl, and total neurite length/total branch point parameters, so if we could do that without tracing that would be a major time saver.

I just ran the Sholl the documentation suggested and it looks pretty good. I think we just had so much trouble with background noise in the ppk:gal4, uas-mCD8-GFP larvae that thresholding and Sholl-ing was not possible without a trace; with the fused promoter:fluorophore it does very well. That leaves the neurite length and branch number. This should be doable with the script mentioned but I’m not sure how to run it on a specific image (and when I do it on the sample image, I’m not sure where to find these parameters…)

Here is the .trace for the previous image if .txt-ifying it works:
102519_superfly x 105493_1branchyboi(2)MIP trace.traces.txt (778.9 KB)

Alternatively here are a couple image and trace files on box:
https://psu.box.com/s/vvq3dffoioqpwhdd7nx49sezom9vxb2m

Not sure how to use wetransfer without a email or name to send things to?

Hi @ihertzler

I was able to open the .traces file on Windows 10 by first starting SNT without an image (using the “None. use a display canvas” option for “Image” in the SNT startup prompt) and then loading the traces file.
A note on the skeletonization script, I am currently integrating its functionality and more into the core SNT API so the script will become much simpler to use and understand. There will also be a GUI command so you will not need to deal with scripting (although it is never too late to learn :wink:). I hope to have it integrated by the next release.

I am also unable to reproduce the problem. Specifying the image and reconstruction in the startup prompt also seems to work as expected.

Ah - I didn’t see that the image had to be specified in the startup prompt manually. I had the image open but not specified.
Thanks!

Actually the choices in the Image drop-down list are generated automatically to reflect the images that are currently open in Fiji. For extra convenience, chosen options are remembered across restarts. Note that all the options in the startup prompt can also be dismissed: Once SNT starts you can use commands in the File> menu to load reconstruction(s)/image(s).

Anyway, glad you got it working! I think at this point you should look at SNT’s documentation. We spent lots of time on it (almost as much as developing SNT itself!). There are step-by-step instructions for common tasks, and also several screencasts that will help you transition to the new version. Do let us know if you run into problems!

A post was split to a new topic: SNT: How to restrict path search to certain locations?