Extracting PA and AP from dicom

Hi, I’m starting an FBA from dicom, and I’m not quite sure how to extract the PA, AP, and b0 info. mrinfo reads my dicoms fine, but I’m not sure how to tell mrcat or mrconvert how to create AP and PA images.

I do also have the images already in .nii.gz, with the .bval and .bvecs, but I’d like to try to start from the dicoms as that’s what’s recommended. I’m also not sure how to get an AP and PA image from the .nii.gz image either!

Help would be much appreciated, as this is only step 1! Thanks!
specs from mrinfo below:

mrinfo: [100%] reading DICOM series "ep2d_diff_FREE69_p2FAD_2.5mm_iso_59sl"
************************************************
Image name:          "ep2d_diff_FREE69_p2FAD_2.5mm_iso_59sl"
************************************************
  Dimensions:        96 x 96 x 59 x 69
  Voxel size:        2.5 x 2.5 x 2.5 x ?
  Data strides:      [ -1 -2 3 4 ]
  Format:            DICOM
  Data type:         unsigned 16 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:                    1       1e-16  -1.633e-17      -117.5
                           -1e-16      0.9866     -0.1633      -108.2
                               -0      0.1633      0.9866       -75.7
  EchoTime:          0.09
  FlipAngle:         90
  MultibandAccelerationFactor: 1
  PhaseEncodingDirection: j-
  PixelBandwidth:    1578
  RepetitionTime:    7.3
  SliceEncodingDirection: k
  SliceTiming:       0.0000,3.7250,0.1225,3.8500,0.2475,3.9750,0.3725,4.0975,0.4950,4.2225,0.6200,4.3475,0.7450,4.4700,0.8675,4.5950,0.9925,4.7200,1.1175,4.8425,1.2425,4.9675,1.3650,5.0925,1.4900,5.2150,1.6150,5.3400,1.7375,5.4650,1.8625,5.5900,1.9875,5.7125,2.1100,5.8375,2.2350,5.9625,2.3600,6.0850,2.4825,6.2100,2.6075,6.3350,2.7325,6.4575,2.8550,6.5825,2.9800,6.7075,3.1050,6.8300,3.2300,6.9550,3.3525,7.0800,3.4775,7.2025,3.6025
  TotalReadoutTime:  0.0342
  dw_scheme:         0,0,0,0
  [69 entries]       -0.99999093999999999,-0.0030149899999999999,-0.0030149899999999999,1000
                     ...
                     -0.26542663999999999,0.96004652999999995,0.088652439999999999,1000
                     0,0,0,0

Well, the output here is basically telling you there’s only one phase-encode direction in that DICOM dataset. The reverse PE acquisition would typically be a different scan altogether, which could be in a different folder or file. Is that all the data you have access to?

Thanks for getting back to me!

I’ve got 2 field maps and 2 ep2d diffs per participant.

The spec for the second ep2d image is below.

mrinfo: [100%] reading DICOM series "ep2d_diff_FREE68_p2FAD_2.5mm_iso_59sl"
************************************************
Image name:          "[MR] ep2d_diff_FREE68_p2FAD_2.5mm_iso_59sl"
************************************************
  Dimensions:        96 x 96 x 59 x 68
  Voxel size:        2.5 x 2.5 x 2.5 x ?
  Data strides:      [ -1 -2 3 4 ]
  Format:            DICOM
  Data type:         unsigned 16 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:                    1       1e-16  -1.633e-17      -117.5
                           -1e-16      0.9866     -0.1633      -108.2
                               -0      0.1633      0.9866       -75.7
  EchoTime:          0.09
  FlipAngle:         90
  MultibandAccelerationFactor: 1
  PhaseEncodingDirection: j-
  PixelBandwidth:    1578
  RepetitionTime:    7.3
  SliceEncodingDirection: k
  SliceTiming:       0.0000,3.7275,0.1250,3.8525,0.2500,3.9750,0.3750,4.1000,0.4975,4.2250,0.6225,4.3500,0.7475,4.4725,0.8700,4.5975,0.9950,4.7225,1.1200,4.8450,1.2425,4.9700,1.3675,5.0950,1.4925,5.2175,1.6150,5.3425,1.7400,5.4675,1.8650,5.5900,1.9875,5.7150,2.1125,5.8400,2.2375,5.9625,2.3625,6.0875,2.4850,6.2125,2.6100,6.3375,2.7350,6.4600,2.8575,6.5850,2.9825,6.7100,3.1075,6.8325,3.2300,6.9575,3.3550,7.0825,3.4800,7.2050,3.6025
  TotalReadoutTime:  0.0342
  dw_scheme:         0,0,0,0
  [68 entries]       -0.99999093999999999,-0.0030149899999999999,-0.0030149899999999999,1000
                     ...
                     -0.72055482999999998,0.61099064000000003,-0.32785836000000002,1000
                     -0.26542663999999999,0.96004652999999995,0.088652439999999999,1000

