Page 1 of 2

Questions on import3d and export tools

Posted: Mon Jul 06, 2009 6:38 am
by Eleftheria Pissadaki
Dear Forum,

Help is needed on the 'import3d' and 'export' tool of Neuron.
Importing a 3d reconstruction in Neuron results to 5 cell builders.
These 5 different topologies correspond to the five different dendritic processes that start from soma.
Apparently, each one of these are conceived as separate cells.
However, I would like to transform the whole cell in one file.
Do you have any suggestions for how to transform it succesfully using import3d and export methods?
Can a soma contour (drawn in Neurolucida) be finally classified as soma section in this conversion?
I would like to further elaborate with the particular tool before use cvapp or neuronland converters.

Thank you very much you time,

Kind regards,

Eleftheria

Re: Questions on import3d and export tools

Posted: Mon Jul 06, 2009 12:38 pm
by ted
Eleftheria Pissadaki wrote:Importing a 3d reconstruction in Neuron results to 5 cell builders.
These 5 different topologies correspond to the five different dendritic processes that start from soma.
Apparently, each one of these are conceived as separate cells.
because the morphometric data file is broken--the dendritic trees are not connected to the soma. Fix that, and the file will import as a single cell.
Can a soma contour (drawn in Neurolucida) be finally classified as soma section in this conversion?
What do you mean by a "soma contour"? A single outline of the periphery of the soma? Or multiple stacked contours? It is my understanding that NEURON automatically recognizes and deals with both cases automatically.

Re: Questions on import3d and export tools

Posted: Tue Jul 07, 2009 5:32 am
by Eleftheria Pissadaki
Dear Ted,
Thank you very much for your reply.
The reconstruction of the cell has been made by me and I have done some validity test to see how reliable it is.
As you may know, cell bodies in Neurolucoda are drawn as stacks of contours. To my knowledge and my lab fellows, we can't splice a dendrite to a contour in Neurolucida environment.
That is, dendrites can't connect to the soma.
Would it be effective, if I try to redraw somatic region as a 'neuron tracing' and then splice the new cell body to the dendrites?
Soma contour is the periphery of the body cell in different z coordinates in order to produce a 3d somatic representation. In my case, five contours have been used to reproduce somatic region.

Kind regards,

Eleftheria

Re: Questions on import3d and export tools

Posted: Tue Jul 07, 2009 1:15 pm
by hines
If dendrites end within the bounding box of the soma then they should connect to
the soma. If you send the file to michael dot hines at yale dot edu I'll try to diagnose why
it is not importing correctly.

Re: Questions on import3d and export tools

Posted: Thu Sep 17, 2009 6:33 am
by Eleftheria Pissadaki
Thanks, it works perfectly!

Eleftheria

Re: Questions on import3d and export tools

Posted: Thu Sep 17, 2009 7:02 pm
by ted
That's good to know.

Re: Questions on import3d and export tools

Posted: Thu Sep 17, 2009 8:04 pm
by hines
My email comments consisted of
The translator does not understand "Cell Body" with the space. Change to
"CellBody" without the space.
Also order the contours so that the z value is either monotonically
increasing or decreasing.

Re: Questions on import3d and export tools

Posted: Mon Aug 22, 2011 6:36 am
by torbjone
Hi. I have two morphologies that split into several files when I try to export them. On the first one I changed "Cell Body" with CellBody, and it worked out nicely, but the other file don't have any "Cell Body"s anywhere, and still dosn't work.
Do you have any other suggestion?

Thanks for your time !

Torbjørn

Re: Questions on import3d and export tools

Posted: Mon Aug 22, 2011 8:22 am
by hines
Please send the file to michael dot hines at yale dot edu and I'll take a look at it.

Re: Questions on import3d and export tools

Posted: Mon Aug 22, 2011 12:23 pm
by hines
You need to replace the occurrences of
"Soma 4" with "CellBody"

There also appear to be two dendrites (see lines 2354 and 2846) where the points move from distal to proximal. Those
would need to be reversed so they move from proximal to distal. It seems to me that the beginning point of the dendritic
tree of which 2354 is a distal tip is really
at line 2837

Re: Questions on import3d and export tools

Posted: Tue Aug 23, 2011 4:04 am
by torbjone
Thanks a lot! That solved the problem!

Re: Questions on import3d and export tools

Posted: Sun Apr 13, 2014 4:21 pm
by figoyouwei
Dear Ted,

I think my question also belongs to this topic, though ...

From a specific example to a general question: the points applied to the pt3dadd() function can be relative, an example below taken from the Neuron Book.

soma {
pt3dadd(0, 0, 0, 30)
pt3dadd(30, 0, 0, 30)
}

apical {
pt3dadd(0, 0, 0, 5)
pt3dadd(30, 0, 0, 5)
}

for i=0,9 {
dend {
pt3dadd(0, 0, 0, 2)
pt3dadd(15, 0, 0, 2)
}
}

for i=0,9 {
oblique {
pt3dadd(0, 0, 0, 1)
pt3dadd(0, -15, 0, 1)
}
}

Question is, how in general to "export" all the 3d points together with diameter that are used internally by NEURON to a file ? In this case, could it export to a file the data like:

soma 0, 0, 0, 30
soma 30, 0, 0, 30
apical 30, 0, 0, 5
apical 60, 0, 0, 5
...

Re: Questions on import3d and export tools

Posted: Sun Apr 13, 2014 8:46 pm
by ted
This iterates over all sections and prints out their pt3d data:
forall for ii=0,n3d() print secname(), " ", x3d(ii), y3d(ii), z3d(ii), diam3d(ii)

Left as an exercise to the reader:
how to open a file, print data to it, then close the file.
Hint: read about the File class in the Programmer's Reference.

Re: Questions on import3d and export tools

Posted: Tue Apr 15, 2014 12:42 pm
by figoyouwei
Dear Ted,

First, it shall be "for ii = 0,n3d()-1",

and second, this still prints out the "relative" points ...

soma 0 0 0 30
soma 30 0 0 20
apical 0 0 0 10
apical 30 0 0 5 (apical 60 0 0 5, wanted)
...

any better solutions ?

Re: Questions on import3d and export tools

Posted: Tue Apr 15, 2014 3:49 pm
by hines
I believe there has to be a connection between sections for the 3-d points of the child to "snap" to the 3-d location of its parent connections.
And to actually make that happen you may need to tickle it with a call to any function that sets up internal structures in preparation for simulation... in this
case define_shape() will suffice.