Page 1 of 1

3D rotation in Cell Builder

Posted: Fri Oct 04, 2019 5:37 pm
by DavidSwygart
Using "Import 3D", I imported a complicated branching structure of an axon terminal from a trace of an EM reconstruction. The EM reconstruction did not include the soma or dendrites of the cell. I now want to add a ball and stick representation of the soma and dendrites to my model. I am trying to use Cell Builder to add these segments to my existing model, however, I cannot 3D rotate the axon terminals to add them to the correct segment. Is 3D rotation possible in the Cell Builder? I am able to 3D rotate in the shape graph and in Import 3D, just not the Cell Builder.

Re: 3D rotation in Cell Builder

Posted: Sat Oct 05, 2019 11:49 am
by ted
First question: are all of these sections supposed to belong to a single cell, or is the axon terminal stuff supposed to be presynaptic and the ball and stick postsynaptic?

Re: 3D rotation in Cell Builder

Posted: Wed Oct 09, 2019 9:36 am
by DavidSwygart
They should all belong to a single cell. Right now I am just modeling an axon terminal. I want to add a soma and dendrites.

Re: 3D rotation in Cell Builder

Posted: Wed Oct 09, 2019 10:29 am
by ted
1. From the CellBuilder export a hoc file that contains the statements that create the axon terminal.

2. Organize the "model specification" part of your code like this:

Code: Select all

code that specifies the geometry and topology of everything but the axon terminal
a load_file() statement that reads the hoc file created in step 1
a connect statement that attaches the root node of the root section of the axon terminal
  to the desired location on the rest of the cell
The code that specifies the geometry and topology of "non-axon-terminal sections" could be user-written or exported from a CellBuilder. For maximum control over the appearance of that part of the cell (in particular, the branching angles), use the pt3d syntax. If any of this is unfamiliar to you, read "Conceptual overview of sections" in the Programmer's Reference.

If, for cosmetic reasons, you want to rotate a subtree (a parent section and all of its children), you'll need to change the code that specifies the geometry and topology of all sections that belong to that subtree by applying a rotation transformation to their p3d coordinates. I can think of at least two ways to do this, but which is easiest for you to accomplish depends somewhat on your programming skills.