Thank you Doug, I think I initially misinderstood a number of things about this process. I have a 3D GRE volume (I guessed its contrast is closest to BOLD, bbregister set to T1 or T2 seemed to work more poorly). It is not a 2D. I would like to transform the 3D GRE volume into freesurfer space, so mri_segstats can use the segmentations from aparc+aseg.mgz to give back mean intensity values for each anatomic area. I could not find a file called lowb.nii, and so was not sure how to proceed.
1) do I need to use the file you mentioned (lowb.nii) - and if so, where would I find the file? 2) so running "mri_vol2vol --mov Vol_906.nii --fstarg T1.mgz --o Vol_906_Reg_Bold.nii --no-save-reg --reg register_bold.dat" (note inv left off) should map the 3D volume (Vol_906.nii) into the T1 space? Thank you for all of your help. Best wishes, Sal On Mon, May 27, 2013 at 7:23 PM, Douglas Greve <gr...@nmr.mgh.harvard.edu>wrote: > > On 5/26/13 2:11 PM, Salil Soman wrote: > > Dear Doug, > > Thank you for your email. Following up on our previous discussions: > > 1) *bbregister fail *- this was happening because of error from > fslregister. The variable fsvol was translating to "ERROR". In fslregister > th value for fsvol is set to brainmask, along with numerous other > parameters being initialized. > By adding the line "set fsvol = brain mask" (without quotes) at the > beginning of the section "#Convert reference to analyze" the CentOS 6 > version I am running on ubuntu 12.04 (with SGE), now works. > > see previous msg. > > > 2) when you suggested I run bbregister on the lowb.nii file, was it > because I had suggested I wanted to register to a 2D ADC map? If I want to > instead use a 3D volume (e.g. a 3D ASL), would I use the actual volume I > want to get value from instead of lowb.nii? I ended up running > > Oh, I did not realize it was a 2D map. Why do you have a 2D map instead of > 3D? That might be hard to get registered. You could have used the ADC or > FA. In general, you don't want to use the contrast that you will later be > testing as it creates a little bit of circularity. It is not much though, > and it should be fine. > > > 3) for the mri_vol2vol step - I had to change targ to fstarg, and I left > out the interp flag so it would do its default trilinear: mri_vol2vol > --mov Vol_906.nii --fstarg T1.mgz --o Vol_906_Reg_Bold.nii --no-save-reg > --reg register_bold.dat --inv > > that maps T1 into the bold space. Is that what you want? If you want to > map the bold into the anatomical space, then leave off -inv. This will also > solve your problem below > doug > > > 4) I would like to get the segmentations from aparc+aseg.mgz as the areas > where I get the values summed. So I entered mri_segstats --seg > mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i > Vol_906_Reg_Bold.nii --sum Vol_aparc_aseg.stats > > > > but then I received this error: > > ERROR: dimension mismatch between input volume and seg > input 224 224 170 > seg 256 256 256 > * > * > *So, in summary, while I've fixed bbregister to work on my system, I am > still having trouble normalizing my 3D non T1 volume data into the FS space > to be able to use the labels from aparc+aseg.mgz to get statistics for each > anatomic area.* > > Any ideas on how to proceed? > > Thanks, > > Sal > > > On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <gr...@nmr.mgh.harvard.edu > > wrote: > >> >> On 5/25/13 1:39 PM, Salil Soman wrote: >> >> Thank you Doug. >> >> Just so I am clear - is the anatomical the nifti T1.mgz or is it a >> different file. From your email I gather should do the following: >> >> *1) Use bbregister to register the lowb image to the anatomical. This >> creates a registration matrix.* >> >> bbregister -s SUBJECTNAME --mov lowb.nii --initfsl --reg register.dat >> >> That is right, but add --t2 (since it is t2 weighted). >> >> >> *2) Use mri_vol2vol and the registration to map the ADC map to the >> anatomical* >> >> mri_vol2vol --mov lowb.nii --targ $vol --inv --interp nearest --o $vol2diff >> --reg $outdir/register.dat --no-save-reg >> >> Use the ADC as the moveable (not lowb, but use the lowb for >> bbregister). The target volume should be the T1.mgz (or any conformed >> volume). The output will be the adc in the anatomical space (not sure why >> you call it vol2diff). >> >> *3) use mri_segstats to extract the values* >> >> *mri_segstats* --seg $SUBJECTS_DIR/SUBJECTNAME/mri/wmparc.mgz --ctab >> $FREESURFER_HOME/FreeSurferColorLUT.txt --i lowb.nii --sum fa.stats >> >> The input would be the adc volume mapped the anatomical space. I >> would use WMParcStatsLUT.txt or else you'll get a billion different areas >> not represented in wmparc. You may also want to add "--seg-erode 1" to >> erode the segmentations by a voxel. This helps to prevent partial voluming. >> >> doug >> >> >> >> Where lowb.nii is the other MRI tissue sequence I am analyzing (e.g. >> ADC), $vol2diff is the output image of the registration, and fa.stats will >> be my output stats table? >> >> I suspect there is part of the syntax for these tools I do not >> understand. Also, what input would $vol be? >> >> Best wishes, >> >> Sal >> >> >> On Sat, May 25, 2013 at 10:06 AM, Douglas Greve < >> gr...@nmr.mgh.harvard.edu> wrote: >> >>> >>> Hi Sal, yes you can. Use bbregister to register the lowb image to the >>> anatomical. This creates a registration matrix. Use mri_vol2vol and the >>> registration to map the ADC map to the anatomical, then use mri_segstats to >>> extract the values >>> doug >>> >>> ps. Please post questions to the FS list instead of us directly so that >>> others can benefit and it gets archived. thanks! >>> >>> >>> >>> On 5/25/13 1:03 PM, Salil Soman wrote: >>> >>>> Dear Dr. Greve, >>>> >>>> Is it possible to register a nonstructural MR sequences (e.g. an ADC >>>> map) with the aseg.mgz file (or aparc+aseg.mgz file, etc) and then, using >>>> the segmentation from the aseg (or aparc+aseg) file to output a mean ADC >>>> value for each anatomic area segmented? >>>> >>>> Thank you for your time and consideration. >>>> >>>> Best wishes, >>>> >>>> Sal >>>> >>>> Salil Soman, MD, MS >>>> >>> >>> >>> >>> 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. >>> >>> >> >> > >
_______________________________________________ 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.