OK, what you’re showing is the second DWI series, which happens to have the phase-encode direction, as far as I can tell. So presumably the reversed phase-encoded scans are elsewhere.

When you say you have 2 field maps, do you literally mean that…? Are you referring to reversed PE scans, or to double-echo gradient echo scans (more traditionally used for distortion correction in fMRI)? If the latter, it’s difficult to use these types of data for distortion correction, and it would require quite a bit of finessing to get it to work…

The sequences are labelled fieldmap (see further info below).

If these aren’t suitable for relatively easy plugging into mrtrix, is there an easier way to get things to work from the nii.gz and .bvals that I have instead?

Thank you again!

mrinfo for first fieldmap:

mrinfo: [100%] reading DICOM series "gre_field_mapping"
************************************************
Image name:          "[MR] gre_field_mapping"
************************************************
  Dimensions:        64 x 64 x 55 x 2
  Voxel size:        3 x 3 x 3 x ?
  Data strides:      [ -1 -2 3 4 ]
  Format:            DICOM
  Data type:         unsigned 16 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:                    1   2.051e-10  -7.272e-18         -93
                       -2.023e-10      0.9866     -0.1633      -82.62
                        -3.35e-11      0.1633      0.9866      -86.23
  EchoTime:          0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492,0.00738,0.00492
  FlipAngle:         60
  MultibandAccelerationFactor: 1
  PhaseEncodingDirection: i-
  PixelBandwidth:    260
  RepetitionTime:    0.688
  SliceEncodingDirection: k
  SliceTiming:       0,1.04250002,0.704999983,0.362500012,0.717499971,0.375,0.0375000015,1.08000004,0.0500000007,1.09500003,0.0625,0.412499994,0.075000003,1.12,0.779999971,0.4375,0.100000001,1.14499998,0.805000007,0.462500006,0.817499995,1.16999996,0.137500003,0.487500012,0.842499971,1.19500005,0.855000019,0.512499988,0.867500007,0.524999976,0.1875,1.23249996,0.892499983,0.550000012,0.212500006,0.5625,0.917500019,0.577499986,0.237499997,1.28250003,0.942499995,0.602500021,0.954999983,0.61500001,0.967499971,0.627499998,0.287499994,1.33249998,0.992500007,1.34500003,1.005,1.35749996,1.01750004,0.67750001,1.02999997

mrinfo for second fieldmap:

mrinfo: [100%] reading DICOM series "gre_field_mapping"
************************************************
Image name:          "[MR] gre_field_mapping"
************************************************
  Dimensions:        64 x 64 x 55
  Voxel size:        3 x 3 x 3
  Data strides:      [ -1 -2 3 ]
  Format:            DICOM
  Data type:         unsigned 16 bit integer (little endian)
  Intensity scaling: offset = -4096, multiplier = 2
  Transform:                    1   2.051e-10  -7.272e-18         -93
                       -2.023e-10      0.9866     -0.1633      -82.62
                        -3.35e-11      0.1633      0.9866      -86.23
  EchoTime:          0.00738
  FlipAngle:         60
  MultibandAccelerationFactor: 1
  PhaseEncodingDirection: i-
  PixelBandwidth:    260
  RepetitionTime:    0.688
  SliceEncodingDirection: k
  SliceTiming:       0,0.349999994,0.0125000002,0.362500012,0.0250000004,0.375,0.0375000015,0.387499988,0.0500000007,0.402500004,0.0625,0.414999992,0.075000003,0.42750001,0.0874999985,0.439999998,0.100000001,0.452499986,0.112499997,0.465000004,0.125,0.477499992,0.137500003,0.49000001,0.150000006,0.502499998,0.162499994,0.514999986,0.174999997,0.527499974,0.1875,0.540000021,0.200000003,0.55250001,0.212500006,0.564999998,0.224999994,0.577499986,0.237499997,0.589999974,0.25,0.602500021,0.262499988,0.61500001,0.275000006,0.627499998,0.287499994,0.639999986,0.300000012,0.652499974,0.3125,0.665000021,0.324999988,0.67750001,0.337500006

Yep, they’re double-echo gradient-recalled echo (GRE) scans. These aren’t going to be easy to work with, you’d need to work with eddy directly and really get familiar with its --field option.

If your NIfTI images correspond to the same datasets as the DICOMs, there’s essentially no difference between the two (other than I always trust the DICOM data more than NIfTI, since I’ve no idea where the NIfTIs came from and how they were converted). If you have the reversed PE scans in NIfTI format, you might be lucky – but then I’d be wondering how come you have them in NIfTI format but not DICOM…