27/08/2010

Neuromantic V1.7.5 is available

As promised, here is a download link for the newest version of
Neuromantic (V1.7.5) produced for DIADEM. It's a bit.ly shortened
link that lets me keep track of the number of downloads and vaguely
where they're coming from, but it points directly to my DropBox
account.

http://bit.ly/buYykd

The contents of the zip should work in a self-contained fashion, and
should not require any files from any previous downloads.

Now, I'm pretty sure that I've included all the dependent DLLs in the
zip file, but I don't have a clean platform to test on so I can't be
sure. Let me know if it fails on start-up and I'll host the missing
files asap.

The main changes to the application are:
* Dynamic memory management. You should hopefully not get annoying
access violations when you load in a stack that's too big, as
Neuromantic will automatically load/unload images dynamically to keep
the memory footprint acceptable. There will probably still be memory
issues if you attempt to visualise large stacks in 3D, though, which
is something I may address in future now that I have a working build.
* Multi-stack GUI - this lets you use large-tiled projects and show/
hide different tiles as tiled, as well as manually entering offsets.
The "Load/Save Tiled Project" menu options will save all the stack
positional data to an .nproj file (the reconstruction itself will
still need to be save separately to SWC). If you lose the multi-stack
GUI, open it again through Window->Show Multistack GUI
* Custom labelling schemes - you can now change the colours associated
with each segment type, so no more endless yellow after segment type
6. See also Load/Save labelling scheme on the main menu.
* A few 3D GUI fixes - the aspect ratio now remains correct when
resizing the window, which had been bugging me for ages, and the lines
are properly anti-aliased.

For other minor changes see the _README.txt file.

Feel free to pass on the download link to anyone who might be
interested (once you're sure it's not missing any files!).

In general, I shall be posting links to new version on the NeuromanticUsersGroup, so please join that if you're interested.

Labels: , , ,

31/03/2008

Neuromantic V1.6.2 now available!

OK, I have uploaded Neuromantic V1.6.2 to the site - I've made sure the ZIP file works this time, also ;)

V1.6.2 mainly adds some bug fixes and minor features over V1.6.1, and I'm quietly confident that I've finally squashed the horribly annoying byzantine error that I've been trying to track down for several releases.

I've altered the selectable bounding boxes on compartments so that they're now the entire width of the compartment, rather than always 10 pixels either side. Lone nodes (with parent nor child) also display their radius now in the form of a circle around the midpoint, and it should be easier to select/drag around the root soma point of a tree that's surrounded by child compartments.

Another handy addition is the ability to press Ctrl+W and cycle through all the currently selected segments. This could be useful when correcting trifurcations or similar.

In terms of semi-automatic reconstruction, a median radius filter operation has been added that helps compensate for radius estimation errors. The radius of each compartment is simply calculated as the median of the estimated radii of a 3 compartment neighbourhood along the neurite.

It's also now possible to Autoselect overlapping points i.e. points that have exactly the same coordinates as another point in the tree. It was primarily added for Duncan Donohue, who's currently administrating the NeuroMorpho archive, and shouldn't be needed in the standard course of a reconstruction. In the case of overlapping identical subtrees, it will currently just select one of the subtrees arbitrarily (depending on ordering in the list). I believe that it should select entire overlapping subtrees due to the way the tree sorting algorithms work, but it's conceivable that in some circumstances it will select some from both - let me know if this happens.

Labels: , , ,

20/02/2008

Neuromantic V1.5.5 now released (and general update)

The new release is a little later than I originally intended (as always), but V1.5.5
fixes quite a few bugs and implements quite a bit more functionality.

