CNS-OIST / SWCTetMesher

This program reads a SWC morphology file and generate a tetrahedral mesh using CGAL meshing functionality.
Other
1 stars 1 forks source link

How to convert other type cells from .swc files #4

Closed zhaolun7 closed 1 year ago

zhaolun7 commented 1 year ago

I think this repo should be a common tool to convert from .swc file to .mesh file, not only for purkinje cells. I tried some other files , for example, https://neuromorpho.org/neuron_info.jsp?neuron_name=sc147_e2216_1 image image I don't find any error output, so I could think it runs normally. but I think the size of output file is not like that of purkinje, which looks like bigger than origin .swc file: image and I tried to use Gmsh to import the output file, sc147_e2216_10.CNG.mesh, it looks like: image I am not sure if the data meets the requirements of this repo.

zhaolun7 commented 1 year ago

well, is there any other tools to convert .swc or could STEPS read .swc file directly ?

WeiliangChenOIST commented 1 year ago

Dear @zhaolun7 ,

This usually means the default mesh resolution is not sufficient for the reconstruction. You can adjust the parameters of the mesher to suit the data.

To check available parameters, use

./SWCTetMesher -h

The most important ones are

You can find their definition in https://doc.cgal.org/latest/Mesh_3/index.html#Mesh_3TheMeshingCriteria

For your mesh, I found using --fc-size 0.05 --fc-distance 0.01 --cc-size 0.2 yields an ok-ish mesh, but if you want a more smooth surface you will need an even finer resolution.

zhaolun7 commented 1 year ago

@WeiliangChenOIST Thanks for reply. It did solve my problem.