The 6dof transform using the MNI template is only to get the orientation of the structural images to be more predictable - we actually refer to the result of this transform as "native volume space", because it is somewhat more useful for our purposes than the scanner coordinates. It is based only on the T1w scan(s), so it doesn't directly tell you about the orientation during the functional scans. However, this space is the space that the surfaces you need are in, so it is relevant in a sense.
What you actually need is the registration between the distortion-corrected functional scan sbref images, and the T1w "native space" image that the surfaces align with. It is in FSL format, which has coordinate system oddities, and you probably need to invert it (using convert_xfm). In order to get wb_command to interpret it properly, you need to have the original images used for the registration (or at least volume files with equivalent header info). Once it is inverted, the "source" image will be the T1w image in "native space" (rigidly aligned), and the target will be the oblique sbref volume. You can use wb_command -convert-affine to turn the inverted affine into a more intuitive mm-to-mm affine so that you can sanity check it, and then use that in wb_command -surface-apply-affine (that command can instead use the -flirt option to directly read a fsl-format affine, but I don't know if we have tested the case of oblique volumes in FSL-format matrices, so sanity checking is good). This mm-to-mm affine should only have the difference between head orientation in scanner coordinate space (which doesn't rotate just by angling the slice planes) and the rigidly aligned "native space", which is what we want. The best sanity check is that the result of -surface-apply-affine lines up well with the SBRef images, using the "oblique" volume display mode in wb_view (the default orthogonal view doesn't work correctly on oblique volumes) and the "volume surface outline" feature. Hopefully, the scanner b0 direction is constant in scanner coordinate space (something simple like +z, perhaps). Someone else will have to comment on whether this is the case, and how to know what that direction is. This also doesn't account for per-frame motion, so if you need more accuracy, more effort will be required. The files you need exist in the directories accessible through the REST interface, something like this, but someone more familiar with the REST api will have to fill in the blanks: ???/100307_3T/RESOURCES/Structural_preproc/T1w/T1w_acpc_dc_restore.nii.gz — T1w aligned with surfaces, should be identical to the one in the subject's T1w folder, so you shouldn't need to re-download it. ???/100307_3T/RESOURCES/rfMRI_REST1_LR_preproc/rfMRI_REST1_ LR/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased/fMRI2str.mat — Affine between T1w and SBRef not including distortions ???/100307_3T/RESOURCES/rfMRI_REST1_LR_preproc/rfMRI_REST1_ LR/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferB BRbased/FieldMap/SBRef_dc_jac.nii.gz — Undistorted fMRI Volume with oblique sform Here is a wiki page on using REST, once someone translates these paths into the needed URLs: https://wiki.humanconnectome.org/display/PublicData/How+To+A ccess+Subject+Data+via+REST Tim On Mon, Feb 26, 2018 at 4:06 PM, Viessmann, Olivia M. < oviessm...@mgh.harvard.edu> wrote: > Hi Matt, > > I would like to transform the surfaces from native space to the EPI run, > i.e. to the head position of the subject during the rs-fMRI acquisition. My > final aim is to calculate surface orientations to the main B0 field and > relate them to the rs-fmri data, so I need to rotate the surface to the > exact head orientation during the EPI acquisition. I already noticed that > the T1w image is rigidly transformed before the freeSurfer recon-all is run. > My plan was to use the inverse of the acpc.mat file (that I understand to > be the 6 DOF transform used to align the subject rigidly to MNI) and the > inverse of the EPItoT1w.dat to transform the surfaces. > But you mention the FSLBBR preregistration - what do you think is the > correct transformation file for me? > > Thanks a lot, > Olivia > > > On 26 Feb 2018, at 16:42, Glasser, Matthew <glass...@wustl.edu> wrote: > > That will contain an incomplete EPI to T1w registration because we > preregister with FSLBBR. Why do you need this transform in this format? > > Peace, > > Matt. > > From: <hcp-users-boun...@humanconnectome.org> on behalf of "Viessmann, > Olivia M." <oviessm...@mgh.harvard.edu> > Date: Monday, February 26, 2018 at 3:36 PM > To: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org> > Subject: [HCP-Users] path to bbregister .dat file for REST call > > Hello, > > I would like to retrieve the bbregister .dat file from the EPI to T1w > registration but don't know its exact path. > From the shell scripts on github (Pipelines/fMRIVolume.scripts/ > DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh) > I found out that the file I am looking for is named EPItoT1w.dat. However > the path in the script is ${WD}, so I don't know what to put into my curl > call, eg: > curl -u myUserName:myPassWord -O https://db.humanconnectome. > org/data/archive/projects/HCP_1200/subjects/200109/ > experiments/200109_CREST/resources/200109_CREST/files/<??>/EPItoT1w.dat > > I'd very much appreciate if someone who knows the naming of this path > could let me know. > > Many thanks > Olivia Viessmann > > 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. > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users