AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
December 21, 2004 01:10PM
Greetings!

I am still having problems with converting the FreeSurfer labels into afni. There are previous postings, but I will recap here.

We made label files on the averaged brain and we ultimately want to convert these into AFNI, for each individual, and use them as a mask. We have done this in the past, using a parcelated brain --each region becoming it's own label-- for each subject, but it does not seem to be working here. One difference (i think) is that each subject's label files were not generated by mri_label2label from the averaged brain to the individual brains. --but really, that shouldn't make a difference i don't think, because the label file still looks OK in FreeSurfer!

BLEH

So, let me walk you through what I find:

---1st we convert the label files we made on the averaged brain to each individual using mri_label2label

mri_label2label \
--srclabel area.label \
--srcsubject average \
--trgsubject subject \
--trglabel subject_area.label \
--regmethod surface \
--hemi rh

I checked this in FreeSurfer and it looks good for both the average and the subject labels. The first lines of the files look like this.

#!ascii label , from subject average
1596
156 0.000 0.000 0.000 -2.390716
158 0.000 0.000 0.000 -3.609089
351 0.000 0.000 0.000 -2.571487
352 0.000 0.000 0.000 -3.603294
631 0.000 0.000 0.000 -2.066658
632 0.000 0.000 0.000 -2.349666


#!ascii label , from subject AM-04V
1559
23643 24.603 -64.509 26.578 -1.390716
15824 31.086 -72.659 22.273 -1.609089
7007 23.507 -83.788 27.766 -1.571487
15813 20.703 -71.963 23.459 -3.603294
28751 31.989 -59.632 22.516 -1.066658
36228 29.974 -51.601 21.965 -0.349666
9136 18.176 -80.434 30.375 -1.396408
9998 29.544 -79.539 24.609 -3.158289
15804 35.385 -72.995 23.258 -2.981007


----2nd we get rid of the two beginning lines of the label file

sed 1,2d subject_area.label > area.sed

----3rd we awk the area.sed file to create a node index column and then subsequent 1, 0, 0 columns

awk '{print $1, 1, 0, 0}' area.sed > area.1D.dset

When attempting to look at this 1D.dset file in SUMA, the label file actually gets distorted and becomes a random speckling of dots/lines. (what's up with the node index?!?) --Incidently, the first col. has the same values as displayed by the subject label file displayed above, and the 1D.dset file seems ok too.

---4th we WOULD run 3dSurf2Vol --if we can get that far!!!
3dSurf2Vol
-spec subject_rh_std.spec \
-sv subjectSUMA_SurfVol_Alnd_Exp+orig \
-surf_A wm \
-surf_B pial \
-sdata_1D area.1D.dset \
-f_steps 10 \
-grid_parent smooth_Deconvolve+orig \
-map_func ave \
-prefix area+orig

So, the 3dSurf2Vol we have discussed a while ago, and it should work...it seems to work on the funky label files, so i would assume it will work on the GOOD label files once we got there.

I hope this is enough info. I gave up for a while, hoping to clear my head on this, but there are previous postings on this from me. Thanks for any help you can give!

Thanks again
Jennine

PS SurfClust is WONDERFUL!!!!!! Thanks again.
Subject Author Posted

mri_label2label

Jennine December 21, 2004 01:10PM

Re: mri_label2label

rick reynolds December 21, 2004 01:31PM

Re: mri_label2label

Jennine December 21, 2004 02:21PM

Re: mri_label2label

rick reynolds December 21, 2004 02:28PM

Re: mri_label2label

Jennine December 21, 2004 02:37PM

Re: mri_label2label

Jennine December 21, 2004 02:46PM

Re: mri_label2label

Jennine December 21, 2004 03:03PM

Re: mri_label2label

rick reynolds December 21, 2004 03:59PM

Re: mri_label2label

Jennine December 21, 2004 05:06PM