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
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
*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
*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
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 greve@nmr.mgh.harvard.eduwrote:
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/**compliancelinehttp://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.
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 <greve@nmr.mgh.harvard.edu mailto:greve@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.
Dear Doug,
Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options?
Best wishes,
Salil Soman, MD, MS
On Sat, May 25, 2013 at 11:51 AM, Douglas Greve greve@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 <greve@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.
yep, you can use it for anything. doug
On 9/14/14 12:52 PM, Salil Soman wrote:
Dear Doug,
Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options?
Best wishes,
Salil Soman, MD, MS
On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <greve@nmr.mgh.harvard.edu mailto:greve@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.datThat 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-regUse 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.statsThe 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. dougWhere 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 <greve@nmr.mgh.harvard.edu <mailto:greve@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.-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
Thank you Doug. I am having trouble with extracting statistics using this method.
I am able to use bbregister to get a transformation that registers the PD image of the ASL to the T1. I then used this transformation matrix to register the CBF map for the ASL study into the T1.mgz space. Checking the images, the registration looked reasonable. However, when I try to extract the values from the registered image using the vois from aparc+aseg.mgz, and the FreeSurferColorLUT I get all 0 values.
*The command I ran is:*
mri_segstats --seg $SUBJECTS_DIR/SUBJECT_ID/mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i SUBJECT_ID_CBF_reg.nii.gz --sum SUBJECT_ID_ASL.stats --seg-erode 1
*where SUBJECT_ID_CBF_reg.nii.gz was generated by running:*
mri_vol2vol --mov SUBJECT_ID_CBF.nii.gz --targ T1.mgz --interp nearest --o SUBJECT_ID_CBF_reg.nii.gz --reg SUBJECT_ID.dat --no-save-reg
(and this was run with T1.mgz and SUBJECT_ID_CBF.nii.gz in the same folder).
*for which SUBJECT_ID.dat was generated by running the code:*
bbregister --s SUBJECT_ID --mov SUBJECT_ID_ASL_PD.nii.gz --reg SUBJECT_ID.dat --t1 --init-fsl
Thank you for your consideration of this question.
Best wishes,
Salil Soman, MD, MS
On Sun, Sep 14, 2014 at 3:32 PM, Douglas Greve greve@nmr.mgh.harvard.edu wrote:
yep, you can use it for anything. doug
On 9/14/14 12:52 PM, Salil Soman wrote:
Dear Doug,
Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options?
Best wishes,
Salil Soman, MD, MS
On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <greve@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 < greve@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.
-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
When you look at SUBJECT_ID_CBF_reg.nii.gz, does it look reasonable? Does it overlay correctly on the T1.mgz? doug
On 09/14/2014 11:40 PM, Salil Soman wrote:
Thank you Doug. I am having trouble with extracting statistics using this method.
I am able to use bbregister to get a transformation that registers the PD image of the ASL to the T1. I then used this transformation matrix to register the CBF map for the ASL study into the T1.mgz space. Checking the images, the registration looked reasonable. However, when I try to extract the values from the registered image using the vois from aparc+aseg.mgz, and the FreeSurferColorLUT I get all 0 values.
*The command I ran is:*
mri_segstats --seg $SUBJECTS_DIR/SUBJECT_ID/mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i SUBJECT_ID_CBF_reg.nii.gz --sum SUBJECT_ID_ASL.stats --seg-erode 1
*where SUBJECT_ID_CBF_reg.nii.gz was generated by running:*
mri_vol2vol --mov SUBJECT_ID_CBF.nii.gz --targ T1.mgz --interp nearest --o SUBJECT_ID_CBF_reg.nii.gz --reg SUBJECT_ID.dat --no-save-reg
(and this was run with T1.mgz and SUBJECT_ID_CBF.nii.gz in the same folder).
*for which SUBJECT_ID.dat was generated by running the code:*
bbregister --s SUBJECT_ID --mov SUBJECT_ID_ASL_PD.nii.gz --reg SUBJECT_ID.dat --t1 --init-fsl
Thank you for your consideration of this question.
Best wishes,
Salil Soman, MD, MS
On Sun, Sep 14, 2014 at 3:32 PM, Douglas Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
yep, you can use it for anything. doug On 9/14/14 12:52 PM, Salil Soman wrote:Dear Doug, Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options? Best wishes, Salil Soman, MD, MS On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@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.datThat 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-regUse 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.statsThe 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. dougWhere 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 <greve@nmr.mgh.harvard.edu <mailto:greve@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.-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
Dear Doug,
Thank you for your email.
The registration overlap looks reasonable. Thank you for considering this question.
Best wishes,
Sal
On Thu, Sep 18, 2014 at 12:14 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu
wrote:
When you look at SUBJECT_ID_CBF_reg.nii.gz, does it look reasonable? Does it overlay correctly on the T1.mgz? doug
On 09/14/2014 11:40 PM, Salil Soman wrote:
Thank you Doug. I am having trouble with extracting statistics using this method.
I am able to use bbregister to get a transformation that registers the PD image of the ASL to the T1. I then used this transformation matrix to register the CBF map for the ASL study into the T1.mgz space. Checking the images, the registration looked reasonable. However, when I try to extract the values from the registered image using the vois from aparc+aseg.mgz, and the FreeSurferColorLUT I get all 0 values.
*The command I ran is:*
mri_segstats --seg $SUBJECTS_DIR/SUBJECT_ID/mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i SUBJECT_ID_CBF_reg.nii.gz --sum SUBJECT_ID_ASL.stats --seg-erode 1
*where SUBJECT_ID_CBF_reg.nii.gz was generated by running:*
mri_vol2vol --mov SUBJECT_ID_CBF.nii.gz --targ T1.mgz --interp nearest --o SUBJECT_ID_CBF_reg.nii.gz --reg SUBJECT_ID.dat --no-save-reg
(and this was run with T1.mgz and SUBJECT_ID_CBF.nii.gz in the same folder).
*for which SUBJECT_ID.dat was generated by running the code:*
bbregister --s SUBJECT_ID --mov SUBJECT_ID_ASL_PD.nii.gz --reg SUBJECT_ID.dat --t1 --init-fsl
Thank you for your consideration of this question.
Best wishes,
Salil Soman, MD, MS
On Sun, Sep 14, 2014 at 3:32 PM, Douglas Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
yep, you can use it for anything. doug On 9/14/14 12:52 PM, Salil Soman wrote:Dear Doug, Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options? Best wishes, Salil Soman, MD, MS On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@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.datThat 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 amanalyzing (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 <greve@nmr.mgh.harvard.edu <mailto:greve@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.-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
Are you sure that *all* are 0? By passing it FreeSurferColorLUT.txt, you force it to report hundreds (or thousands) of ROIs which are not represented in the aparc+aseg.mgz. Also, try removing --seg-erode.
On 09/18/2014 04:43 PM, Salil Soman wrote:
Dear Doug,
Thank you for your email.
The registration overlap looks reasonable. Thank you for considering this question.
Best wishes,
Sal
On Thu, Sep 18, 2014 at 12:14 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
When you look at SUBJECT_ID_CBF_reg.nii.gz, does it look reasonable? Does it overlay correctly on the T1.mgz? doug On 09/14/2014 11:40 PM, Salil Soman wrote: Thank you Doug. I am having trouble with extracting statistics using this method. I am able to use bbregister to get a transformation that registers the PD image of the ASL to the T1. I then used this transformation matrix to register the CBF map for the ASL study into the T1.mgz space. Checking the images, the registration looked reasonable. However, when I try to extract the values from the registered image using the vois from aparc+aseg.mgz, and the FreeSurferColorLUT I get all 0 values. *The command I ran is:* mri_segstats --seg $SUBJECTS_DIR/SUBJECT_ID/mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i SUBJECT_ID_CBF_reg.nii.gz --sum SUBJECT_ID_ASL.stats --seg-erode 1 *where SUBJECT_ID_CBF_reg.nii.gz was generated by running:* mri_vol2vol --mov SUBJECT_ID_CBF.nii.gz --targ T1.mgz --interp nearest --o SUBJECT_ID_CBF_reg.nii.gz --reg SUBJECT_ID.dat --no-save-reg (and this was run with T1.mgz and SUBJECT_ID_CBF.nii.gz in the same folder). *for which SUBJECT_ID.dat was generated by running the code:* bbregister --s SUBJECT_ID --mov SUBJECT_ID_ASL_PD.nii.gz --reg SUBJECT_ID.dat --t1 --init-fsl Thank you for your consideration of this question. Best wishes, Salil Soman, MD, MS On Sun, Sep 14, 2014 at 3:32 PM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>>> wrote: yep, you can use it for anything. doug On 9/14/14 12:52 PM, Salil Soman wrote: Dear Doug, Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options? Best wishes, Salil Soman, MD, MS On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@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 <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@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. -- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System -- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System -- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 <tel:617-724-2358> Fax: 617-726-7422 <tel:617-726-7422> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
Dear Doug,
Thank you for your email. You were correct, there are values in the output file from running mri_segstats.
I was hoping for your advice on the following:
1) as I used FreeSurferColorLUT.txt and the aparc+aseg.mgz files, are the values extracted from the transformed cbf images the mean value per anatomic region in the same units as the original CBF image? (I am under the impression yes, and so instead of interpreting the sample data listed below as mm3 I would interpret the values as ml / 100 g / min )
2) While most of the CBF to T1 registrations using the transformation for the PD to the T1 image worked reasonably, there are a few where the registration is a little off (almost exclusively requiring some translation in the SI direction) - what is the best way to correct the registration and generate a better fitting transformation matrix? (either manually or using some other tool)
3) Do I not need to use seg-erode to minimize partial voluming?
4) Is there a way I can use asegstats2table and / or aparcstats2table on the output file I generate from mri_segstats to create a table with values for multiple subjects? (A sample of my current output file from mri_segstats is below).
Thank you for all your help.
Best wishes,
Sal
# Title Segmentation Statistics # # generating_program mri_segstats # cvs_version $Id: mri_segstats.c,v 1.75.2.9 2013/02/16 00:09:33 greve Exp $ # cmdline mri_segstats --seg aparc+aseg.mgz --ctab /farmshare/software/free/freesurfer/5.3.0/FreeSurferColorLUT.txt --i JK_CBF_Reg.nii.gz --sum JK_ASL.stats --seg-erode 1 # sysname Linux # hostname f.stanford.edu # machine x86_64 # user soman # anatomy_type volume # # SegVolFile aparc+aseg.mgz # SegVolFileTimeStamp 2014/09/21 21:26:30 # ColorTable /farmshare/software/free/freesurfer/5.3.0/FreeSurferColorLUT.txt # ColorTableTimeStamp 2013/05/13 14:21:15 # InVolFile 1534_1_PRE_1200_CBF_Reg.nii.gz # InVolFileTimeStamp 2014/09/21 21:26:30 # InVolFrame 0 # Only reporting non-empty segmentations # VoxelVolume_mm3 1 # TableCol 1 ColHeader Index # TableCol 1 FieldName Index # TableCol 1 Units NA # TableCol 2 ColHeader SegId # TableCol 2 FieldName Segmentation Id # TableCol 2 Units NA # TableCol 3 ColHeader NVoxels # TableCol 3 FieldName Number of Voxels # TableCol 3 Units unitless # TableCol 4 ColHeader Volume_mm3 # TableCol 4 FieldName Volume # TableCol 4 Units mm^3 # TableCol 5 ColHeader StructName # TableCol 5 FieldName Structure Name # TableCol 5 Units NA # TableCol 6 ColHeader Mean # TableCol 6 FieldName Intensity Mean # TableCol 6 Units unknown # TableCol 7 ColHeader StdDev # TableCol 7 FieldName Itensity StdDev # TableCol 7 Units unknown # TableCol 8 ColHeader Min # TableCol 8 FieldName Intensity Min # TableCol 8 Units unknown # TableCol 9 ColHeader Max # TableCol 9 FieldName Intensity Max # TableCol 9 Units unknown # TableCol 10 ColHeader Range # TableCol 10 FieldName Intensity Range # TableCol 10 Units unknown # NRows 112 # NTableCols 10 # ColHeaders Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max Range 1 0 16192691 16192691.0 Unknown 5.2913 14.7318 0.0000 229.0000 229.0000 2 2 139929 139929.0 Left-Cerebral-White-Matter 39.5857 10.3158 0.0000 87.0000 87.0000 3 4 14471 14471.0 Left-Lateral-Ventricle 27.8682 9.4901 5.0000 60.0000 55.0000 4 5 66 66.0 Left-Inf-Lat-Vent 31.1515 6.3154 21.0000 48.0000 27.0000 5 7 9041 9041.0 Left-Cerebellum-White-Matter 44.4476 9.4356 17.0000 69.0000 52.0000 6 8 31979 31979.0 Left-Cerebellum-Cortex 44.5335 8.8930 14.0000 88.0000 74.0000 7 10 5372 5372.0 Left-Thalamus-Proper 35.8096 17.4881 11.0000 95.0000 84.0000 8 11 1889 1889.0 Left-Caudate 22.4314 7.9514 8.0000 58.0000 50.0000 9 12 3145 3145.0 Left-Putamen 27.5463 6.7851 10.0000 57.0000 47.0000 10 13 954 954.0 Left-Pallidum 25.0922 5.8356 14.0000 50.0000 36.0000 11 14 1102 1102.0 3rd-Ventricle 35.0554 12.4595 8.0000 60.0000 52.0000 12 15 1698 1698.0 4th-Ventricle 38.9694 8.9711 18.0000 59.0000 41.0000 13 16 17721 17721.0 Brain-Stem 37.2733 8.1110 12.0000 62.0000 50.0000 14 17 2187 2187.0 Left-Hippocampus 36.8834 10.7569 13.0000 86.0000 73.0000 15 18 636 636.0 Left-Amygdala 29.3239 5.4794 17.0000 42.0000 25.0000 16 24 387 387.0 CSF 24.8398 9.1261 7.0000 49.0000 42.0000 17 26 202 202.0 Left-Accumbens-area 44.8267 11.7573 15.0000 67.0000 52.0000 18 28 2301 2301.0 Left-VentralDC 33.1521 8.6387 8.0000 57.0000 49.0000 19 30 3 3.0 Left-vessel 27.6667 4.0415 24.0000 32.0000 8.0000 20 31 408 408.0 Left-choroid-plexus 26.4951 6.9254 14.0000 45.0000 31.0000 21 41 144265 144265.0 Right-Cerebral-White-Matter 38.9664 10.8617 0.0000 87.0000 87.0000 22 43 14126 14126.0 Right-Lateral-Ventricle 29.9931 9.8450 9.0000 60.0000 51.0000 23 44 128 128.0 Right-Inf-Lat-Vent 28.5391 5.1770 18.0000 41.0000 23.0000 24 46 9402 9402.0 Right-Cerebellum-White-Matter 40.2174 7.6558 19.0000 63.0000 44.0000 25 47 31954 31954.0 Right-Cerebellum-Cortex 44.5438 9.7131 17.0000 78.0000 61.0000 26 49 4703 4703.0 Right-Thalamus-Proper 36.6517 15.8310 11.0000 86.0000 75.0000 27 50 1621 1621.0 Right-Caudate 21.8803 6.6455 10.0000 58.0000 48.0000 28 51 2955 2955.0 Right-Putamen 30.2964 7.2943 12.0000 60.0000 48.0000 29 52 793 793.0 Right-Pallidum 28.2472 6.3972 12.0000 45.0000 33.0000 30 53 2466 2466.0 Right-Hippocampus 37.5037 11.7375 13.0000 87.0000 74.0000 31 54 719 719.0 Right-Amygdala 33.6120 6.4086 17.0000 53.0000 36.0000 32 58 246 246.0 Right-Accumbens-area 36.3293 12.9949 9.0000 61.0000 52.0000 33 60 2141 2141.0 Right-VentralDC 35.2429 8.7845 11.0000 58.0000 47.0000 34 62 7 7.0 Right-vessel 30.1429 2.7343 27.0000 34.0000 7.0000 35 63 689 689.0 Right-choroid-plexus 25.5268 5.6117 12.0000 46.0000 34.0000 36 77 168 168.0 WM-hypointensities 31.5714 5.8141 16.0000 43.0000 27.0000 37 85 12 12.0 Optic-Chiasm 48.7500 8.2476 42.0000 65.0000 23.0000 38 251 402 402.0 CC_Posterior 43.4677 8.6258 29.0000 65.0000 36.0000 39 252 93 93.0 CC_Mid_Posterior 45.2903 6.5816 31.0000 57.0000 26.0000 40 253 125 125.0 CC_Central 45.2080 8.9093 31.0000 57.0000 26.0000 41 254 162 162.0 CC_Mid_Anterior 43.3519 6.0232 27.0000 49.0000 22.0000 42 255 339 339.0 CC_Anterior 42.9734 10.9373 21.0000 61.0000 40.0000 43 1000 41 41.0 ctx-lh-unknown 37.9268 6.1983 23.0000 49.0000 26.0000 44 1001 524 524.0 ctx-lh-bankssts 43.5973 7.2795 26.0000 72.0000 46.0000 45 1002 468 468.0 ctx-lh-caudalanteriorcingulate 46.5150 9.3055 29.0000 75.0000 46.0000 46 1003 1455 1455.0 ctx-lh-caudalmiddlefrontal 43.3966 10.4078 9.0000 71.0000 62.0000 47 1005 535 535.0 ctx-lh-cuneus 42.1850 11.6290 15.0000 73.0000 58.0000 48 1006 773 773.0 ctx-lh-entorhinal 35.2574 5.9514 18.0000 48.0000 30.0000 49 1007 3584 3584.0 ctx-lh-fusiform 39.9163 9.9257 7.0000 95.0000 88.0000 50 1008 3063 3063.0 ctx-lh-inferiorparietal 42.1329 10.4487 19.0000 79.0000 60.0000 51 1009 3197 3197.0 ctx-lh-inferiortemporal 46.8877 8.9039 25.0000 74.0000 49.0000 52 1010 710 710.0 ctx-lh-isthmuscingulate 50.0577 12.7209 16.0000 78.0000 62.0000 53 1011 2680 2680.0 ctx-lh-lateraloccipital 46.9022 10.6538 13.0000 84.0000 71.0000 54 1012 2014 2014.0 ctx-lh-lateralorbitofrontal 38.0447 10.3773 13.0000 76.0000 63.0000 55 1013 1915 1915.0 ctx-lh-lingual 44.2522 8.7790 20.0000 73.0000 53.0000 56 1014 1136 1136.0 ctx-lh-medialorbitofrontal 42.8310 8.3573 11.0000 69.0000 58.0000 57 1015 4187 4187.0 ctx-lh-middletemporal 40.0339 9.4288 0.0000 86.0000 86.0000 58 1016 782 782.0 ctx-lh-parahippocampal 40.9923 7.7781 24.0000 73.0000 49.0000 59 1017 816 816.0 ctx-lh-paracentral 44.5846 10.0558 24.0000 69.0000 45.0000 60 1018 1178 1178.0 ctx-lh-parsopercularis 44.0688 9.2176 19.0000 70.0000 51.0000 61 1019 469 469.0 ctx-lh-parsorbitalis 48.9296 10.4027 11.0000 75.0000 64.0000 62 1020 983 983.0 ctx-lh-parstriangularis 41.9664 9.7837 0.0000 74.0000 74.0000 63 1021 250 250.0 ctx-lh-pericalcarine 42.3400 8.8072 20.0000 69.0000 49.0000 64 1022 2438 2438.0 ctx-lh-postcentral 45.2994 12.9843 0.0000 78.0000 78.0000 65 1023 595 595.0 ctx-lh-posteriorcingulate 46.9244 5.9274 25.0000 61.0000 36.0000 66 1024 4243 4243.0 ctx-lh-precentral 44.1237 13.6463 0.0000 104.0000 104.0000 67 1025 1831 1831.0 ctx-lh-precuneus 46.9700 10.3497 21.0000 75.0000 54.0000 68 1026 603 603.0 ctx-lh-rostralanteriorcingulate 48.3333 8.1835 14.0000 61.0000 47.0000 69 1027 3801 3801.0 ctx-lh-rostralmiddlefrontal 37.6959 12.5454 0.0000 81.0000 81.0000 70 1028 7274 7274.0 ctx-lh-superiorfrontal 35.8754 20.2344 0.0000 99.0000 99.0000 71 1029 2502 2502.0 ctx-lh-superiorparietal 38.4592 11.2217 13.0000 71.0000 58.0000 72 1030 4193 4193.0 ctx-lh-superiortemporal 37.8710 9.7801 12.0000 70.0000 58.0000 73 1031 2981 2981.0 ctx-lh-supramarginal 41.4270 9.2431 12.0000 68.0000 56.0000 74 1032 184 184.0 ctx-lh-frontalpole 28.1087 8.1776 15.0000 49.0000 34.0000 75 1033 806 806.0 ctx-lh-temporalpole 37.2395 8.7618 21.0000 70.0000 49.0000 76 1034 200 200.0 ctx-lh-transversetemporal 46.8550 6.7893 32.0000 64.0000 32.0000 77 1035 2509 2509.0 ctx-lh-insula 40.5050 8.8055 20.0000 60.0000 40.0000 78 2000 27 27.0 ctx-rh-unknown 37.8148 6.6912 24.0000 45.0000 21.0000 79 2001 808 808.0 ctx-rh-bankssts 44.1015 7.3096 15.0000 63.0000 48.0000 80 2002 676 676.0 ctx-rh-caudalanteriorcingulate 42.1213 8.2041 18.0000 61.0000 43.0000 81 2003 1477 1477.0 ctx-rh-caudalmiddlefrontal 40.6391 22.0031 0.0000 87.0000 87.0000 82 2005 608 608.0 ctx-rh-cuneus 42.1447 11.9201 16.0000 65.0000 49.0000 83 2006 548 548.0 ctx-rh-entorhinal 40.8303 6.2827 26.0000 56.0000 30.0000 84 2007 4445 4445.0 ctx-rh-fusiform 41.6220 11.9162 9.0000 75.0000 66.0000 85 2008 3984 3984.0 ctx-rh-inferiorparietal 41.0595 12.4253 10.0000 85.0000 75.0000 86 2009 2909 2909.0 ctx-rh-inferiortemporal 45.6710 9.9779 18.0000 77.0000 59.0000 87 2010 568 568.0 ctx-rh-isthmuscingulate 47.7500 12.4814 10.0000 67.0000 57.0000 88 2011 3119 3119.0 ctx-rh-lateraloccipital 51.3071 9.7769 21.0000 80.0000 59.0000 89 2012 1865 1865.0 ctx-rh-lateralorbitofrontal 32.3861 8.7282 11.0000 60.0000 49.0000 90 2013 2193 2193.0 ctx-rh-lingual 43.8171 8.2956 22.0000 73.0000 51.0000 91 2014 1536 1536.0 ctx-rh-medialorbitofrontal 45.0983 10.2363 13.0000 82.0000 69.0000 92 2015 4616 4616.0 ctx-rh-middletemporal 43.2000 11.1110 17.0000 75.0000 58.0000 93 2016 989 989.0 ctx-rh-parahippocampal 39.0172 7.3277 16.0000 63.0000 47.0000 94 2017 834 834.0 ctx-rh-paracentral 44.9532 15.9802 0.0000 86.0000 86.0000 95 2018 1059 1059.0 ctx-rh-parsopercularis 41.9122 10.1778 16.0000 74.0000 58.0000 96 2019 761 761.0 ctx-rh-parsorbitalis 44.6636 11.4619 13.0000 71.0000 58.0000 97 2020 770 770.0 ctx-rh-parstriangularis 35.3675 9.9894 14.0000 63.0000 49.0000 98 2021 311 311.0 ctx-rh-pericalcarine 50.3055 6.9137 30.0000 70.0000 40.0000 99 2022 2362 2362.0 ctx-rh-postcentral 39.3971 15.8836 0.0000 76.0000 76.0000 100 2023 800 800.0 ctx-rh-posteriorcingulate 42.1250 8.6638 23.0000 70.0000 47.0000 101 2024 4120 4120.0 ctx-rh-precentral 38.4903 19.2733 0.0000 89.0000 89.0000 102 2025 2278 2278.0 ctx-rh-precuneus 51.4719 10.8414 0.0000 74.0000 74.0000 103 2026 847 847.0 ctx-rh-rostralanteriorcingulate 44.3093 8.4714 17.0000 67.0000 50.0000 104 2027 3884 3884.0 ctx-rh-rostralmiddlefrontal 37.5881 14.9279 0.0000 77.0000 77.0000 105 2028 6878 6878.0 ctx-rh-superiorfrontal 32.7812 20.7192 0.0000 92.0000 92.0000 106 2029 2313 2313.0 ctx-rh-superiorparietal 38.3312 13.7339 0.0000 76.0000 76.0000 107 2030 4177 4177.0 ctx-rh-superiortemporal 39.0893 10.6739 9.0000 72.0000 63.0000 108 2031 2662 2662.0 ctx-rh-supramarginal 39.5586 9.4404 16.0000 70.0000 54.0000 109 2032 300 300.0 ctx-rh-frontalpole 43.1600 12.4866 8.0000 71.0000 63.0000 110 2033 1068 1068.0 ctx-rh-temporalpole 32.2996 8.3381 14.0000 56.0000 42.0000 111 2034 295 295.0 ctx-rh-transversetemporal 48.2644 8.0202 33.0000 64.0000 31.0000 112 2035 2511 2511.0 ctx-rh-insula 38.9263 6.8398 18.0000 55.0000 37.0000
On Thu, Sep 18, 2014 at 2:05 PM, Douglas N Greve greve@nmr.mgh.harvard.edu wrote:
Are you sure that *all* are 0? By passing it FreeSurferColorLUT.txt, you force it to report hundreds (or thousands) of ROIs which are not represented in the aparc+aseg.mgz. Also, try removing --seg-erode.
On 09/18/2014 04:43 PM, Salil Soman wrote:
Dear Doug,
Thank you for your email.
The registration overlap looks reasonable. Thank you for considering this question.
Best wishes,
Sal
On Thu, Sep 18, 2014 at 12:14 PM, Douglas N Greve < greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
When you look at SUBJECT_ID_CBF_reg.nii.gz, does it look reasonable? Does it overlay correctly on the T1.mgz? doug On 09/14/2014 11:40 PM, Salil Soman wrote: Thank you Doug. I am having trouble with extracting statistics using this method. I am able to use bbregister to get a transformation that registers the PD image of the ASL to the T1. I then used this transformation matrix to register the CBF map for the ASL study into the T1.mgz space. Checking the images, the registration looked reasonable. However, when I try to extract the values from the registered image using the vois from aparc+aseg.mgz, and the FreeSurferColorLUT I get all 0 values. *The command I ran is:* mri_segstats --seg $SUBJECTS_DIR/SUBJECT_ID/mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i SUBJECT_ID_CBF_reg.nii.gz --sum SUBJECT_ID_ASL.stats --seg-erode 1 *where SUBJECT_ID_CBF_reg.nii.gz was generated by running:* mri_vol2vol --mov SUBJECT_ID_CBF.nii.gz --targ T1.mgz --interp nearest --o SUBJECT_ID_CBF_reg.nii.gz --reg SUBJECT_ID.dat --no-save-reg (and this was run with T1.mgz and SUBJECT_ID_CBF.nii.gz in the same folder). *for which SUBJECT_ID.dat was generated by running the code:* bbregister --s SUBJECT_ID --mov SUBJECT_ID_ASL_PD.nii.gz --reg SUBJECT_ID.dat --t1 --init-fsl Thank you for your consideration of this question. Best wishes, Salil Soman, MD, MS On Sun, Sep 14, 2014 at 3:32 PM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>>> wrote: yep, you can use it for anything. doug On 9/14/14 12:52 PM, Salil Soman wrote: Dear Doug, Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options? Best wishes, Salil Soman, MD, MS On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@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 <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@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. -- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System -- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System -- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 <tel:617-724-2358> Fax: 617-726-7422 <tel:617-726-7422> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
On 09/23/2014 04:05 AM, Salil Soman wrote:
Dear Doug,
Thank you for your email. You were correct, there are values in the output file from running mri_segstats.
I was hoping for your advice on the following:
- as I used FreeSurferColorLUT.txt and the aparc+aseg.mgz files, are
the values extracted from the transformed cbf images the mean value per anatomic region in the same units as the original CBF image? (I am under the impression yes, and so instead of interpreting the sample data listed below as mm3 I would interpret the values as ml / 100 g / min )
Yes, same units as the input.
- While most of the CBF to T1 registrations using the transformation
for the PD to the T1 image worked reasonably, there are a few where the registration is a little off (almost exclusively requiring some translation in the SI direction) - what is the best way to correct the registration and generate a better fitting transformation matrix? (either manually or using some other tool)
What did you use to do the registration?
- Do I not need to use seg-erode to minimize partial voluming?
You may, but then you may lose an entire ROI, esp in cortex. I'll have some PVC software for the next release.
- Is there a way I can use asegstats2table and / or aparcstats2table
on the output file I generate from mri_segstats to create a table with values for multiple subjects? (A sample of my current output file from mri_segstats is below).
Yes, just specify --inputs /path/to/first/datfile /path/to/second/datfile with asegstats2table
Thank you for all your help.
Best wishes,
Sal
# Title Segmentation Statistics # # generating_program mri_segstats # cvs_version $Id: mri_segstats.c,v 1.75.2.9 2013/02/16 00:09:33 greve Exp $ # cmdline mri_segstats --seg aparc+aseg.mgz --ctab /farmshare/software/free/freesurfer/5.3.0/FreeSurferColorLUT.txt --i JK_CBF_Reg.nii.gz --sum JK_ASL.stats --seg-erode 1 # sysname Linux # hostname f.stanford.edu http://f.stanford.edu # machine x86_64 # user soman # anatomy_type volume # # SegVolFile aparc+aseg.mgz # SegVolFileTimeStamp 2014/09/21 21:26:30 # ColorTable /farmshare/software/free/freesurfer/5.3.0/FreeSurferColorLUT.txt # ColorTableTimeStamp 2013/05/13 14:21:15 # InVolFile 1534_1_PRE_1200_CBF_Reg.nii.gz # InVolFileTimeStamp 2014/09/21 21:26:30 # InVolFrame 0 # Only reporting non-empty segmentations # VoxelVolume_mm3 1 # TableCol 1 ColHeader Index # TableCol 1 FieldName Index # TableCol 1 Units NA # TableCol 2 ColHeader SegId # TableCol 2 FieldName Segmentation Id # TableCol 2 Units NA # TableCol 3 ColHeader NVoxels # TableCol 3 FieldName Number of Voxels # TableCol 3 Units unitless # TableCol 4 ColHeader Volume_mm3 # TableCol 4 FieldName Volume # TableCol 4 Units mm^3 # TableCol 5 ColHeader StructName # TableCol 5 FieldName Structure Name # TableCol 5 Units NA # TableCol 6 ColHeader Mean # TableCol 6 FieldName Intensity Mean # TableCol 6 Units unknown # TableCol 7 ColHeader StdDev # TableCol 7 FieldName Itensity StdDev # TableCol 7 Units unknown # TableCol 8 ColHeader Min # TableCol 8 FieldName Intensity Min # TableCol 8 Units unknown # TableCol 9 ColHeader Max # TableCol 9 FieldName Intensity Max # TableCol 9 Units unknown # TableCol 10 ColHeader Range # TableCol 10 FieldName Intensity Range # TableCol 10 Units unknown # NRows 112 # NTableCols 10 # ColHeaders Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max Range 1 0 16192691 16192691.0 Unknown 5.2913 14.7318 0.0000 229.0000 229.0000 2 2 139929 139929.0 Left-Cerebral-White-Matter 39.5857 10.3158 0.0000 87.0000 87.0000 3 4 14471 14471.0 Left-Lateral-Ventricle 27.8682 9.4901 5.0000 60.0000 55.0000 4 5 66 66.0 Left-Inf-Lat-Vent 31.1515 6.3154 21.0000 48.0000 27.0000 5 7 9041 9041.0 Left-Cerebellum-White-Matter 44.4476 9.4356 17.0000 69.0000 52.0000 6 8 31979 31979.0 Left-Cerebellum-Cortex 44.5335 8.8930 14.0000 88.0000 74.0000 7 10 5372 5372.0 Left-Thalamus-Proper 35.8096 17.4881 11.0000 95.0000 84.0000 8 11 1889 1889.0 Left-Caudate 22.4314 7.9514 8.0000 58.0000 50.0000 9 12 3145 3145.0 Left-Putamen 27.5463 6.7851 10.0000 57.0000 47.0000 10 13 954 954.0 Left-Pallidum 25.0922 5.8356 14.0000 50.0000 36.0000 11 14 1102 1102.0 3rd-Ventricle 35.0554 12.4595 8.0000 60.0000 52.0000 12 15 1698 1698.0 4th-Ventricle 38.9694 8.9711 18.0000 59.0000 41.0000 13 16 17721 17721.0 Brain-Stem 37.2733 8.1110 12.0000 62.0000 50.0000 14 17 2187 2187.0 Left-Hippocampus 36.8834 10.7569 13.0000 86.0000 73.0000 15 18 636 636.0 Left-Amygdala 29.3239 5.4794 17.0000 42.0000 25.0000 16 24 387 387.0 CSF 24.8398 9.1261 7.0000 49.0000 42.0000 17 26 202 202.0 Left-Accumbens-area 44.8267 11.7573 15.0000 67.0000 52.0000 18 28 2301 2301.0 Left-VentralDC 33.1521 8.6387 8.0000 57.0000 49.0000 19 30 3 3.0 Left-vessel 27.6667 4.0415 24.0000 32.0000 8.0000 20 31 408 408.0 Left-choroid-plexus 26.4951 6.9254 14.0000 45.0000 31.0000 21 41 144265 144265.0 Right-Cerebral-White-Matter 38.9664 10.8617 0.0000 87.0000 87.0000 22 43 14126 14126.0 Right-Lateral-Ventricle 29.9931 9.8450 9.0000 60.0000 51.0000 23 44 128 128.0 Right-Inf-Lat-Vent 28.5391 5.1770 18.0000 41.0000 23.0000 24 46 9402 9402.0 Right-Cerebellum-White-Matter 40.2174 7.6558 19.0000 63.0000 44.0000 25 47 31954 31954.0 Right-Cerebellum-Cortex 44.5438 9.7131 17.0000 78.0000 61.0000 26 49 4703 4703.0 Right-Thalamus-Proper 36.6517 15.8310 11.0000 86.0000 75.0000 27 50 1621 1621.0 Right-Caudate 21.8803 6.6455 10.0000 58.0000 48.0000 28 51 2955 2955.0 Right-Putamen 30.2964 7.2943 12.0000 60.0000 48.0000 29 52 793 793.0 Right-Pallidum 28.2472 6.3972 12.0000 45.0000 33.0000 30 53 2466 2466.0 Right-Hippocampus 37.5037 11.7375 13.0000 87.0000 74.0000 31 54 719 719.0 Right-Amygdala 33.6120 6.4086 17.0000 53.0000 36.0000 32 58 246 246.0 Right-Accumbens-area 36.3293 12.9949 9.0000 61.0000 52.0000 33 60 2141 2141.0 Right-VentralDC 35.2429 8.7845 11.0000 58.0000 47.0000 34 62 7 7.0 Right-vessel 30.1429 2.7343 27.0000 34.0000 7.0000 35 63 689 689.0 Right-choroid-plexus 25.5268 5.6117 12.0000 46.0000 34.0000 36 77 168 168.0 WM-hypointensities 31.5714 5.8141 16.0000 43.0000 27.0000 37 85 12 12.0 Optic-Chiasm 48.7500 8.2476 42.0000 65.0000 23.0000 38 251 402 402.0 CC_Posterior 43.4677 8.6258 29.0000 65.0000 36.0000 39 252 93 93.0 CC_Mid_Posterior 45.2903 6.5816 31.0000 57.0000 26.0000 40 253 125 125.0 CC_Central 45.2080 8.9093 31.0000 57.0000 26.0000 41 254 162 162.0 CC_Mid_Anterior 43.3519 6.0232 27.0000 49.0000 22.0000 42 255 339 339.0 CC_Anterior 42.9734 10.9373 21.0000 61.0000 40.0000 43 1000 41 41.0 ctx-lh-unknown 37.9268 6.1983 23.0000 49.0000 26.0000 44 1001 524 524.0 ctx-lh-bankssts 43.5973 7.2795 26.0000 72.0000 46.0000 45 1002 468 468.0 ctx-lh-caudalanteriorcingulate 46.5150 9.3055 29.0000 75.0000 46.0000 46 1003 1455 1455.0 ctx-lh-caudalmiddlefrontal 43.3966 10.4078 9.0000 71.0000 62.0000 47 1005 535 535.0 ctx-lh-cuneus 42.1850 11.6290 15.0000 73.0000 58.0000 48 1006 773 773.0 ctx-lh-entorhinal 35.2574 5.9514 18.0000 48.0000 30.0000 49 1007 3584 3584.0 ctx-lh-fusiform 39.9163 9.9257 7.0000 95.0000 88.0000 50 1008 3063 3063.0 ctx-lh-inferiorparietal 42.1329 10.4487 19.0000 79.0000 60.0000 51 1009 3197 3197.0 ctx-lh-inferiortemporal 46.8877 8.9039 25.0000 74.0000 49.0000 52 1010 710 710.0 ctx-lh-isthmuscingulate 50.0577 12.7209 16.0000 78.0000 62.0000 53 1011 2680 2680.0 ctx-lh-lateraloccipital 46.9022 10.6538 13.0000 84.0000 71.0000 54 1012 2014 2014.0 ctx-lh-lateralorbitofrontal 38.0447 10.3773 13.0000 76.0000 63.0000 55 1013 1915 1915.0 ctx-lh-lingual 44.2522 8.7790 20.0000 73.0000 53.0000 56 1014 1136 1136.0 ctx-lh-medialorbitofrontal 42.8310 8.3573 11.0000 69.0000 58.0000 57 1015 4187 4187.0 ctx-lh-middletemporal 40.0339 9.4288 0.0000 86.0000 86.0000 58 1016 782 782.0 ctx-lh-parahippocampal 40.9923 7.7781 24.0000 73.0000 49.0000 59 1017 816 816.0 ctx-lh-paracentral 44.5846 10.0558 24.0000 69.0000 45.0000 60 1018 1178 1178.0 ctx-lh-parsopercularis 44.0688 9.2176 19.0000 70.0000 51.0000 61 1019 469 469.0 ctx-lh-parsorbitalis 48.9296 10.4027 11.0000 75.0000 64.0000 62 1020 983 983.0 ctx-lh-parstriangularis 41.9664 9.7837 0.0000 74.0000 74.0000 63 1021 250 250.0 ctx-lh-pericalcarine 42.3400 8.8072 20.0000 69.0000 49.0000 64 1022 2438 2438.0 ctx-lh-postcentral 45.2994 12.9843 0.0000 78.0000 78.0000 65 1023 595 595.0 ctx-lh-posteriorcingulate 46.9244 5.9274 25.0000 61.0000 36.0000 66 1024 4243 4243.0 ctx-lh-precentral 44.1237 13.6463 0.0000 104.0000 104.0000 67 1025 1831 1831.0 ctx-lh-precuneus 46.9700 10.3497 21.0000 75.0000 54.0000 68 1026 603 603.0 ctx-lh-rostralanteriorcingulate 48.3333 8.1835 14.0000 61.0000 47.0000 69 1027 3801 3801.0 ctx-lh-rostralmiddlefrontal 37.6959 12.5454 0.0000 81.0000 81.0000 70 1028 7274 7274.0 ctx-lh-superiorfrontal 35.8754 20.2344 0.0000 99.0000 99.0000 71 1029 2502 2502.0 ctx-lh-superiorparietal 38.4592 11.2217 13.0000 71.0000 58.0000 72 1030 4193 4193.0 ctx-lh-superiortemporal 37.8710 9.7801 12.0000 70.0000 58.0000 73 1031 2981 2981.0 ctx-lh-supramarginal 41.4270 9.2431 12.0000 68.0000 56.0000 74 1032 184 184.0 ctx-lh-frontalpole 28.1087 8.1776 15.0000 49.0000 34.0000 75 1033 806 806.0 ctx-lh-temporalpole 37.2395 8.7618 21.0000 70.0000 49.0000 76 1034 200 200.0 ctx-lh-transversetemporal 46.8550 6.7893 32.0000 64.0000 32.0000 77 1035 2509 2509.0 ctx-lh-insula 40.5050 8.8055 20.0000 60.0000 40.0000 78 2000 27 27.0 ctx-rh-unknown 37.8148 6.6912 24.0000 45.0000 21.0000 79 2001 808 808.0 ctx-rh-bankssts 44.1015 7.3096 15.0000 63.0000 48.0000 80 2002 676 676.0 ctx-rh-caudalanteriorcingulate 42.1213 8.2041 18.0000 61.0000 43.0000 81 2003 1477 1477.0 ctx-rh-caudalmiddlefrontal 40.6391 22.0031 0.0000 87.0000 87.0000 82 2005 608 608.0 ctx-rh-cuneus 42.1447 11.9201 16.0000 65.0000 49.0000 83 2006 548 548.0 ctx-rh-entorhinal 40.8303 6.2827 26.0000 56.0000 30.0000 84 2007 4445 4445.0 ctx-rh-fusiform 41.6220 11.9162 9.0000 75.0000 66.0000 85 2008 3984 3984.0 ctx-rh-inferiorparietal 41.0595 12.4253 10.0000 85.0000 75.0000 86 2009 2909 2909.0 ctx-rh-inferiortemporal 45.6710 9.9779 18.0000 77.0000 59.0000 87 2010 568 568.0 ctx-rh-isthmuscingulate 47.7500 12.4814 10.0000 67.0000 57.0000 88 2011 3119 3119.0 ctx-rh-lateraloccipital 51.3071 9.7769 21.0000 80.0000 59.0000 89 2012 1865 1865.0 ctx-rh-lateralorbitofrontal 32.3861 8.7282 11.0000 60.0000 49.0000 90 2013 2193 2193.0 ctx-rh-lingual 43.8171 8.2956 22.0000 73.0000 51.0000 91 2014 1536 1536.0 ctx-rh-medialorbitofrontal 45.0983 10.2363 13.0000 82.0000 69.0000 92 2015 4616 4616.0 ctx-rh-middletemporal 43.2000 11.1110 17.0000 75.0000 58.0000 93 2016 989 989.0 ctx-rh-parahippocampal 39.0172 7.3277 16.0000 63.0000 47.0000 94 2017 834 834.0 ctx-rh-paracentral 44.9532 15.9802 0.0000 86.0000 86.0000 95 2018 1059 1059.0 ctx-rh-parsopercularis 41.9122 10.1778 16.0000 74.0000 58.0000 96 2019 761 761.0 ctx-rh-parsorbitalis 44.6636 11.4619 13.0000 71.0000 58.0000 97 2020 770 770.0 ctx-rh-parstriangularis 35.3675 9.9894 14.0000 63.0000 49.0000 98 2021 311 311.0 ctx-rh-pericalcarine 50.3055 6.9137 30.0000 70.0000 40.0000 99 2022 2362 2362.0 ctx-rh-postcentral 39.3971 15.8836 0.0000 76.0000 76.0000 100 2023 800 800.0 ctx-rh-posteriorcingulate 42.1250 8.6638 23.0000 70.0000 47.0000 101 2024 4120 4120.0 ctx-rh-precentral 38.4903 19.2733 0.0000 89.0000 89.0000 102 2025 2278 2278.0 ctx-rh-precuneus 51.4719 10.8414 0.0000 74.0000 74.0000 103 2026 847 847.0 ctx-rh-rostralanteriorcingulate 44.3093 8.4714 17.0000 67.0000 50.0000 104 2027 3884 3884.0 ctx-rh-rostralmiddlefrontal 37.5881 14.9279 0.0000 77.0000 77.0000 105 2028 6878 6878.0 ctx-rh-superiorfrontal 32.7812 20.7192 0.0000 92.0000 92.0000 106 2029 2313 2313.0 ctx-rh-superiorparietal 38.3312 13.7339 0.0000 76.0000 76.0000 107 2030 4177 4177.0 ctx-rh-superiortemporal 39.0893 10.6739 9.0000 72.0000 63.0000 108 2031 2662 2662.0 ctx-rh-supramarginal 39.5586 9.4404 16.0000 70.0000 54.0000 109 2032 300 300.0 ctx-rh-frontalpole 43.1600 12.4866 8.0000 71.0000 63.0000 110 2033 1068 1068.0 ctx-rh-temporalpole 32.2996 8.3381 14.0000 56.0000 42.0000 111 2034 295 295.0 ctx-rh-transversetemporal 48.2644 8.0202 33.0000 64.0000 31.0000 112 2035 2511 2511.0 ctx-rh-insula 38.9263 6.8398 18.0000 55.0000 37.0000
On Thu, Sep 18, 2014 at 2:05 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
Are you sure that *all* are 0? By passing it FreeSurferColorLUT.txt, you force it to report hundreds (or thousands) of ROIs which are not represented in the aparc+aseg.mgz. Also, try removing --seg-erode. On 09/18/2014 04:43 PM, Salil Soman wrote: Dear Doug, Thank you for your email. The registration overlap looks reasonable. Thank you for considering this question. Best wishes, Sal On Thu, Sep 18, 2014 at 12:14 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>>> wrote: When you look at SUBJECT_ID_CBF_reg.nii.gz, does it look reasonable? Does it overlay correctly on the T1.mgz? doug On 09/14/2014 11:40 PM, Salil Soman wrote: Thank you Doug. I am having trouble with extracting statistics using this method. I am able to use bbregister to get a transformation that registers the PD image of the ASL to the T1. I then used this transformation matrix to register the CBF map for the ASL study into the T1.mgz space. Checking the images, the registration looked reasonable. However, when I try to extract the values from the registered image using the vois from aparc+aseg.mgz, and the FreeSurferColorLUT I get all 0 values. *The command I ran is:* mri_segstats --seg $SUBJECTS_DIR/SUBJECT_ID/mri/aparc+aseg.mgz --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i SUBJECT_ID_CBF_reg.nii.gz --sum SUBJECT_ID_ASL.stats --seg-erode 1 *where SUBJECT_ID_CBF_reg.nii.gz was generated by running:* mri_vol2vol --mov SUBJECT_ID_CBF.nii.gz --targ T1.mgz --interp nearest --o SUBJECT_ID_CBF_reg.nii.gz --reg SUBJECT_ID.dat --no-save-reg (and this was run with T1.mgz and SUBJECT_ID_CBF.nii.gz in the same folder). *for which SUBJECT_ID.dat was generated by running the code:* bbregister --s SUBJECT_ID --mov SUBJECT_ID_ASL_PD.nii.gz --reg SUBJECT_ID.dat --t1 --init-fsl Thank you for your consideration of this question. Best wishes, Salil Soman, MD, MS On Sun, Sep 14, 2014 at 3:32 PM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>>>> wrote: yep, you can use it for anything. doug On 9/14/14 12:52 PM, Salil Soman wrote: Dear Doug, Thank you again for this email. Do you think it is possible to use this method for ASL images as well? If so, how would you change the options? Best wishes, Salil Soman, MD, MS On Sat, May 25, 2013 at 11:51 AM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@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 <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@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. -- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System -- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System -- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> Phone Number: 617-724-2358 <tel:617-724-2358> <tel:617-724-2358 <tel:617-724-2358>> Fax: 617-726-7422 <tel:617-726-7422> <tel:617-726-7422 <tel:617-726-7422>> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html> <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ -- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System -- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 <tel:617-724-2358> Fax: 617-726-7422 <tel:617-726-7422> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
Dear Doug,
Thank you for your email.
On Wed, Sep 24, 2014 at 8:57 AM, Douglas N Greve greve@nmr.mgh.harvard.edu wrote:
- While most of the CBF to T1 registrations using the transformation for
the PD to the T1 image worked reasonably, there are a few where the registration is a little off (almost exclusively requiring some translation in the SI direction) - what is the best way to correct the registration and generate a better fitting transformation matrix? (either manually or using some other tool)
What did you use to do the registration?
bbregister:
bbregister --s $2_FS --mov $2_ASL_PD.nii.gz --reg $2_Reg.dat --t1 --init-fsl
- Do I not need to use seg-erode to minimize partial voluming?
You may, but then you may lose an entire ROI, esp in cortex. I'll have some PVC software for the next release.
Thanks! Will take out erode step with the ASL data.
Best wishes,
Sal
freesurfer@nmr.mgh.harvard.edu