help > Refitting a neuron that drifted/presents small morphological changes
Showing 1-4 of 4 posts
Display:
Results per page:
Mar 12, 2018  05:03 PM | Antoine Valera - UCL
Refitting a neuron that drifted/presents small morphological changes
Dear vaa3d team,

Thanks for your great work. I am using your software on a daily basis.
I am currently facing a few problems during my experiment. We use a matlab-based software to visualize zstacks and trace neurons during in vitro/in vivo experiments. We call vaa3d or vaa3d plugins in command line from matlab and it works well. Unfortunately, cells tend to drift during the recordings. I would like to know how to measure this drift as fast as possible and correct for it, if possible automatically. There are 2 cases:

Case 1: the drift is a affine transformation (in vitro, on short timescales usually). I can re-acquire a z stack, open it in vaa3d, and reload the original swc file. Then i can click on the structure and use the "lock-scene and adjust this object" menu. That works very well, but is extremely time consuming while doing the experiment.
- Would there be a way to calculate automatically this offset using the original tracing and a new zstack?

Case 2: there are some non-rigid deformations, although the general shape of the cell did not change (in vitro for long experiments or in vivo from one day to the next). Usually, the error is in the order of 5-20 pixels.
- Is it possible to re-fit a cell from command line using the previous tracing as a reference? Is there any plugin that would behave like the "extend/refine nearest neuron segment by mean-shift", but on the whole cell, branch by branch?

I can send you an example of a stack and .swc if it helps

I am currently using vaa3d 4.433 on windows.

Best regards

Antoine Valera
Mar 14, 2018  12:03 AM | Zhi Zhou
RE: Refitting a neuron that drifted/presents small morphological changes
Please send one testing image and swc file for us to check. By the way, you can always find our latest version in here (https://github.com/Vaa3D/release/release...). Thanks.

Zhi


color=#000000]
[/color]Originally posted by Antoine Valera:
Dear vaa3d team,

Thanks for your great work. I am using your software on a daily basis.
I am currently facing a few problems during my experiment. We use a matlab-based software to visualize zstacks and trace neurons during in vitro/in vivo experiments. We call vaa3d or vaa3d plugins in command line from matlab and it works well. Unfortunately, cells tend to drift during the recordings. I would like to know how to measure this drift as fast as possible and correct for it, if possible automatically. There are 2 cases:

Case 1: the drift is a affine transformation (in vitro, on short timescales usually). I can re-acquire a z stack, open it in vaa3d, and reload the original swc file. Then i can click on the structure and use the "lock-scene and adjust this object" menu. That works very well, but is extremely time consuming while doing the experiment.
- Would there be a way to calculate automatically this offset using the original tracing and a new zstack?

Case 2: there are some non-rigid deformations, although the general shape of the cell did not change (in vitro for long experiments or in vivo from one day to the next). Usually, the error is in the order of 5-20 pixels.
- Is it possible to re-fit a cell from command line using the previous tracing as a reference? Is there any plugin that would behave like the "extend/refine nearest neuron segment by mean-shift", but on the whole cell, branch by branch?

I can send you an example of a stack and .swc if it helps

I am currently using vaa3d 4.433 on windows.

Best regards

Antoine Valera
Mar 14, 2018  10:03 AM | Antoine Valera - UCL
RE: Refitting a neuron that drifted/presents small morphological changes
Hi,

I meant version 3.433. I just saw that you just released a new version.

In the attached files, you can find a Zstack taken 20min after the orginal tracing. As you can see the cell drifted, but you can realign it with an offset of x=+4 y=-3 and z=+3

This would be representative of the first case. Is there a plugin that I could call in command line that would accept this stack and the original swc file and calculate this offset?

We can come to the second case later, I'll try to find a good example

Best regards 

Antoine
Attachment: Example_case_1.zip
Mar 20, 2018  02:03 PM | Zhi Zhou
RE: Refitting a neuron that drifted/presents small morphological changes
I have checked your testing image and swc file. For your two questions:
1. At this moment, Vaa3D does not have a plugin to automatically calculate offsets based on image and reconstruction file.
2. You can use "Plug-In" --> "image_analysis" --> "mean_shift_center_finder" --> "mean_shift_with_constraints" to fit the entire swc file. You can also check command line usage by  "vaa3d -x mean_shift_center_finder -f help". Please not, you have to convert your image to 8 bit first by "Image/Data" --> "image_type" --> "linear rescale .... 8 bit image".

Thanks,

Zhi