Dear Freesurfer users and developers!
I am trying to extract vertices by the script suggested by Pedro Paulo de M. Oliveira Jr.
for i in `seq 1 $numsubject` do mri_convert --frame $i y.mgh $FSAVERAGE_DIR/surf/lh.$i.mgh mris_convert -c $i.mgh $FSAVERAGE_DIR/surf/lh.inflated lh.$i.asc done
It works fine, but I'm just wondering if there is an easy opportunity to combine the vertices from each subject into one big N-by-V matrix (N - subject № , V- vertex №).
Thank you very much for your time! -- Regards, Alexander Lebedev Stavanger University Hospital, Norway
The question is not actual anymore. I solved this issue by concatenating the files in R.
If anything, here's my R-code... For example for the right hemisphere do something like:
*** a<-c(); for (i in "NUMBER-OF-YOUR-SUBJECTS"){ nn <- paste("rh.",i,".asc", sep='') a <- (c(a, nn)) };
u<-c(); result<-c(); for (x in a) { u<- t(read.table(x, sep = " ", header=F, quote="")[, 5]); result <- rbind (result, u) }; ***
[do the same for the Left H/S and afterwards just concatenate them via 'cbind'] --- Alex
* Alexander Lebedev awlman@rambler.ru [Wed, 25 Jan 2012 13:01:32 +0400]:
Dear Freesurfer users and developers!
I am trying to extract vertices by the script suggested by Pedro Paulo de M. Oliveira Jr.
for i in `seq 1 $numsubject` do mri_convert --frame $i y.mgh $FSAVERAGE_DIR/surf/lh.$i.mgh mris_convert -c $i.mgh $FSAVERAGE_DIR/surf/lh.inflated lh.$i.asc done
It works fine, but I'm just wondering if there is an easy opportunity
to
combine the vertices from each subject into one big N-by-V matrix (N - subject № , V- vertex №).
Thank you very much for your time!
-- Sincerely Your Alexander Lebede \nI.P. Pavlov State Medical Universit 197022, Lev Tolstoy str. 6/ Saint Petersburg, Russian Federatio \ntel.:+7-921-441-79- e-mail: awlman@rambler. Skype ID: celtic__frost
Hi Alexander, I'm not sure what you are trying to accomplish. You want to get an Nsubject by Vvertex matrix in ascii? You can use mri_convert y.mgh y.ascii --ascii this will create a single column with all the data concatenated. The first V rows will be the Vvertices for the first subject, etc. Don't know if this gets you closer or not. doug
Alexander Lebedev wrote:
Dear Freesurfer users and developers!
I am trying to extract vertices by the script suggested by Pedro Paulo de M. Oliveira Jr.
for i in `seq 1 $numsubject` do mri_convert --frame $i y.mgh $FSAVERAGE_DIR/surf/lh.$i.mgh mris_convert -c $i.mgh $FSAVERAGE_DIR/surf/lh.inflated lh.$i.asc done
It works fine, but I'm just wondering if there is an easy opportunity to combine the vertices from each subject into one big N-by-V matrix (N - subject № , V- vertex №).
Thank you very much for your time!
Regards, Alexander Lebedev Stavanger University Hospital, Norway _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu