Page 1 of 1

Change list of morphology file into hoc code

Posted: Tue Aug 25, 2020 3:20 am
by minhye
Dear someone,

Good morning guys.

Code: Select all


begintemplate morphology_mhc
public morphology

proc morphology(){localobj nl,import
          nl = new Import3d_Neurolucida3()
          nl.input("morphology.txt")
          import = new Import3d_GUI(nl, 0)
		  }

endtemplate morphology_mhc

I want to fix the morpologies in the txt file so that hoc coding is possible.
That code runs on neurons, but it doesn't run when I import it in the other simulation tool,
I think it's because the simulation tool couldn't read that txt file...
Since it is over 20000 lines of code, I think it is the worst way to type pt3dadd on each line.

Is there any way other than manually entering pt3dadd? Without inputting another file

A txt file seems like this..

Code: Select all

("CellBody"
  (Color Red)
  (CellBody)
  (-4.96775 -10.3298 -2.262 0)  ; 1, 1
  (-5.82775 -8.55975 -2.262 0)  ; 1, 2
  (-5.89775 -8.42975 -2.262 0)  ; 1, 3
  (-6.75775 -6.78975 -2.202 0)  ; 1, 4
  (-7.27775 -5.73975 -1.452 0)  ; 1, 5
  (-7.27775 -5.65975 -1.452 0)  ; 1, 6
  (-7.65775 -3.41975 -1.452 0)  ; 1, 7
  (-7.61775 -1.95975 0.678 0)  ; 1, 8
  (-7.61775 -1.87975 0.678 0)  ; 1, 9
  (-7.73775 -0.27975 0.678 0)  ; 1, 10

Re: Change list of morphology file into hoc code

Posted: Tue Aug 25, 2020 8:13 am
by ted
That code runs on neurons, but it doesn't run when I import it in the other simulation tool
What "other simulation tool" do you mean?
I want to fix the morpologies in the txt file so that hoc coding is possible.
I guess you want to convert the Neurolucida text file to a hoc file.
1. Use the Import3d tool to read the Neurolucida file.
2. Export the data from the Import3d tool to a CellBuilder. Click on the Import3d tool's "Export" button, then select "CellBuilder".
3. Export the data from the CellBuilder to a hoc file. Click on the CellBuilder's Management button, then either
A. click on "Cell Type" and then click on "Save hoc code in file"
or
B. click on "Export" and then click on "Export to file"

Re: Change list of morphology file into hoc code

Posted: Wed Aug 26, 2020 1:21 am
by minhye
Dear Ted,

It works!!!
Thank you so much :)
and the simulation tool name is Sim4life.