make_average_subject
On Thu, 22 Oct 2009, Oertel, Viola wrote:

> Dear all,
> can you tell me what command you use if you want to develop an average brain 
> (myaverage)?
> Thanks,
> Viola
>
> ________________________________
>
> Von: freesurfer-boun...@nmr.mgh.harvard.edu im Auftrag von Alex Fornito
> Gesendet: Do 22.10.2009 14:34
> An: Douglas N Greve
> Cc: freesurfer@nmr.mgh.harvard.edu
> Betreff: Re: [Freesurfer] Mri_label2vol memory error
>
>
>
> Hi again,
> I have noticed that the standard freesurfer annots have the same number of
> regions in each hemi. In my annot, I have different numbers; e.,g 1171 in
> the left and 1187 in the right. Is this what's causing the output of
> mri_aparc2aseg to label all right hemi cortical voxels with a 2000 (output
> below)? Is there a way around this; e.g., by running mri_aparc2aseg on a per
> hemi basis?
>
> I tried generating new annot-tables with either the same number of rois as
> my parcellation or with an arbitrarily high number (e.g., 5000) of rois, but
> this made no difference to the output.
>
> Thanks again,
> Alex
>
>
> On 21/10/2009 12:27, "Alex Fornito" <forni...@unimelb.edu.au> wrote:
>
>> Hi again,
>> After running the command, the output image seems to have the left hemi 
>> cortex
>> parcellated, but the right is all assigned one intensity (2000). Is there
>> something I'm missing? Output below.
>> Thanks again,
>> Alex
>>
>>  mri_aparc2aseg --s fsaverage --rip-unknown --annot 1000_compact.aparc
>> --volmask --o test.nii
>> SUBJECTS_DIR /Users/alexfornito/Alex_Docs/MRI_data/freesurfer
>> subject fsaverage
>> outvol test.nii
>> useribbon 0
>> baseoffset 0
>> RipUnknown 1
>>
>> Reading lh white surface
>>  /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsaverage/surf/lh.white
>> reading group avg surface area 822 cm^2 from file
>> Reading in average area
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsavera
>> ge/surf/lh.white.avg.area.mgh
>>
>> Reading lh pial surface
>>  /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsaverage/surf/lh.pial
>> reading group avg surface area 1041 cm^2 from file
>> Reading in average area
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsavera
>> ge/surf/lh.pial.avg.area.mgh
>>
>> Loading lh annotations from
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsa
>> verage/label/lh.1000_compact.aparc.annot
>> reading colortable from annotation file...
>> colortable with 1171 entries read (originally
>> /autofs/space/birn_044/users/chris
>> tophe_atlas_rebuild/Simple_surface_labels2005.txt)
>>
>> Reading rh white surface
>>  /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsaverage/surf/rh.white
>> reading group avg surface area 822 cm^2 from file
>> Reading in average area
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsavera
>> ge/surf/rh.white.avg.area.mgh
>>
>> Reading rh pial surface
>>  /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsaverage/surf/rh.pial
>> reading group avg surface area 1043 cm^2 from file
>> Reading in average area
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsavera
>> ge/surf/rh.pial.avg.area.mgh
>>
>> Loading rh annotations from
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsa
>> verage/label/rh.1000_compact.aparc.annot
>> reading colortable from annotation file...
>> colortable with 1187 entries read (originally
>> /autofs/space/birn_044/users/chris
>> tophe_atlas_rebuild/Simple_surface_labels2005.txt)
>> Have color table for lh white annotation
>> Have color table for rh white annotation
>> Loading ribbon segmentation from
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfe
>> r/fsaverage/mri/ribbon.mgz
>> Ripping vertices labeled as unkown
>> Ripped 110 vertices from left hemi
>> Ripped 90 vertices from right hemi
>>
>> Building hash of lh white
>>
>> Building hash of lh pial
>>
>> Building hash of rh white
>>
>>
>> Building hash of rh pial
>>
>> Loading aseg from
>> /Users/alexfornito/Alex_Docs/MRI_data/freesurfer/fsaverage/mri
>> /aseg.mgz
>> ASeg Vox2RAS: -----------
>> -1.000   0.000   0.000   128.000;
>>  0.000   0.000   1.000  -128.000;
>>  0.000  -1.000   0.000   128.000;
>>  0.000   0.000   0.000   1.000;
>> -------------------------
>>
>> Labeling Slice
>>   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18
>> 19
>>  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38
>> 39
>>  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58
>> 59
>>  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78
>> 79
>>  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98
>> 99
>> 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
>> 119
>> 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
>> 139
>> 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
>> 159
>> 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
>> 179
>> 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
>> 199
>> 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
>> 219
>> 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
>> 239
>> 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 nctx = 337762
>> Used brute-force search on 0 voxels
>> Writing output aseg to test.nii
>>
>>
>> On 20/10/2009 18:11, "Douglas N Greve" <gr...@nmr.mgh.harvard.edu> wrote:
>>
>>>
>>> I just created a ribbon.mgz (link below). Copy this into fsaverage/mri
>>> and see if it works.
>>>
>>> doug
>>>
>>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ribbon.mgz
>>>
>>> Alex Fornito wrote:
>>>> Thanks, that did the trick.
>>>> The only problem is that I would also like to do the same for fsaverage, 
>>>> but
>>>> in this case mri_aparc2aseg fails because it is looking for ribbon.mgz (see
>>>> below). Is there a work around for this?
>>>> Thanks again,
>>>> Alex
>>>>
>>>>
>>>> mri_aparc2aseg --s fsaverage/ --rip-unknown --annot 1000_compact.aparc
>>>> --volmask --o fsavg_1000roi_aseg.nii
>>>> SUBJECTS_DIR /work/imaging5/af397/twins/freesurfer
>>>> subject fsaverage/
>>>> outvol fsavg_1000roi_aseg.nii
>>>> useribbon 0
>>>> baseoffset 0
>>>> RipUnknown 1
>>>>
>>>> Reading lh white surface
>>>>  /work/imaging5/af397/twins/freesurfer/fsaverage//surf/lh.white
>>>> reading group avg surface area 822 cm^2 from file
>>>> Reading in average area
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//surf/lh.white.avg.area.mgh
>>>>
>>>> Reading lh pial surface
>>>>  /work/imaging5/af397/twins/freesurfer/fsaverage//surf/lh.pial
>>>> reading group avg surface area 1041 cm^2 from file
>>>> Reading in average area
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//surf/lh.pial.avg.area.mgh
>>>>
>>>> Loading lh annotations from
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//label/lh.1000_compact.aparc
>>>> .annot
>>>> reading colortable from annotation file...
>>>> colortable with 1171 entries read (originally
>>>> /autofs/space/birn_044/users/christophe_atlas_rebuild/Simple_surface_labels2
>>>> 005.txt)
>>>>
>>>> Reading rh white surface
>>>>  /work/imaging5/af397/twins/freesurfer/fsaverage//surf/rh.white
>>>> reading group avg surface area 822 cm^2 from file
>>>> Reading in average area
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//surf/rh.white.avg.area.mgh
>>>>
>>>> Reading rh pial surface
>>>>  /work/imaging5/af397/twins/freesurfer/fsaverage//surf/rh.pial
>>>> reading group avg surface area 1043 cm^2 from file
>>>> Reading in average area
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//surf/rh.pial.avg.area.mgh
>>>>
>>>> Loading rh annotations from
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//label/rh.1000_compact.aparc
>>>> .annot
>>>> reading colortable from annotation file...
>>>> colortable with 1187 entries read (originally
>>>> /autofs/space/birn_044/users/christophe_atlas_rebuild/Simple_surface_labels2
>>>> 005.txt)
>>>> Have color table for lh white annotation
>>>> Have color table for rh white annotation
>>>> Loading ribbon segmentation from
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//mri/ribbon.mgz
>>>> ERROR: cannot find
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//mri/ribbon.mgz
>>>> ERROR: loading
>>>> /work/imaging5/af397/twins/freesurfer/fsaverage//mri/ribbon.mgz
>>>>
>>>>
>>>> On 19/10/2009 17:42, "Douglas N Greve" <gr...@nmr.mgh.harvard.edu> wrote:
>>>>
>>>>
>>>>> how many labels are in that annot? The way that mri_label2vol works is
>>>>> to create a multi-frame volume with the number of frames equal to the
>>>>> number of labels in the annotation. It then counts the number of times
>>>>> each voxel "sees" a given label. It then assigns that voxel to the most
>>>>> frequently occurring label. The problem is that your volume is already
>>>>> starting at 256^3, so it does not take many frames to make the memory
>>>>> requirements blow up way beyond what even a big computer can do.
>>>>> mri_label2vol was really meant for the case where you downsample labels
>>>>> which causes a single voxel to have multiple labels. In your case, you
>>>>> are probably better off using mri_aparc2aseg, specifying your annotation
>>>>> with --annot (see 1002593/scripts/recon-all.log for example
>>>>> command-line) . You might want to specify a different annot-table to
>>>>> match your labels.
>>>>>
>>>>> doug
>>>>>
>>>>> Alex Fornito wrote:
>>>>>
>>>>>> Hi all,
>>>>>> I've tried running mri_label2vol on a few different computers now and 
>>>>>> keep
>>>>>> encountering the same memory error. Can anyone provide suggestions as to
>>>>>> how
>>>>>> to get around this problem? I've included the output from a run using
>>>>>> linux
>>>>>> on a dual 3.05 GHz Xeon with 8GB ram below.
>>>>>> Thanks for your help,
>>>>>> Alex
>>>>>>
>>>>>>
>>>>>>  mri_label2vol --annot 1002593/label/fsavg_lh_500_compact.aparc.annot
>>>>>> --identity --temp 1002593/mri/orig.mgz --subject 1002593 --hemi lh --o
>>>>>> output.nii
>>>>>> Number of labels: 0
>>>>>> Annot File:      1002593/label/fsavg_lh_500_compact.aparc.annot
>>>>>> Template Volume: 1002593/mri/orig.mgz
>>>>>> Outut Volume: output.nii
>>>>>> Registration File: (null)
>>>>>> Fill Threshold: 0
>>>>>> Label Vox Vol:  1
>>>>>> ProjType:       (null)
>>>>>> ProjTypeId:     0
>>>>>> ProjStart:      0
>>>>>> ProjStop:       0
>>>>>> ProjDelta:      0.1
>>>>>> Subject:  1002593
>>>>>> Hemi:     lh
>>>>>> UseNewASeg2Vol:  1
>>>>>> DoLabelStatVol  0
>>>>>> $Id: mri_label2vol.c,v 1.25.2.3 2009/06/09 16:22:30 greve Exp $
>>>>>> Template RAS-to-Vox: --------
>>>>>> -1.000   0.000   0.000   128.000;
>>>>>> -0.000  -0.000  -1.000   128.000;
>>>>>> -0.000   1.000  -0.000   128.000;
>>>>>>  0.000   0.000   0.000   1.000;
>>>>>> Template Voxel Volume: 1
>>>>>> nHits Thresh: 0
>>>>>> Using Identity Matrix
>>>>>> RegMat: --------
>>>>>>  1.000   0.000   0.000   0.000;
>>>>>>  0.000   1.000   0.000   0.000;
>>>>>>  0.000   0.000   1.000   0.000;
>>>>>>  0.000   0.000   0.000   1.000;
>>>>>> Label RAS-to-Vox: --------
>>>>>> -1.000   0.000   0.000   128.000;
>>>>>>  0.000   0.000  -1.000   128.000;
>>>>>>  0.000   1.000   0.000   128.000;
>>>>>>  0.000   0.000   0.000   1.000;
>>>>>>   INFO: loading surface
>>>>>> /work/imaging5/af397/twins/freesurfer/1002593/surf/lh.white
>>>>>> nvertices = 143248
>>>>>> Reading thickness
>>>>>> /work/imaging5/af397/twins/freesurfer/1002593/surf/lh.thickness
>>>>>> Loading annotations from 1002593/label/fsavg_lh_500_compact.aparc.annot
>>>>>> reading colortable from annotation file...
>>>>>> colortable with 596 entries read (originally
>>>>>> /autofs/space/birn_044/users/christophe_atlas_rebuild/Simple_surface_label
>>>>>> s>>>> 2
>>>>>> 005.txt)
>>>>>> annotidmax = 595
>>>>>> Allocating Hit Volume (1392508928) voxels
>>>>>> MRIalloc(256, 256, 256): could not allocate 131072 bytes for 22406th 
>>>>>> slice
>>>>>>
>>>>>> Cannot allocate memory
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Freesurfer mailing list
>>>>>> Freesurfer@nmr.mgh.harvard.edu
>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>
> --
>
> Alex Fornito
> CJ Martin Post-Doctoral Fellow
> Brain Mapping Unit
> Department of Psychiatry
> University of Cambridge
> Downing Site
> Downing St, Cambridge
> UK CB2 3EB
>
> Email:    af...@cam.ac.uk
> Phone:    +44 (0) 1223 764670
> Fax:        +44 (0) 1223 336581
>
> Australian Details:
>
> Melbourne Neuropsychiatry Centre
> National Neuroscience Facility
> Levels 1 & 2, Alan Gilbert Building
> 161 Barry St
> Carlton South 3053
> Victoria, Australia
>
> Email:    forni...@unimelb.edu.au
> Phone:    +61 3 8344 1861
> Fax:        +61 3 9348 0469
>
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
>
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to