Hi,
I want to rotate a neurolucida file (.asc) about y axis for 180 deg, and save it as a .hoc file.
I've already checked the import 3D tutorial, and I tried to use "rotate 45deg about y axis" in Import 3D.
However, I found it's just for visualization, it won't affect the morphology when you export the morphology from Import 3D to CellBuilder.
So is there any way to rotate a morphology about y axis and save the result into .hoc file? No matter using GUI tool in NEURON or using HOC language to do it.
Many thanks in adavance.
rotate a .asc neurolucida morphology file and save it
-
- Site Admin
- Posts: 6385
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: rotate a .asc neurolucida morphology file and save it
Possible ways that you might do this:youngJose wrote:I want to rotate a neurolucida file (.asc) about y axis for 180 deg, and save it as a .hoc file.
1. Maybe MicroBrightField or someone else has a program that can apply the rotational transformation to data in a NeuroLucida file. If so, do that first, then use NEURON's Import3d tool to import the new NeuroLucida file.
2. If there isn't a program that can apply the rotation to a NeuroLucida file, then figure out the file format and write your own. 180 degree rotation around the y axis is equivalent to multiplying each x and z coordinate by -1. Then use Import3d.
Easier than the second approach might be this: just use Import3d to generate a hoc file from the original NeuroLucida file, then make a copy of that hoc file and multiply each x and z coordinate in that file by -1. Easy to do with awk or any programming language that has rudimentary string functions.
Re: rotate a .asc neurolucida morphology file and save it
Thank you, Ted!ted wrote:Possible ways that you might do this:youngJose wrote:I want to rotate a neurolucida file (.asc) about y axis for 180 deg, and save it as a .hoc file.
1. Maybe MicroBrightField or someone else has a program that can apply the rotational transformation to data in a NeuroLucida file. If so, do that first, then use NEURON's Import3d tool to import the new NeuroLucida file.
2. If there isn't a program that can apply the rotation to a NeuroLucida file, then figure out the file format and write your own. 180 degree rotation around the y axis is equivalent to multiplying each x and z coordinate by -1. Then use Import3d.
Easier than the second approach might be this: just use Import3d to generate a hoc file from the original NeuroLucida file, then make a copy of that hoc file and multiply each x and z coordinate in that file by -1. Easy to do with awk or any programming language that has rudimentary string functions.