open-discussion > What would be the right way to export swc?
Showing 1-3 of 3 posts
Display:
Results per page:
Nov 10, 2014  11:11 AM | Miroslav Radojevic
What would be the right way to export swc?
I am interested in experience of Vaa3d developers on exporting swc neuron reconstruction format. The format is:

i TYPE x y z r i_mother

Do you allow and is it legal or proper to allow 'i_mother' to be larger than 'i' (current index)?
For instance - searching for junctions and the endpoints is much different in case we know that the mother index is always before (which makes sense to assume) - it is not necessary to search the whole set of nodes each time when looking for those that were referenced twice. But - still - this depends on the swc export implementation.

I wonder what is your knowledge/experience on this?
Nov 10, 2014  04:11 PM | Hanchuan Peng
RE: What would be the right way to export swc?
The SWC format itself has no constraint on such order, and should never have been imposed of such a limitation if there were some in previous practice.

One important point is that if you allow a neuron to be edited (using any tools), then there must be a case that sometimes the ordering of nodes will be switched even initially they are "sorted" from small to big. Thus there is no need to limit the ordering.

It is actually quite straightforward to load an arbitrary swc file w/o the need to read twice. You can use Vaa3D's SWC reading function to do that. Such a simple method is to load each row and at the same time build a mapping relationship of nodes, and thus later no problem at all.

To export a swc file from Vaa3D, you may right click a neuron and select "save ...". You may also use the save_swc function in Vaa3D source code or in the Matlab toolbox to do so.

-Hanchuan



Originally posted by Miroslav Radojevic:
I am interested in experience of Vaa3d developers on exporting swc neuron reconstruction format. The format is:

i TYPE x y z r i_mother

Do you allow and is it legal or proper to allow 'i_mother' to be larger than 'i' (current index)?
For instance - searching for junctions and the endpoints is much different in case we know that the mother index is always before (which makes sense to assume) - it is not necessary to search the whole set of nodes each time when looking for those that were referenced twice. But - still - this depends on the swc export implementation.

I wonder what is your knowledge/experience on this?
Nov 10, 2014  08:11 PM | Miroslav Radojevic
RE: What would be the right way to export swc?
Indeed, I assumed so, ordering would make a mess with editing, just wanted to double-check that. Thank you for the answer.