* Fixed minor bugs associated with statistics calculations from tree -
the area and volume calculations were badly rounded due to storage as
an integer rather than a float (bad Nathan!)
* Implemented statistical testing properly - in V1.5.4 this didn't
really work at all. I blame the testing department. Wait a minute, I don't have one.
* Speeded up stack rotation and other bitmap operations significantly
through avoiding use of standard Windows TBitmaps.
* Fixed bug associated with stack rotation on certain sized stacks
* 3D stack visualisation now supports standard colourisations such as
JET and HSV, and has generally still been jazzed up. I still need to
cause the stack to be subsampled when it's too large, though, as this
can still bring the applications to its knees, so be careful.
* Implemented ability to drag multiple selected segments in both 2D
and 3D windows, as requested originally by Duncan and more recently by
Kerry. I'll try and implement similar functionality for radius
editing soon.

On a similar note, I'll try and make time to create some video tutorials with CamStudio, which is a very handy utility that allows you to make videos of your desktop and record audio over it. In this way it should be ten times easier to demonstrate the usage of Neuromantic than attempt to describe its use in the manual.

If you find any bugs, please report them to the Neuromantic User Group (which is linked to in the application from the About menu) and I shall attempt to squash them for the next release.

Labels: , , , ,

29/06/2007

Neuromantic V1.4.0 - How to use it!

Yes, a new version of Neuromantic is *finally* available! Version 1.4.0 performs semi-automatic tracing of neurites by automatically tracing between user-defined beginning and end points. On a basic level, this new version should encompass almost all of the basic functionality of NeuronJ, but with the ability to trace in 3D and improved midline tracking on thicker dendrites.

Although the semi-automatic tracing (particularly the radius estimation) is not quite as well as I'd like yet, I wanted to release a version so that people could see what it will be able to do, especially as there are a number of tweaks that make semi-manual reconstruction easier, too.

I'm pretty happy with the actual tracing process, but I still need to significantly improve the radius estimation algorithm and post-processing, which are both a little rudimentary. It's probably quite useable in most situations, but it may require a bit of cleaning up afterwards where the radius estimation has gone wrong. It should still improve productivity in most cases, though. As such, the radius estimation is off by default, and all segments will be a uniform radius. To apply the radius estimation, select the entire branch (by pressing CTRL+left clicking it in Tree or AutoTrace mode) and press CTRL+R (or select Edit->Restimate Radius from the menu).

Some tips on cleaning up auto-tracings:

* A segment's position may be altered in Tree/AutoTrace mode by left dragging it.
* The radius of a segment may be altered in Neuromantic in the main (non-3D screen) by selecting the segment (either in Tree or Auto mode) and holding down the middle mouse button along the length of the segment and dragging.

Upon entering the application, you should notice that there is a shiny new toolbar button up at the top left that says "AUTO". Clicking this will get you into semi-automatic mode, so do it! The associated right hand panel has a number of twiddle factors for the algorithm (which I promise to clean up and automate for subsequent releases).

Firstly, notice that there's a couple of radio buttons on the panel for either following dark or light dendrites - make sure the correct one of these is selected for your data or odd things will happen. Also, remember that pressing "Invert" on the image processing panel doesn't invert the underlying stack data, so if you're looking at an inverted stack of a Golgi-stained neuron the "Dark dendrites" option should still be selected.

The basic process of semi-automatic tracing is as follows:

* Navigate to the correct slice by auto-focussing on the desired point (middle mouse button click achieves this, as in Tree mode).
* Click and hold the left mouse button: this will begin the tracing.
* Move the mouse roughly down the dendrite - you will see blue boxes pop up (currently of a default size of 128x128 pixels). This shows the area that is currently being image processed and routed. Each box represents (currently) a stack of 11 patches from the current slice - 5 to the current slice + 5.
* As you move the mouse down the dendrite auto-focus on the dendrite by clicking the middle mouse button (I admit this is a little fiddly at the moment, as you need to be pressing the left and middle mouse buttons at once). Also, you can still translate the stack by also holding the right mouse button.
* If a current route has currently been calculated to the position the mouse cursor is at, a line showing the basic trace will be shown. Once a tracing has begun, the application is constantly calculating routing information, so if no route currently exists then waiting for a few moments will help.
* Release the mouse button to complete the tracing.
* If the algorithm won't correctly trace a neurite in one go, segment it in multiple traces - the next trace will automatically connect up to the last as long as the start point is nearby.
* If the trace ends up horribly wrong, just press CTRL+Z to undo it and start again.

