Checking orientation of data collection in json or fslhd of EPI scans + distortion scan

Hi,

We collected a fMRI task and a separate distortion map. I am trying to check if the orientation of the scans were axial and if the direction of the task (should be A-P) and the distortion (P-A) were correctly obtained.

When I look in the json file after running dcm2bids in the nifty images - the “phase encoding direction” for both the task and distortion map is = “j” I am reading on here that the distortion maps should be in opposite directions…

https://lcni.uoregon.edu/kb-articles/kb-0003

Does this mean that my distortion map was incorrectly collected? When looking at the nifty header - the orientation of both the distortion map and the EPI task appear to be the same. (see flshd output below).

Here is the output from the distortion map and the task json. They both list the phase encoding direction as “j” and are exactly the same. Does this mean that the dist images were not collected in the oposit direction to the EPI images?

Modality": “MR”,
“MagneticFieldStrength”: 3,
“ImagingFrequency”: 123.224,
“Manufacturer”: “Siemens”,
“ManufacturersModelName”: “MAGNETOM Vida”,
“BodyPartExamined”: “BRAIN”,
“PatientPosition”: “HFS”,
“SoftwareVersions”: “syngo MR XA20”,
“MRAcquisitionType”: “2D”,
“SeriesDescription”: “func_task-REST_dir-AP”,
“ProtocolName”: “func_task-REST_dir-AP”,
“SequenceVariant”: “SK”,
“ImageType”: [“ORIGINAL”, “PRIMARY”, “FMRI”, “NONE”],
“SeriesNumber”: 10,
“AcquisitionTime”: “12:44:2.147500”,
“AcquisitionNumber”: 1,
“SliceThickness”: 2.5,
“SpacingBetweenSlices”: 2.5,
“EchoTime”: 0.03,
“RepetitionTime”: 0.778,
“FlipAngle”: 52,
“ReceiveCoilActiveElements”: “HC1-7”,
“CoilString”: “HeadNeck_64_CS”,
“MultibandAccelerationFactor”: 6,
“PercentPhaseFOV”: 100,
“PercentSampling”: 100,
“EchoTrainLength”: 86,
“AcquisitionMatrixPE”: 86,
“ReconMatrixPE”: 86,
“BandwidthPerPixelPhaseEncode”: 21.533,
“EffectiveEchoSpacing”: 0.000540004,
“DerivedVendorReportedEchoSpacing”: 0.000540004,
“TotalReadoutTime”: 0.0459003,
“PixelBandwidth”: 2422,
“PhaseEncodingDirection”: “j”,
“ImageOrientationPatientDICOM”: [
0.983566,
0.180544,
-0.00162975,
-0.179986,
0.981159,
0.0702264 ],
“InPlanePhaseEncodingDirectionDICOM”: “COL”,
“ConversionSoftware”: “dcm2niix”,
“ConversionSoftwareVersion”: “v1.0.20201102”
}

Here is the output from fslhd for the distortion map…
sizeof_hdr 348
data_type INT16
dim0 4
dim1 86
dim2 86
dim3 60
dim4 4
dim5 1
dim6 1
dim7 1
vox_units mm
time_units s
datatype 4
nbyper 2
bitpix 16
pixdim0 -1.000000
pixdim1 2.500000
pixdim2 2.500000
pixdim3 2.500000
pixdim4 0.778000
pixdim5 0.000000
pixdim6 0.000000
pixdim7 0.000000
vox_offset 352
cal_max 0.000000
cal_min 0.000000
scl_slope 1.000000
scl_inter 0.000000
phase_dim 2
freq_dim 1
slice_dim 3
slice_name Unknown
slice_code 0
slice_start 0
slice_end 0
slice_duration 0.000000
toffset 0.000000
intent Unknown
intent_code 0
intent_name
intent_p1 0.000000
intent_p2 0.000000
intent_p3 0.000000
qform_name Scanner Anat
qform_code 1
qto_xyz:1 -2.458914 -0.449964 -0.035714 127.439240
qto_xyz:2 -0.451361 2.452898 0.171946 -105.006340
qto_xyz:3 -0.004093 -0.175568 2.493824 -55.330082
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Right-to-Left
qform_yorient Posterior-to-Anterior
qform_zorient Inferior-to-Superior
sform_name Scanner Anat
sform_code 1
sto_xyz:1 -2.458914 -0.449965 -0.035695 127.439240
sto_xyz:2 -0.451360 2.452898 0.171947 -105.006340
sto_xyz:3 -0.004074 -0.175566 2.493824 -55.330082
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Posterior-to-Anterior
sform_zorient Inferior-to-Superior
file_type NIFTI-1+
file_code 1
descrip TE=30;Time=124217.100;mb=6
aux_file

Here is the data for the fMRI task sequence on flshd…
sizeof_hdr 348
data_type INT16
dim0 4
dim1 86
dim2 86
dim3 60
dim4 4
dim5 1
dim6 1
dim7 1
vox_units mm
time_units s
datatype 4
nbyper 2
bitpix 16
pixdim0 -1.000000
pixdim1 2.500000
pixdim2 2.500000
pixdim3 2.500000
pixdim4 0.778000
pixdim5 0.000000
pixdim6 0.000000
pixdim7 0.000000
vox_offset 352
cal_max 0.000000
cal_min 0.000000
scl_slope 1.000000
scl_inter 0.000000
phase_dim 2
freq_dim 1
slice_dim 3
slice_name Unknown
slice_code 0
slice_start 0
slice_end 0
slice_duration 0.000000
toffset 0.000000
intent Unknown
intent_code 0
intent_name
intent_p1 0.000000
intent_p2 0.000000
intent_p3 0.000000
qform_name Scanner Anat
qform_code 1
qto_xyz:1 -2.458914 -0.449964 -0.035714 127.439240
qto_xyz:2 -0.451361 2.452898 0.171946 -105.006340
qto_xyz:3 -0.004093 -0.175568 2.493824 -55.330082
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Right-to-Left
qform_yorient Posterior-to-Anterior
qform_zorient Inferior-to-Superior
sform_name Scanner Anat
sform_code 1
sto_xyz:1 -2.458914 -0.449965 -0.035695 127.439240
sto_xyz:2 -0.451360 2.452898 0.171947 -105.006340
sto_xyz:3 -0.004074 -0.175566 2.493824 -55.330082
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Posterior-to-Anterior
sform_zorient Inferior-to-Superior
file_type NIFTI-1+
file_code 1
descrip TE=30;Time=124217.100;mb=6
aux_file

Do your fMRI task images and distortion map have similar distorsion pattern?

If yes, then there must have been something wrong during the data collection/sequence preparation.

If not, then the conversion from DICOM to NIFTI/BIDS must be looked into.

I would suggest updating dcm2niix to the latest stable release (v1.0.20211006). The Siemens X*-series DICOMs are dramatically different from their prior V*-series. We are still actively working on reverse-engineering the XA DICOMs.