That is awesome that you can share the various steps like that via the webpage---that helps a lot.
Below, there is a long reply, and actually it is divided into 2 pieces.
The following abbrevs are used to save needless wear and tear on me:
- AP =
- SSW =
- FS = FreeSurfer
To answer your questions:
- That is a find template to use as a reference here; on a minor note, since you use TT_N27_SSW.nii.gz specifically within SSW, you should use that in the
afni_proc.py command, too, instead of TT_N27+tlrc, but they should match, anyways.
- You can leave the final results of AP in subject anatomical space, yes; this is often most useful if you want to do an ROI-based analysis using output FS-estimated regions, either on the cortical surface or in the volume. You can pass the FS-estimated atlases/ROI maps as "follower datasets" to AP, so that they end up efficiently on the same final grid as the EPI data.
- In the case of input volumes with tumors, it is possible that staying in anatomical space might be useful, though I am not sure what that does to the quality of estimation of ROIs in the FS step.
- 3dQwarp, the AFNI program underlying SSW, actually takes an "exclusion mask" as input, to help when datasets being aligned have very different substructures. One example case for why it was added was to align a dset with a tumor to a template, as best as possible. SSW actually doesn't have this as part of its input, but I should be able to add that in relatively easily, if that would help.
Now, a separate point about the processing you have done so far and shown.
There are two pieces to this:
- the SSW skullstripping+nonlinear alignment
- The AP FMRI processing (making use of the SSW outputs)
There are a couple things to fix about the SSW warper part first, so let's focus on that.
@SSwarper command by default assumes that the input is a T1w volume, which looks like one of the SSW template dsets (important because of how the default cost function works, to drive the alignment internally). That means having relative tissue brightness of (in increasing order): ventricles, GM, WM. For example, that is what the TT_N27_SSW reference dset looks like, as in the first column here:
However, while your input anatomical FLAIR dset looks nice and sharp, it has different relative tissue brightness, which is (also in increasing order): ventricle, WM, GM.
This means that I would suspect that a different cost function than the default one be used, and the proof of this is shown in this QC image from your SSW output:
... where the overlaid edges of the template don't match well with the underlaid anatomical structures (and this also shows the relative tissue brightness of the input, that I had mentioned above).
On a sidenote, the skullstripping looks generally excellent here still:
Anyways, to address the anatomical alignment for this kind of input dataset contrast, I think this should be re-run with a different cost function specified. We also note that alignment happens in two stages here: an initial, global affine fit, and then the local patch refinement. We will specify the cost functions for each. I don't have experience with this kind of input anatomical contrast, so I am not sure which of the following might work best. I suggest running each of these combinations (sorry for the extra work---but that is the prices of trailblazing!):
When we look more at the EPI-anatomical alignment, as well, the fact that this is a FLAIR and not a T1w volume might lead to cost function adjustment, too.
And again, let me know if the anatomical-with-tumor-to-template alignment is a practical use case for your analyses.