The following labelled image captured partway through making a trace should make it clearer:


There are two main twiddle factors to the tracing algorithm - the first is the Neurite Radius slider. This determines which radius of neurite will be detected most effectively (and traced most effectively). If tracing is not working at all, or not working well, this is most likely to be the problem. The slider varies from 1 pixel radius to 30 pixels radius at the moment, although I shall hopefully replace this in future with a more visually intuitive brush size selection tool, a bit like a graphics package.

The second slider is the Neurite Threshold, which determines which pixels will and will not be counted as neurites. The higher (more to the right) the slider is, the less pixels will be considered, and the faster the routing will occur. Turning on the "Show Routing Progress" option will show you which pixels are actually currently being considered, by colouring them in shades of blue (based on the cost function at that point), and thus let you tune this parameter correctly for your data. Hopefully, though, this will be done automatically in future versions. The following image shows what the routing progress looks like when the parameter is set to about the right level:



If the threshold is too high, you might see something like the next image: it is apparent that the algorithm is not considering pixels that should be counted as neurites, as there is not a solid line between the start and end point.


Conversely, if the threshold is too low you may just end up with all the patches filled with blue, in which case the algorithm will work significantly more slowly than it should, so you should put it up a little.

The Segment Length slider bar determines the subsampling rate of the final calculated path. This is by default set to 5 pixels long, but should in general be set high enough that you don't end up with a billion segments but low enough so that you still approximate the shape of the dendrite well.

3D Window


Post-processing is also performed on the Z axis to clean it up using the AutoFocus function (although this can be removed by unticking the Post Processing box on the AutoTrace panel). However, when neurites overlap close to each other you may still get an error where the focussing jumps to another neurite and then back again, creating an error which looks a little like this (the view has been rotated so that the horizontal axis represents the stack images):



In order to get rid of this artifact, select (by left clicking, although the standard CTRL and SHIFT controls for the main window also work in here too) the last correct segment BEFORE the artifact, up until the end of the artifact, like this:



The direction of the dendrite here is going from the top to the bottom of the screen.

Pressing CTRL+W (or Edit->Z Interpolation) will then interpolate the Z values between the beginning and end of the identified artifact.



Other features


Another thing which has been added is a couple of interpolation options for the main window. These can be selected between using the F keys:

F9 - No interpolation
F10 - Bilinear interpolation
F11 - Bicubic intrpolation

As with the rest of the image processing, the interpolation is performed on-the-fly as you zoom in to the image, so it does not add any extra memory burden (take that, ImageJ!). The interpolation can be handy for judging more accurately the midline/edges of neurites.

Also, if you've bothered to read this far, please leave a cheery comment on the blog post so that I know I didn't spend all this time writing it for nothing ;)

Labels: , , , ,

30/04/2007

Semi-automatic tracing beta almost complete

Right, a fully working version of the semi-automatic tracing with radius estimation is basically complete - I'm just in the process of doing a little debugging with the GUI and increasing the user-friendliness before I post it.

This (very significant) update will vastly increase the speed of reconstructions by avoiding the need to define each segment separately. In essence, all you do is roughly drag the mouse along each dendrite, and the actual tracing and radius estimation is done automatically.

Some quick screenshots of a subtree I quickly (less than a minute) segmented:

The blue squares show the areas of the stack that have been image processed, and the coloured line the current route: the patches are generated in real-time during tracing to avoid slow pre-processing and massive storage requirements.


The subtree rendered in 3D:


The subtree viewed with the Z/Y plane - the discretisation of the Z coordinates is apparent, but the Z values don't jump significantly and match well with hand-segmented reconstructions.


Coming soon!

Labels: , , ,