I used afni's 3dundump to create a 10mm sphere from MNI coordinates. I then ran the MNI template through freesurfer, and used the regheader from this to run mri_vol2surf to put the spherical ROI into fsaverage space. I am able to overlay the ROI created this way onto the fsaverage in freeview, and verify that it is in the correct location.
If I run without the mask, the output sig file looks normal. If I overlay the surface ROI and the output sig file on the fsaverage, I can see that the maximum absolute pvalue in my ROI is around -2.2. Output below. Since the mask is based on a volumetric sphere, it is not contiguous after converting it to a surface ROI. Could that be causing mri_glmfit problems?
OUTPUTReading source surface /autofs/cluster/neuromod/programs/freesurfer_7.1.1/freesurfer/subjects/fsaverage/surf/lh.whitegdfRead(): reading /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txtWARNING: gdfReadV1: no variables on 'Variables' line foundINFO: gd2mtx_method is dodsNumber of vertices 163842Number of faces 327680Total area 65417.000000AvgVtxArea 0.399269AvgVtxDist 0.721953StdVtxDist 0.195472
7.1.1cwd /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfastcmdline mri_glmfit --glmdir /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/noMaskTest/ --y /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall//recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gz --surf fsaverage lh --fsgd /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txt --C /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//groupDiff.mtx --nii.gz --eres-savesysname Linuxhostname uriline.nmr.mgh.harvard.edumachine x86_64user wsp6FixVertexAreaFlag = 1UseMaskWithSmoothing 1OneSampleGroupMean 0y /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall/recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gzlogyflag 0usedti 0FSGD /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txtlabelmask /autofs/cluster/neuromod/programs/freesurfer_7.1.1/freesurfer/subjects/fsaverage/label/lh.cortex.labelmaskinv 0glmdir /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/noMaskTest/IllCondOK 0ReScaleX 1DoFFx 0Creating output directory /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/noMaskTest/Loading y from /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall/recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gz... done reading.INFO: gd2mtx_method is dodsSaving design matrix to /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/noMaskTest//Xg.datComputing normalized matrixNormalized matrix condition is 1Matrix condition is 1.125Found 149955 points in label.Pruning voxels by thr: 1.175494e-38Found 149955 voxels in maskSaving mask to /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/noMaskTest//mask.nii.gzReshaping mriglm->mask...search space = 74612.577841DOF = 15Starting fit and testFit completed in 0.0100333 minutesComputing spatial AR1 on surfaceResidual: ar1mn=0.991551, ar1std=0.005518, gstd=4.393252, fwhm=10.345318Writing resultsgroupDiffMRImask(): AllowDiffGeom = 1maxvox sig=-3.97251 F=27.102 at index 140685 0 0 seed=1634140058mri_glmfit done
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Douglas N. Greve <dgreve@mgh.harvard.edu>
Sent: Friday, October 8, 2021 9:25 AM
To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] glmfit sig file all zeroswhat happens if you run it without the mask?
On 9/29/2021 2:33 PM, Pedersen, Walker Scott wrote:
I just wanted to follow up on this - based on the output I sent previously, they seem to have the same resolution (unless I've missed something). They do have different orientations. Could this be an issue, or can gmlfit handle that? I'm also really stumped as to why I appear to be getting good F.nii.gz files, but bad sig.nii.gz files.
From: Pedersen, Walker Scott <WPEDERSEN@mgh.harvard.edu>
Sent: Thursday, September 23, 2021 1:40 PM
To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] glmfit sig file all zerosHere is what I get for the mask:______________________________________________________
Volume information for /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/rois/recall/lIFG_surf_rad10.nii.gztype: niidimensions: 163842 x 1 x 1voxel sizes: 1.000000, 1.000000, 1.000000type: FLOAT (3)fov: 163842.000dof: 1xstart: -81921.0, xend: 81921.0ystart: -0.5, yend: 0.5zstart: -0.5, zend: 0.5TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degreesnframes: 1PhEncDir: UNKNOWNFieldStrength: 0.000000ras xform presentxform info: x_r = -1.0000, y_r = -0.0000, z_r = -0.0000, c_r = -68268.5000: x_a = -0.0000, y_a = 1.0000, z_a = -0.0000, c_a = -17.0000: x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s = 16.5000Orientation : LASPrimary Slice Direction: axial
voxel to ras transform:-1.0000 -0.0000 -0.0000 13652.5000-0.0000 1.0000 -0.0000 -17.50000.0000 0.0000 1.0000 16.00000.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform:-1.0000 -0.0000 -0.0000 13652.5000-0.0000 1.0000 -0.0000 17.5000-0.0000 -0.0000 1.0000 -16.0000-0.0000 -0.0000 -0.0000 1.0000
______________________________________________________
And here is what I get for the input ces file:______________________________________________________
Volume information for /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall/recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gztype: niidimensions: 163842 x 1 x 1 x 17voxel sizes: 1.000000, 1.000000, 1.000000type: FLOAT (3)fov: 163842.000dof: 1xstart: -81921.0, xend: 81921.0ystart: -0.5, yend: 0.5zstart: -0.5, zend: 0.5TR: 2560.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degreesnframes: 17PhEncDir: UNKNOWNFieldStrength: 0.000000ras xform presentxform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r = -68267.5000: x_a = 0.0000, y_a = 0.0000, z_a = 1.0000, c_a = -2.5000: x_s = 0.0000, y_s = -1.0000, z_s = 0.0000, c_s = 0.0000Orientation : LIAPrimary Slice Direction: coronal
voxel to ras transform:-1.0000 0.0000 0.0000 13653.50000.0000 0.0000 1.0000 -3.00000.0000 -1.0000 0.0000 0.50000.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform:-1.0000 -0.0000 -0.0000 13653.5000-0.0000 -0.0000 -1.0000 0.5000-0.0000 1.0000 -0.0000 3.0000-0.0000 -0.0000 -0.0000 1.0000
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Douglas N. Greve <dgreve@mgh.harvard.edu>
Sent: Thursday, September 23, 2021 10:19 AM
To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] glmfit sig file all zerosIt looks like the mask is the wrong size. What is the dimension of
/autofs/cluster/neuromod/NIFTI/OCD_N M/derivatives/fsfast/rois/recall/lIFG_surf_rad10.nii.gz
you can check with mri_info
On 9/17/2021 8:32 PM, Pedersen, Walker Scott wrote:
Hi,
I am running glmfit on some functional data (using ces.nii.gz surface files as input) using ROIs and the --mask argument, that I plan to later submit to glmfit-sim for small volume correction. I have some rois that are subcortical and some that are surfaces. For the glmfit run within the surface ROIs the output sig.nii.gz files all voxels have a value of zero. However, this is not the case for the F.nii.gz and z.nii.gz files output by the same glmfit command - they have non-zero voxels. This issue only occurs for the surface ROIs, when I run glmfit in subcortical ROIs the sig.nii.gz files look normal.
The surface ROIs were created by using afnis 3dundump to create 10mm spheres from MNI coordinates. I then ran the MNI template through freesurfer, and used the regheader from this to run mri_vol2surf to put the spherical ROIs into fsaverage space. I am able to view the resulting surface ROIs projected onto the fsaverage surface in freeview, and have checked that my ces.nii.gz function files can also be overlayed onto the same fsaverage template in freeview.
The output of one of the glmfit commands in question is below.
thanks!
WARNING: gdfReadV1: no variables on 'Variables' line foundReading source surface /autofs/cluster/neuromod/programs/freesurfer_7.1.1/freesurfer/subjects/fsaverage/surf/lh.whitegdfRead(): reading /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txtINFO: gd2mtx_method is dodsNumber of vertices 163842Number of faces 327680Total area 65417.000000AvgVtxArea 0.399269AvgVtxDist 0.721953StdVtxDist 0.195472
7.1.1cwd /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfastcmdline mri_glmfit --glmdir /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/lIFG/ --y /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall//recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gz --surf fsaverage lh --fsgd /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txt --C /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//groupDiff.mtx --nii.gz --mask /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/rois/recall/lIFG_surf_rad10.nii.gz --eres-savesysname Linuxhostname r440-28.nmr.mgh.harvard.edumachine x86_64user wsp6FixVertexAreaFlag = 1UseMaskWithSmoothing 1OneSampleGroupMean 0y /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall/recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gzlogyflag 0usedti 0FSGD /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txtmask /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/rois/recall/lIFG_surf_rad10.nii.gzmaskinv 0glmdir /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/lIFG/IllCondOK 0ReScaleX 1DoFFx 0Creating output directory /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/lIFG/Loading y from /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall/recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gz... done reading.INFO: gd2mtx_method is dodsSaving design matrix to /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/lIFG//Xg.datComputing normalized matrixNormalized matrix condition is 1Matrix condition is 1.125Pruning voxels by thr: 1.175494e-38Found 512 voxels in maskSaving mask to /autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/lIFG//mask.nii.gzReshaping mriglm->mask...search space = 222.026773DOF = 15Starting fit and testFit completed in 0.0002 minutesComputing spatial AR1 on surfaceResidual: ar1mn=0.987586, ar1std=0.043927, gstd=3.620916, fwhm=8.526606Writing resultsgroupDiffMRImask(): AllowDiffGeom = 1INFO: MRImask() using MRImaskDifferentGeometry()maxvox sig=-0 F=4.36504 at index 391 0 0 seed=1632900996mri_glmfit done
_______________________________________________ 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
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer