External Email - Use Caution
Hi,
I am planning to convert an ASCII file to a gifti file using mris_convert.
I am using FreeSurfer 5.3 on Linux 9 stretch.
The ASCII file includes the vertex id , its MNI305 coordinates and p value. Vertex id is 0-based, from 0 to 20483.
I used fsaverage5 as the template and extracted the coordinates of each vertex on that surface using the following commands.
SW = SurfStatReadSurf({[template_path 'fsaverage5/surf/lh.white'],[template_path 'fsaverage5/surf/rh.white']});
coordis = SurfStatInd2Coord(vertex_id, SW)
Then I typed
mris_convert unthreshold_file_SW.asc lh_unthreshold_SW.gii # because I learnt that generally surface files starts with a hemisphere specifier.
or
mris_convert unthreshold_file_SW.asc unthreshold_SW.gii
The error message is ERROR: MRISalloc: nfaces=-36 < 0. I guess one possible reason is the first coordinate of the first index is negative (-36). So I generated a new file, replacing all the negative x coordinates with its absolute value - unthreshold_file_SW_abs.asc and then typed:
mris_convert unthreshold_file_SW_abs.asc lh_unthreshold_SW_abs.gii
This time the error message is Segmentation fault.
I have attached the ascii file.
Could you please give me any clue how to solve this problem?
I also tried this command and it works well, suggesting I can use mris_convert smoothly.
mris_convert -v lh.white lh.white.neighbors.asc # This command works well. I generated lh.white.neighbors.asc, suggesting my preparation work is good.
Many thanks in advance,
Xiuyi Wang
freesurfer@nmr.mgh.harvard.edu