Hi Bruce,
Yes I am trying to do some quantitative analysis rather than just displaying the patches. The only way I know for getting the vertex indices and the coordinations is reading it into matlab.
(1) flat = read_patch(‘lh.cortex.patch.flat’); This command worked today! I rebooted my system.
(2) patch = read_asc(‘lh.cortex.patch.flat.asc’); This command still couldn’t work. The error information is:
??? Error using ==> reshape To RESHAPE the number of elements must not change.
Error in ==> read_asc at 39 v = reshape(v, [4 S(2)])’ ;
Thanks very much!
Qiongmin
--------------------- Original email ----------------------- Hi Qiongmin
why are you trying to read the patches into matlab?
Also, can you send us your full matlab command that generated the error? Sounds like you passed the incorrect file name
cheers Bruce On Tue, 27 May 2014, Caka wrote:
Thank you Bruce,
I convert the fsaverage flat map into a ascii file, using: ? mris_convert ?-p ?lh.cortex.patch.flat ?lh.cortex.patch.flat.asc. Now I need to read these two files.
(1) I used read_patch.m to read lh.cortex.patch.flat. But an error came out, it said ? Error using ==> read_patch at 28, could not open file ??. (2) I couldn?t find a read_patch_asc.m script in Freesurfer, as is suggestedin?https://www.mail-archive.com/freesurfer%40nmr.mgh.harvard.edu/msg35813.h tml (3) I found a read_asc.m instead, but when I used it to read the lh.cortex.patch.flat.asc, an error occurred: ?Error using ==> fgets, ?Invalid file identifier. Use open to generate a valid file identifier?.
Could you please give me some advices?Thank you very much!
Best regards, Qiongmin
????????????????Original email--------------------------------------- Hi Qiongmin
- I think this is a bug in the open GL code that is outside of our?
control. We will try to track it down
- The flat maps aren't really any different than say the inflated?
fsaverage surface. If you can generate group (or individual maps) in? fsaverage space you can display them on the flat maps.
- The index of each vertex in the flattened space is stored in the patch?
files so you can always look up what vertex it was on inflated, sphere,? etc...
cheers Bruce
On Mon, 26 May 2014, Caka? wrote:
Dear Bruce, Doug and all, Thanks for your suggestion, it helped a lot. (1) I load the fsaverage surface (lh.inflated) in tksurfer, and then load the fsaverage patch (lh.cortex.patch.flat). The flat map was shown for several seconds, and then ?an error occurred and tksurfer was shut down. The terminal said: ?tksurfer.bin:tnl/t_vertex.c:407: update_input_ptrs: Assertion ?a[j].inputstride == vptr-> stride? failed. Abort(core dumped)?. ?Could you give me some advice? I use a 'CentOS release 6.2' system. The freesurfer is ?freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0?.? (2) Indeed, I want to flatten all cortical thickness surfaces of 140 subjects onto the ?lh.cortex.patch.flat? of fsaverage. I just don?t understand your idea how to do this. After I load ?lh.cortex.patch.flat? of fsaverage, the tksurfer only shows this flat map (now it lasted for several seconds and crashed), so how can I ' load whatever overlay you want in the same way you would on the inflated surface?? Does it mean that I load the individual flat map on the individual inflated surface? But I haven?t got the individual flat map yet.? (3) I am wondering if there are some table recording the transformation relationships between the fsaverage surface vertices and the flat map vertices? If so, then I think all I need to do is extracting the cortical thickness value of every vertex in individual inflated surface, and then putting into the corresponding vertex in the flat map.? Thank you very much!? Best regards, Qiongmin?
freesurfer@nmr.mgh.harvard.edu