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?

OUTPUT
Reading source surface 
/autofs/cluster/neuromod/programs/freesurfer_7.1.1/freesurfer/subjects/fsaverage/surf/lh.white
gdfRead(): reading 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txt
WARNING: gdfReadV1: no variables on 'Variables' line found
INFO: gd2mtx_method is dods
Number of vertices 163842
Number of faces    327680
Total area         65417.000000
AvgVtxArea       0.399269
AvgVtxDist       0.721953
StdVtxDist       0.195472

7.1.1
cwd /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast
cmdline 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-save
sysname  Linux
hostname uriline.nmr.mgh.harvard.edu
machine  x86_64
user     wsp6
FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
OneSampleGroupMean 0
y    
/autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall/recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gz
logyflag 0
usedti  0
FSGD 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txt
labelmask  
/autofs/cluster/neuromod/programs/freesurfer_7.1.1/freesurfer/subjects/fsaverage/label/lh.cortex.label
maskinv 0
glmdir 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outputFiles/noMaskTest/
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating 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 dods
Saving 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.dat
Computing normalized matrix
Normalized matrix condition is 1
Matrix condition is 1.125
Found 149955 points in label.
Pruning voxels by thr: 1.175494e-38
Found 149955 voxels in mask
Saving 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.gz
Reshaping mriglm->mask...
search space = 74612.577841
DOF = 15
Starting fit and test
Fit completed in 0.0100333 minutes
Computing spatial AR1 on surface
Residual: ar1mn=0.991551, ar1std=0.005518, gstd=4.393252, fwhm=10.345318
Writing results
  groupDiff
MRImask(): AllowDiffGeom = 1
    maxvox sig=-3.97251  F=27.102  at  index 140685 0 0    seed=1634140058
mri_glmfit done
________________________________
From: [email protected] 
<[email protected]> on behalf of Douglas N. Greve 
<[email protected]>
Sent: Friday, October 8, 2021 9:25 AM
To: [email protected] <[email protected]>
Subject: Re: [Freesurfer] glmfit sig file all zeros

what 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 
<[email protected]><mailto:[email protected]>
Sent: Thursday, September 23, 2021 1:40 PM
To: [email protected]<mailto:[email protected]> 
<[email protected]><mailto:[email protected]>
Subject: Re: [Freesurfer] glmfit sig file all zeros

Here is what I get for the mask:
______________________________________________________

Volume information for 
/autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/rois/recall/lIFG_surf_rad10.nii.gz
          type: nii
    dimensions: 163842 x 1 x 1
   voxel sizes: 1.000000, 1.000000, 1.000000
          type: FLOAT (3)
           fov: 163842.000
           dof: 1
        xstart: -81921.0, xend: 81921.0
        ystart: -0.5, yend: 0.5
        zstart: -0.5, zend: 0.5
            TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 
degrees
       nframes: 1
       PhEncDir: UNKNOWN
       FieldStrength: 0.000000
ras xform present
    xform 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.5000
Orientation   : LAS
Primary Slice Direction: axial

voxel to ras 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

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.gz
          type: nii
    dimensions: 163842 x 1 x 1 x 17
   voxel sizes: 1.000000, 1.000000, 1.000000
          type: FLOAT (3)
           fov: 163842.000
           dof: 1
        xstart: -81921.0, xend: 81921.0
        ystart: -0.5, yend: 0.5
        zstart: -0.5, zend: 0.5
            TR: 2560.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 
degrees
       nframes: 17
       PhEncDir: UNKNOWN
       FieldStrength: 0.000000
ras xform present
    xform 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.0000
Orientation   : LIA
Primary Slice Direction: coronal

voxel to ras transform:
               -1.0000   0.0000   0.0000 13653.5000
                0.0000   0.0000   1.0000    -3.0000
                0.0000  -1.0000   0.0000     0.5000
                0.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: 
[email protected]<mailto:[email protected]>
 
<[email protected]><mailto:[email protected]>
 on behalf of Douglas N. Greve 
<[email protected]><mailto:[email protected]>
Sent: Thursday, September 23, 2021 10:19 AM
To: [email protected]<mailto:[email protected]> 
<[email protected]><mailto:[email protected]>
Subject: Re: [Freesurfer] glmfit sig file all zeros

It 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 found
Reading source surface 
/autofs/cluster/neuromod/programs/freesurfer_7.1.1/freesurfer/subjects/fsaverage/surf/lh.white
gdfRead(): reading 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles/
/fsgd.txt
INFO: gd2mtx_method is dods
Number of vertices 163842
Number of faces    327680
Total area         65417.000000
AvgVtxArea       0.399269
AvgVtxDist       0.721953
StdVtxDist       0.195472

7.1.1
cwd /autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast
cmdline mri_glmfit --glmdir 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lC
S+E_m_lCS-atCS+E/outputFiles/lIFG/ --y 
/autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recal
l//recall.sm5.lh/lCS+E_m_lCS-atCS+E/ces.nii.gz --surf fsaverage lh --fsgd 
/autofs/space/uriline_003/users/projects/OC
D_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_N
M/derivatives/fsfast/rois/recall/lIFG_surf_rad10.nii.gz --eres-save
sysname  Linux
hostname r440-28.nmr.mgh.harvard.edu
machine  x86_64
user     wsp6
FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
OneSampleGroupMean 0
y    
/autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/concat/postMpre/recall/recall.sm5.lh/lCS+E_m_lCS-atCS+E
/ces.nii.gz
logyflag 0
usedti  0
FSGD 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/inputFiles//fsgd.txt
mask 
/autofs/cluster/neuromod/NIFTI/OCD_NM/derivatives/fsfast/rois/recall/lIFG_surf_rad10.nii.gz
maskinv 0
glmdir 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atCS+E/outp
utFiles/lIFG/
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating 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 dods
Saving 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.dat
Computing normalized matrix
Normalized matrix condition is 1
Matrix condition is 1.125
Pruning voxels by thr: 1.175494e-38
Found 512 voxels in mask
Saving mask to 
/autofs/space/uriline_003/users/projects/OCD_NM/walker_pedersen/data/image/main/recall/lCS+E_m_lCS-atC
S+E/outputFiles/lIFG//mask.nii.gz
Reshaping mriglm->mask...
search space = 222.026773
DOF = 15
Starting fit and test
Fit completed in 0.0002 minutes
Computing spatial AR1 on surface
Residual: ar1mn=0.987586, ar1std=0.043927, gstd=3.620916, fwhm=8.526606
Writing results
  groupDiff
MRImask(): AllowDiffGeom = 1
INFO: MRImask() using MRImaskDifferentGeometry()
    maxvox sig=-0  F=4.36504  at  index 391 0 0    seed=1632900996
mri_glmfit done





_______________________________________________
Freesurfer mailing list
[email protected]<mailto:[email protected]>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer




_______________________________________________
Freesurfer mailing list
[email protected]<mailto:[email protected]>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
[email protected]
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 Mass General Brigham 
Compliance HelpLine at http://www.massgeneralbrigham.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.
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 

Reply via email to