Problems when working with both fMRI and dMRI data of HCP

Dear Mrtrix experts,
I’m processing the fMRI and dMRI data from the HCP project. The voxel sizes of the two modalities are 2 and 1.25, respectively. Both the data I used are minimally preprocessed. I have the following two questions.

  1. The fMRI data has been registered to the MNI space but the dMRI data not. I want the dMRI data to also be in MNI space. How can I do?
  2. The voxel sizes of fMRI and dMRI data are different, when should I resample the voxel size of the DWI data, before the start of all preprocessing steps, after the preprocessing step or something else?


Hello Zack

I’m going to write my answer assuming we’re thinking of the same dataset, namely the HCP young adult 1200 subjects release. If not, then you should probably disregard this answer as I don’t know about all the other HCP data releases…

  1. The HCP data does include a transform file for registering the dMRI data to MNI space, although it’s not completely obvious. Here are two threads (files, transform) that should help you get your dMRI data into MNI space.

  2. The diffusion data is already preprocessed (incl. motion, EPI distortion, eddy current corrections etc.; the manual has the exact details), so you shouldn’t need to do any further preprocessing. But in general, resampling should be done after preprocessing, and definitely after dwidenoise and mrdegibbs.
    If you’re referring to e.g. tensor fitting or running CSD, then I would personally resample the DWI data before any model fitting, but mainly for reasons of storage and processing efficiency (in the current case of downsampling high resolution data). I’ve seen work specifically justifying upsampling before model fitting instead of after, but I don’t know of any scientific considerations about when to downsample…

Hope that’s helpful!

Hello Fiona
I’m sorry for not describing clearly the dataset I used. The dataset I used is HCP young adult 1200 subjects release indeed. Your reply is very helpful for me. Thanks~~~


Hello Fiona

Thanks again for your reply~I still have some confusion When performing the transformation between diffusion space and MNI space according to the files you provided.

In the PreFreeSurfer section of HCP Pipelines, The registration from T1w to MNI space generated two files, acpc2MNILinear.mat generated by flirt and ${OutputTransform} (i.e. acpc_dc2standard.nii.gz) generated by fnirt.

A s far as I know, the file acpc_dc2standard.nii.gz only contains non linear transformation, and the linear transformation file is not included in folder <subject>/MNINonLinear/xfms. I am not familiar with HCP Pipelines, and some understanding may be incorrect…

And I donnot understand ““acpc_dc”” , so could you please interpret the meaning of the term “acpc_dc” in the context for me? Thank you again~~~

Finally, I have another problem, could you please help me resolve it if you have free time? Thanks a lot!!!


Hello Zack

Just want to make sure I understand your question, did you try using the non-linear registration warps and the result didn’t look good? Or do you only want to do linear registration and not non-linear? Or are you simply trying to understand what’s going on before trying to run the transformation yourself?

In the latter case, if I understand correctly you’re confused about the fact that the T1w->MNI registration is broken into two steps (linear + non-linear) and yet you only have access to the output of the non-linear stage…

I believe that the affine component is incorporated into the final nonlinear transformation warp outputted by fnirt, so that you have both steps combined. Admittedly I can’t see that stated explicitly anywhere in the fnirt documentation, but I can only assume that’s the case, since I’ve never had issues applying these warps to non-registered (linear or otherwise) HCP T1 images, and in the HCP pipeline you linked you can see how in subsequent steps, only the warp file (-w ${OutputTransform} is used to transform the original input images.

If you want to only do affine registration, then you’ll need to generate those affine transformation matrices yourself (following the pipeline you linked, i.e. only the flirt step) if they aren’t included in the HCP data release, which shouldn’t be too difficult since affine registration is generally pretty quick.

ACPC stands for “anterior commissure-posterior commisure” and refers to the native (subject specific) coordinate system which relates to the line connecting two anatomical landmark. You can think of it as a fancy way of referring to “subject space” (in contrast to a “template space”, such as MNI). My guess is “dc” stands for distortion corrected. In practice this means that as long as all of a subject’s modalities (T1w, MEG, DWI etc.) are co-aligned to the subject specific ACPC coordinate system, then the acpc_dc2std transformation should apply to all of them.


1 Like