DCAN-Labs / nhp-abcd-bids-pipeline

Non-human primate (i.e., macaque) pipeline, based on abcd-hcp-pipeline, to process fMRI data.
https://hub.docker.com/r/dcanumn/nhp-abcd-bids-pipeline
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

TopUp Processing fails when fmaps and functional data not in the same orientation #20

Closed vanandrew closed 2 years ago

vanandrew commented 2 years ago

TopUp Processing seems to fail when the fieldmaps/functional data do not have the same header orientation:

Functionals (Mephistos):

Data Axes Orientation:
  first  (x) = Right-to-Left
  second (y) = Posterior-to-Anterior
  third  (z) = Inferior-to-Superior   [-orient RPI]
R-to-L extent:   -39.922 [R] -to-    40.675 [L] -step-     0.753 mm [108 voxels]
A-to-P extent:   -48.602 [A] -to-    66.644 [P] -step-     0.753 mm [154 voxels]
I-to-S extent:    -4.749 [I] -to-    38.001 [S] -step-     0.750 mm [ 58 voxels]
Number of time steps = 5  Time step = 1.35000s  Origin = 0.00000s

Field maps (Mephistos):

Data Axes Orientation:
  first  (x) = Left-to-Right
  second (y) = Posterior-to-Anterior
  third  (z) = Superior-to-Inferior   [-orient LPS]
R-to-L extent:   -39.922 [R] -to-    40.675 [L] -step-     0.753 mm [108 voxels]
A-to-P extent:   -64.506 [A] -to-    50.741 [P] -step-     0.753 mm [154 voxels]
I-to-S extent:     5.372 [S] -to-    48.122 [S] -step-     0.750 mm [ 58 voxels]
Number of time steps = 5  Time step = 1.35000s  Origin = 0.00000s

This problem also seems to affect Faustus. The easiest solution is to just make sure the fmap/func data is in the same orientation before saving it in the BIDS dataset. An alternative long-term solution is to add a few lines ensuring everything is in the same orientation before running things through the topup pipeline (but we also need to make sure the phase encoding directions are accurately updated with image orientation changes).

vanandrew commented 2 years ago

Issue was most likely the left/right flipping rather than the orientation. Will close this issue for now.