SSwarper Output Shifting Issue

AFNI version info (afni -ver): AFNI_23.2.11
Hi AFNI experts!
I had a question regarding interpreting SSwarper outputs. When viewing my anat outputs In afni, they seem to look good. However, when I view the "init_qc_00_overlap_usrc_obase.jpg" my anat image seems to be shifted pretty far to the right. I ran @align_centers in an attempt to get these images to align better, however as we can see from the output, the anat images are still heavily shifted. When I went and looked at my other subjects, the same issue is present.

Here is what my init_qc_00_overlap_usrc_obase.jpg looks like:

Here is what my init_qc_01_nl0.ATN005v1_ON.jpg looks like:

Here is my SSwarper script for reference:

#!/bin/bash

@SSwarper                                                                                                                                     \
        -input  /Users/ajcoope9/Desktop/2023-PD/fMRIdata_DICOMsort/ATN005v1_ON/Nifti/"ATN005v1_ON_T1-MPRAGE-8min_20220331092729_201.nii.gz"   \
        -base   /Users/ajcoope9/abin/MNI152_2009_template_SSW.nii.gz                                                                          \
        -subid  'ATN005v1_ON'                                                                                                                 \
        -odir   /Users/ajcoope9/Desktop/2023-PD/Afni_outputs/ATN005v1_ON/AFNI_SS_opt                                                          \
        #        -minp   MP                                                                                                                   \
        -nolite
        -extra_qc_off                                                                                                                         \
        -jump_to_extra_qc                                                                                                                     \
        -deoblique                                                                                                                            \
        -deoblique_refitly                                                                                                                    \
        -warpscale  0.5                                                                                                                       \
        -SSopt 'strings'                                                                                                                      \
        -aniso_off                                                                                                                            \
        -ceil_off                                                                                                                             \
        -echo                                                                                                                                 \
        -verb                                                                                                                                 \
        -noclean

When looking into this on google, it appears a little shifting to the right is relatively normal. However, in all the AFNI tutorials I watched online, none of their output images appeared this shifted, so I am assuming this means all of my subjects need to be redone? Any advice on this issue is greatly appreciated, thank you!

Howdy-

It is likely because that anatomical has obliquity in it, and you have added these options:

        -deoblique                                                                                                                            \
        -deoblique_refitly                                                                                                                    \

Actually, those are not meant to both be applied together, and I should make that an error if both are called in the same command. The first one -deoblique applies the obliquity information, rotating/shifting the dataset (and regridding+interpolating+blurring it slightly) so it appears to be where it should be from the original scanner coordinates; this is what 3dWarp -deoblique .. would do. The second one -deoblique_refitly purges obliquity information, so the brain won't appear where it was originally in the scanner coordinates, but it won't be regridded. More details in the SSW help:

  -deoblique :(opt) apply obliquity information to deoblique the input
              volume ('3dWarp -deoblique -wsinc5 ...'), as an initial step.
              This might introduce the need to overcome a large rotation
              during the alignment, though

  -deoblique_refitly :(opt) purge obliquity information to deoblique
              the input volume (copy, and then '3drefit -deoblique ...'), 
              as an initial step.  This might help when data sets are
              very... oblique.

Normally, we would remove the obliquity before running @SSwarper; this will be quite helpful if also using FreeSurfer on the anatomical dataset, for example. That software will apply the obliquity when recon-all is applied.

What are your plans for this dataset, in your full pipeline?

--pt

Hi Paul,
Thank you so much for getting back to me on this! I didn't realize that I had included both commands, but that makes complete sense.

As for plans for the data set, once the preprocessing is completed and the data from all the participants are put together, I plan on running a t-test.

Best,
Annie

Hi, Annie-

OK, cool. When you refer to a t-test at the end of your analysis, are you going to be comparing the anatomical dataset information itself, or are you using this as part of an FMRI pipeline, and so you will have FMRI-derived effects/stats that you will be analyzing? And in either case, are you using something like FreeSurfer, for additional anatomical analysis?

--pt

Hi Paul,
I'll be analyzing the FMRI-derived effects/stats utilizing a t-test design. For now, I plan on only using AFNI, but it might be handy to keep the data in a format that allows me to switch in between different programs.

-Annie

Hi Paul,
I wanted to follow up regarding this. I adjusted the SSwarper script and deobliqued the anatomical image using 3dwarp before running the data in SSwarper again. However, when I viewed the output, the anatomical image is still heavily shifted to the right. Any chance you have any hunches on why this could still be happening?

-Annie

Hi-

That images is the initial overlap, kind of an informational QC.

The image to check about how it looks at the end would be these main ones (from the help, where "sub007" is the example dset subject ID):

AMsub007.jpg            = 3x3 snapshot image of the anatQQ.sub007.nii
                          dataset with the edges from the base template
                          overlaid -- to check the alignment;
MAsub007.jpg            = similar to the above, with the roles of the
                          template and the anatomical datasets reversed.
QC_anatQQ.sub007.jpg    = like AM*.jpg, but 3 rows of 8 slices
QC_anatSS.sub007.jpg    = check skullstripping in orig space: ulay is
                          input dset, and olay is mask of
                          skullstripped output (anatSS* dset)

How do the QC_*jpg images look, which would show the final results?

--pt

Hi Paul,
From my perspective, the QC_*jpg images look good, however I am new to this so I could be very wrong.
I have attached the images below:


I agree, those do look quite good.

In terms of what to look for when judging alignment (so the image with red outlines here), there are things like feature agreement, particularly around sulci, gyri and tissue boundaries, and more. This is discussed in these videos:

--pt

Hi Paul,
Amazing, I will view those videos now. Thank you so much for taking the time to help me with this. I appreciate it a lot!

-Annie

Sure thing, glad that is useful and please ping back here with any questions/comments/etc.

--pt

1 Like