Hi doug Thanks doug. My mask and input mgh file are all fsaverage space. I try the mri_segstats, and I cannot get what you mean clearly. So I read the help of mri_segstats, but neither do I get the information. Then I have to try to run this: mri_segstats --i ./rh.36sb.10.mgh --mask ./cluster1.mgh --avgwf mytext --seg ../fsaverage/surf/rh.thickness But it aborted. I cannot find the problem, although I believe something is wrong. Also this command echo this error information: ====================================================== $Id: mri_segstats.c,v 1.75.2.9 2013/02/16 00:09:33 greve Exp $ cwd cmdline mri_segstats --i ./rh.36sb.10.mgh --mask ./cluster1.mgh --avgwf mytext --seg ../fsaverage/surf/rh.thickness sysname Linux hostname centos2 machine x86_64 user psylab16 UseRobust 0 Loading ../fsaverage/surf/rh.thickness Loading ./rh.36sb.10.mgh Loading ./cluster1.mgh NOT INVERTING There were 83 voxels in the orginal mask Voxel Volume is 1 mm^3 Generating list of segmentation ids Found 2 segmentations Computing statistics for each segmentation 0 0 163759 163759.000 1 2 83 83.000
Reporting on 2 segmentations Computing spatial average of each frame 0 1 Writing to mytext *** glibc detected *** mri_segstats: malloc(): memory corruption: 0x2e6228f8 *** ======= Backtrace: ========= /lib/libc.so.6[0x9e11dd] /lib/libc.so.6(__libc_malloc+0x67)[0x9e2d97] /lib/libc.so.6[0x9cf4cf] /lib/libc.so.6(fopen64+0x2c)[0x9d1a7c] mri_segstats[0x80536cd] /lib/libc.so.6(__libc_start_main+0xdc)[0x98ce9c] mri_segstats(__gxx_personality_v0+0x1c9)[0x804f791] ======= Memory map: ======== 00958000-00973000 r-xp 00000000 fd:00 60785448 /lib/ld-2.5.so 00973000-00974000 r-xp 0001a000 fd:00 60785448 /lib/ld-2.5.so 00974000-00975000 rwxp 0001b000 fd:00 60785448 /lib/ld-2.5.so 00977000-00acb000 r-xp 00000000 fd:00 60784655 /lib/libc-2.5.so 00acb000-00acc000 ---p 00154000 fd:00 60784655 /lib/libc-2.5.so 00acc000-00ace000 r-xp 00154000 fd:00 60784655 /lib/libc-2.5.so 00ace000-00acf000 rwxp 00156000 fd:00 60784655 /lib/libc-2.5.so 00acf000-00ad2000 rwxp 00acf000 00:00 0 00ad4000-00add000 r-xp 00000000 fd:00 60784725 /lib/libcrypt-2.5.so 00add000-00ade000 r-xp 00008000 fd:00 60784725 /lib/libcrypt-2.5.so 00ade000-00adf000 rwxp 00009000 fd:00 60784725 /lib/libcrypt-2.5.so 00adf000-00b06000 rwxp 00adf000 00:00 0 00b22000-00b2d000 r-xp 00000000 fd:00 60784686 /lib/libgcc_s-4.1.2-20080825.so.1 00b2d000-00b2e000 rwxp 0000a000 fd:00 60784686 /lib/libgcc_s-4.1.2-20080825.so.1 00c68000-00d48000 r-xp 00000000 fd:00 56176146 /usr/lib/libstdc++.so.6.0.8 00d48000-00d4c000 r-xp 000df000 fd:00 56176146 /usr/lib/libstdc++.so.6.0.8 00d4c000-00d4d000 rwxp 000e3000 fd:00 56176146 /usr/lib/libstdc++.so.6.0.8 00d4d000-00d53000 rwxp 00d4d000 00:00 0 00d72000-00d84000 r-xp 00000000 fd:00 60784662 /lib/libz.so.1.2.3 00d84000-00d85000 rwxp 00011000 fd:00 60784662 /lib/libz.so.1.2.3 08048000-08817000 r-xp 08048000 00:00 0 08817000-2e63b000 rwxp 08817000 00:00 0 [heap] f6300000-f6321000 rwxp f6300000 00:00 0 f6321000-f6400000 ---p f6321000 00:00 0 f6434000-f7cbb000 rwxp f6434000 00:00 0 f7d5c000-f7ea0000 rwxp f7d5c000 00:00 0 f7ea0000-f7ec7000 r-xp 00000000 fd:00 60784705 /lib/libm-2.5.so f7ec7000-f7ec8000 r-xp 00026000 fd:00 60784705 /lib/libm-2.5.so f7ec8000-f7ec9000 rwxp 00027000 fd:00 60784705 /lib/libm-2.5.so f7ec9000-f7ede000 r-xp 00000000 fd:00 60784716 /lib/libpthread-2.5.so f7ede000-f7edf000 ---p 00015000 fd:00 60784716 /lib/libpthread-2.5.so f7edf000-f7ee0000 r-xp 00015000 fd:00 60784716 /lib/libpthread-2.5.so f7ee0000-f7ee1000 rwxp 00016000 fd:00 60784716 /lib/libpthread-2.5.so f7ee1000-f7ee3000 rwxp f7ee1000 00:00 0 f7ee3000-f7ee6000 r-xp 00000000 fd:00 60784670 /lib/libdl-2.5.so f7ee6000-f7ee7000 r-xp 00002000 fd:00 60784670 /lib/libdl-2.5.so f7ee7000-f7ee8000 rwxp 00003000 fd:00 60784670 /lib/libdl-2.5.so f7ee8000-f7ee9000 rwxp f7ee8000 00:00 0 f7f0b000-f7f15000 r-xp 00000000 fd:00 60784678 /lib/libnss_files-2.5.so f7f15000-f7f16000 r-xp 00009000 fd:00 60784678 /lib/libnss_files-2.5.so f7f16000-f7f17000 rwxp 0000a000 fd:00 60784678 /lib/libnss_files-2.5.so f7f17000-f7f18000 rwxp f7f17000 00:00 0 ffcc0000-ffcd5000 rwxp 7ffffffe9000 00:00 0 [stack] ffffe000-fffff000 r-xp ffffe000 00:00 0 Aborted ================================================================ All the best Rujing Zha 2014-05-13
charujing123
发件人:Douglas N Greve greve@nmr.mgh.harvard.edu 发送时间:2014-05-12 23:18 主题:Re: [Freesurfer] problems about extracting specific vertex thickness value and getting a average thickness for a specific mask 收件人:"freesurfer"freesurfer@nmr.mgh.harvard.edu 抄送:
For #2 you can get the average with mri_segstats passing the mask with the --seg command and using --id 1. If the mask is in fsaverage space, then just apply it to the y.mgh (i,e the input to mri_glmfit passed with --y). Use the --avgwf option to mri_segstats. This will give you the average for each subject in a single ascii file. For #1, I would not recommend using the data from the most significant voxel since this is not necessarily a stable measure
doug
On 05/09/2014 08:44 PM, charujing wrote:
Hi FS experts and users I have done the each subjects' surface regestration on fsaverage surface, and merge all of them into a *.mgh. Group analysis is also completed. Now I have two questions: 1,I want to extract the VtxMax vertex number thickness for all subjects. The VtxMax vertex number can be got in the *.sig.cluster.summary file. And it represents the most significant vertex in that cluster. I search my question in google and find these scripts which maybe helpful for me: for i in `seq 1 $numsubject` do mri_convert --frame $i y.mgh $SUBJECTS_DIR/fsaverage/surf/lh.$i.mgh mris_convert -c $i.mgh $SUBJECTS_DIR/fsaverage/surf/lh.inflated lh.$i.asc done I got the lh.*.asc file and open it. There are five columes in this file. I guess that: first colume is vertex number, the 2nd-4th columes represent MNI305 coordinates in surface, and the 5th colume is thickness of this vertex. If I want to deal with my 1st question, all I need to get the lh.*.asc file and search the specific vertex number in this file. All of above, is there anything wrong? 2, I created a surface mask, and want to extract the average thickness value in this mask for every subject. How can I complete it? Can I extract all vertex thickness in that mask, and average them in each subject? If so, however, it will be a bot of inconvenience. I want to some simple codes to deal with it. Any reply will be highly appreaciated. Thanks All the best. Rujing Zha 2014-05-10
charujing
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.