Hello,
To make a 3D reconstraction of cell i use import "3D model" option.
Is there any way to determine the dendrite order? for example, if i have maximum dend[500], how can find out dend[150] belongs to which order of dendrits, 6th, 7th, or...order?
I'm waiting for your suggestions!
Thank's in advance
dendrite order
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
determining the "branch order" of a section
Sure there's a simple way. Use the SectionRef class. Discover the root of the tree
(use the root() method). Starting at the root of the tree, recursively descend the tree
(here, the child() and nchild() methods will be helpful) while keeping track of the level
of descent. All sections at level i are ith order. That's how to traverse the whole tree in
a single pass, finding the branch order of each section.
If you only need the branch order of a few sections, it may be simpler to start at the
section of interest and _ascend_ recursively to the root, keeping track of each level on
the way. This would use the SectionRef class's has_parent and parent methods. Example:
(use the root() method). Starting at the root of the tree, recursively descend the tree
(here, the child() and nchild() methods will be helpful) while keeping track of the level
of descent. All sections at level i are ith order. That's how to traverse the whole tree in
a single pass, finding the branch order of each section.
If you only need the branch order of a few sections, it may be simpler to start at the
section of interest and _ascend_ recursively to the root, keeping track of each level on
the way. This would use the SectionRef class's has_parent and parent methods. Example:
Code: Select all
// returns branch order of the currently accessed section
// root of tree has order 0
func branchorder() { local order localobj sr
order = 0
sr = new SectionRef()
if (sr.has_parent) {
sr.parent order = 1 + branchorder()
}
return order
}
Dear Ted
Thank you very much for your reply. i wrote the following code
in end of the *.hoc file i add your code. but when i use the function
"branchorder(dend[5])" i have syntax error! i don't know where is mistake.
Could you help me to find out where is mistake?
Thank's in advance,
karlo
Thank you very much for your reply. i wrote the following code
Code: Select all
create soma, dend[11]
access soma
access dend
connect dend[0](0), soma(0.5)
for i = 1, 2 connect dend[i](0), dend[i-1](1)
connect dend[3](0), dend[1](1)
connect dend[4](0), dend(1)
for i = 5, 6 connect dend[i](0), dend[4](1)
connect dend[7](0), soma(0.5)
for i = 8, 9 connect dend[i](0), dend[i-1](1)
connect dend[10](0), dend[8](1)
//===========================
func branchorder() {local order localobj sr
order = 0
sr = new SectionRef()
if (sr.has_parent) {
sr.parent order = 1 + branchorder()
}
return order
}
branchorder(dend[5])
"branchorder(dend[5])" i have syntax error! i don't know where is mistake.
Could you help me to find out where is mistake?
Thank's in advance,
karlo
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
A section cannot be passed as an argument to a function. The instructions for
func branchorder() state
In other words,
sectionname branchorder()
makes branchorder() return the order of sectionname
func branchorder() state
Code: Select all
// returns branch order of the currently accessed section
sectionname branchorder()
makes branchorder() return the order of sectionname