3dmaskave grid mismatch

Dear AFNI experts,

I created the left hippocampal mask from FreeSurfer segementation and tried to extract FA values using 3dmaskave, which showed the below error.

++ WARNING: file /Users/titus/.afni.log is now 7359264127 (7.4 billion) bytes long!
++ 3dmaskave: AFNI version=AFNI_19.3.11 (Nov 1 2019) [64-bit]
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as /Data/EPC/practice/ROI/EPC001.pre/lhipp.nii.gz,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:/Data/EPC/practice/ROI/EPC001.pre/lhipp.nii.gz is 29.999701 degrees from plumb.
++ Oblique dataset:/Data/EPC/practice/EPC001/EPC001.pre/dwi/FA.nii.gz is 29.999701 degrees from plumb.
*+ WARNING: Input dataset /Data/EPC/practice/EPC001/EPC001.pre/dwi/FA.nii.gz grid mismatch from mask.
Try the following command for grid comparison:
3dinfo -header_line -prefix -same_all_grid /Data/EPC/practice/ROI/EPC001.pre/lhipp.nii.gz /Data/EPC/practice/EPC001/EPC001.pre/dwi/FA.nii.gz

When running 3dinfo -header_line -prefix -same_all_grid /Data/EPC/practice/ROI/EPC001.pre/lhipp.nii.gz /Data/EPC/practice/EPC001/EPC001.pre/dwi/FA.nii.gz, it showed the below.

          prefix	    =dim?	=delt?	=ornt?	=cent?	=obl?
        lhipp.nii.gz	0	0	1	0	1
       FA.nii.gz	0	0	1	1	1

I also tried 3dresample using the below command.
3dresample -rmode NN -master /Data/EPC/practice/EPC001/EPC001.pre/dwi/FA.nii.gz -inset /Data/EPC/practice/ROI/EPC001.pre/lhipp.nii.gz -prefix /Data/EPC/practice/ROI/EPC001.pre/lhipp_resampled.nii.gz

But, the 3dinfo -header showed the same results. Could you please advise how to solve this issue? I also attached the screenshot of the left hippocampal mask overlay and FA underlay, which I think there is no issue in terms of segementation.


Hi, Jim-

The anatomical ROI and the diffusion data probably came through different routes (they certainly started from different datasets). Have you mapped the FreeSurfer output into the diffusion space? At that point, the ROIs should definitely be in the diffusion space. What is the processing each have undergone? It would be better to explore this first before applying 3dresample, because just resampling grids might not actually be appropriate (even if it doesn’t result in an error, the ROI might not really be where it “should” be in the diffusion space).

For example, merging these sources of data is accomplished in the FATCAT_DEMO2, described here:


Hi pt,

Thank you for the advice. I found that FreeSurfer output was not in diffusion space. After mapping the FreeSurfer output in the diffusion space, it worked well.