Doug,
I am sorry that I wasn’t clear before, here is all the info about it all in one place.
I am trying to transfer a cortical label to label wm by using the following commands:
subjects=/data/user/snolin/Scripts/Freesurfer_scripts/partial_recon;
unset SUBJECTS_DIR
SUBJECTS_DIR=$subjects
export SUBJECTS_DIR
patient=211215
#Label 8 conversion
mris_label2annot --ctab /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8lhV1.ctab --s $patient --h lh --l $subjects/$patient/label/8_LH_V1.label --a 8V1
mris_label2annot --ctab /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8rhV1.ctab --s $patient --h rh --l $subjects/$patient/label/8_RH_V1.label --a 8V1
mri_aparc2aseg --s $patient --annot 8V1 --labelwm
mri_binarize --i $subjects/$patient/mri/8V1+aseg.mgz --o $subjects/$patient/mri/8V1_bin.mgz --match 4001 3001
mri_convert $subjects/$patient/mri/8V1_bin.mgz $subjects/$patient/mri/8V1_bin.nii
mri_vol2vol --mov /data/project/vislab/raw/HCP_900sub/HCP_diff_data/$patient/data.nii.gz --targ $subjects/$patient/mri/8V1_bin.nii --reg /data/user/snolin/HCP_registration/HCP_BBR/HCP_registration_new/$patient/register_edit.dat --o $subjects/$patient/mri/8V1_diffROI.nii --inv --nearest
This makes a 8V1+aseg.mgz file there are just no 4001 and 3001's in the file so when I binarize there is nothing there. So my question is why is it not identifying the wm next to my label? This is happening in multiple subjects on varying labels. I have attached a picture of what the error looks like. As you can see all the values in the volume are all zero (blue) and there is nothing next to the cortical label (red). I have tried changing the -wmparc-dmax, -hypo-as-wm, -smooth_normals. Basically everything I could find but it won’t budge even though doing other labels in the same person works fine. The original cortical label is also correctly placed in the cortical ribbon.
Here is the output from running the above commands:
Reading ctab /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8lhV1.ctab
Number of ctab entries 2
$Id: mris_label2annot.c,v 1.20 2016/01/07 23:28:11 greve Exp $
cwd /data/user/snolin/Scripts/Labelmaker
cmdline mris_label2annot --ctab /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8lhV1.ctab --s 211215 --h lh --l /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/label/8_LH_V1.label --a 8V1
sysname Linux
hostname c0039
machine x86_64
user snolin
subject 211215
hemi lh
SUBJECTS_DIR /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon
ColorTable /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8lhV1.ctab
AnnotName 8V1
nlables 1
LabelThresh 0 0.000000
ERROR: /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/label/lh.8V1.annot already exists
Reading ctab /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8rhV1.ctab
Number of ctab entries 2
$Id: mris_label2annot.c,v 1.20 2016/01/07 23:28:11 greve Exp $
cwd /data/user/snolin/Scripts/Labelmaker
cmdline mris_label2annot --ctab /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8rhV1.ctab --s 211215 --h rh --l /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/label/8_RH_V1.label --a 8V1
sysname Linux
hostname c0039
machine x86_64
user snolin
subject 211215
hemi rh
SUBJECTS_DIR /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon
ColorTable /data/user/snolin/Scripts/Labelmaker/color_tables/clut.8rhV1.ctab
AnnotName 8V1
nlables 1
LabelThresh 0 0.000000
ERROR: /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/label/rh.8V1.annot already exists
SUBJECTS_DIR /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon
subject 211215
outvol /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1+aseg.mgz
useribbon 0
baseoffset 0
labeling wm
dmaxctx 5.000000
RipUnknown 0
Reading lh white surface
/data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/surf/lh.white
Reading lh pial surface
/data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/surf/lh.pial
Loading lh annotations from /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/label/lh.8V1.annot
Reading rh white surface
/data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/surf/rh.white
Reading rh pial surface
/data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/surf/rh.pial
Loading rh annotations from /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/label/rh.8V1.annot
Loading ribbon segmentation from /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/ribbon.mgz
Building hash of lh white
Building hash of lh pial
Building hash of rh white
Building hash of rh pial
Loading aseg from /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/aseg.mgz
ASeg Vox2RAS: -----------
-1.00000 0.00000 0.00000 128.00000;
0.00000 0.00000 1.00000 -128.00000;
0.00000 -1.00000 0.00000 128.00000;
0.00000 0.00000 0.00000 1.00000;
-------------------------
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 = 1124316
Used brute-force search on 0 voxels
Fixing Parahip LH WM
Found 0 clusters
Fixing Parahip RH WM
Found 0 clusters
Writing output aseg to /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1+aseg.mgz
$Id: mri_binarize.c,v 1.43 2016/06/09 20:46:21 greve Exp $
cwd /data/user/snolin/Scripts/Labelmaker
cmdline mri_binarize.bin --i /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1+aseg.mgz --o /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_bin.mgz --match 4001 3001
sysname Linux
hostname c0039
machine x86_64
user snolin
input /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1+aseg.mgz
frame 0
nErode3d 0
nErode2d 0
output /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_bin.mgz
Binarizing based on matching values
nMatch 2
0 4001
1 3001
binval 1
binvalnot 0
fstart = 0, fend = 0, nframes = 1
Found 0 values in range
Counting number of voxels in first frame
Found 0 voxels in final mask
Count: 0 0.000000 16777216 0.000000
mri_binarize done
mri_convert.bin /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_bin.mgz /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_bin.nii
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_bin.mgz...
TR=2400.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_bin.nii...
Matrix from regfile:
1.00000 -0.00055 0.00091 -0.38465;
-0.00091 0.00095 1.00000 0.38039;
-0.00055 -1.00000 0.00095 -0.14575;
0.00000 0.00000 0.00000 1.00000;
movvol /data/project/vislab/raw/HCP_900sub/HCP_diff_data/211215/data.nii.gz
targvol /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_bin.nii
outvol /data/user/snolin/Scripts/Freesurfer_scripts/partial_recon/211215/mri/8V1_diffROI.nii
regfile /data/user/snolin/HCP_registration/HCP_BBR/HCP_registration_new/211215/register_edit.dat
invert 1
tal 0
talres 2
regheader 0
noresample 0
interp nearest (0)
precision float (3)
Gdiag_no -1
Synth 0
SynthSeed 1518108582
Invert!
Inverting registration
Final tkRAS-to-tkRAS Matrix is:
1.00000 -0.00091 -0.00055 0.38491;
-0.00055 0.00095 -1.00000 -0.14632;
0.00091 1.00000 0.00095 -0.37990;
0.00000 0.00000 0.00000 1.00000;
Vox2Vox Matrix is:
1.25000 -0.00069 0.00114 36.96743;
0.00114 0.00118 -1.25000 218.81943;
0.00069 1.25000 0.00118 18.96824;
0.00000 0.00000 0.00000 1.00000;
Resampling
Output registration matrix is identity
mri_vol2vol done
Thanks,
Sara Sims
Graduate Research Fellow
University of Alabama at Birmingham
Department of Psychology
205-975-4060
snolin(a)uab.edu