"SliceTiming" value/s contains invalid value as it is greater than RepetitionTime

After using heudiconv to convert dicoms to bids format, I ran fmriprep and got the following error: [ERR] “SliceTiming” value/s contains invalid value as it is greater than RepetitionTime. SliceTiming values should be in seconds not milliseconds (common mistake). (code: 66 - SLICETIMING_VALUES_GREATOR_THAN_REPETITION_TIME).

Indeed, viewing the JSON info (copied below), you can see that although the TR=2, the max slice time = 5.695. Clearly not just an issue of units (seconds vs milliseconds). FWIW, I initially ran this with an outdated version of dcm2niix but also reran with the latest version and got the same result. These data were collected on a Siemens scanner between 2019-2021.

Does anyone have suggestions as to why this error may have occurred, and more importantly, what I might do about it? Ideas I’ve seen in related threads include calculating the slice timings manually, or dividing all slice time values by a multiple (e.g., 2.8475, which would rescale the values from 0-2), but I am not confident with either approach. Happy to provide any additional info as necessary. I’ve also copied the header info from the corresponding nifti file (as output by fslhd).

{
“AcquisitionMatrixPE”: 108,
“AcquisitionNumber”: 1,
“AcquisitionTime”: “14:37:32.020000”,
“BandwidthPerPixelPhaseEncode”: 13.419,
“BaseResolution”: 108,
“CoilString”: “C:HEA;HEP”,
“ConversionSoftware”: “dcm2niix”,
“ConversionSoftwareVersion”: “v1.0.20190410 GCC6.3.0”,
“DerivedVendorReportedEchoSpacing”: 0.000690011,
“DeviceSerialNumber”: “35469”,
“DwellTime”: 2.5e-06,
“EchoTime”: 0.03,
“EffectiveEchoSpacing”: 0.000690011,
“FlipAngle”: 90,
“ImageComments”: “SMS_MGH_V2.1;_MB=3;_FOVshift=3;_K_PE=3;_K_RO=3;_CCR=1;LeakBlockOn;",
“ImageOrientationPatientDICOM”: [0.999481, -0.0146871, 0.0286756, 0.0135813, 0.999171, 0.0383838],
“ImageType”: [
“ORIGINAL”,
“PRIMARY”,
“M”,
“ND”,
“MOSAIC”
],
“ImagingFrequency”: 123.116,
“InPlanePhaseEncodingDirectionDICOM”: “COL”,
“InstitutionAddress”: “Vassar_43_Cambridge_MA_US_02139”,
“InstitutionName”: "McGovern_Institute_for_Brain_Research
(3T2)”,
“InstitutionalDepartmentName”: “Department”,
“MRAcquisitionType”: “2D”,
“MagneticFieldStrength”: 3,
“Manufacturer”: “Siemens”,
“ManufacturersModelName”: “TrioTim”,
“Modality”: “MR”,
“PartialFourier”: 0.75,
“PatientPosition”: “HFS”,
“PercentPhaseFOV”: 100,
“PhaseEncodingDirection”: “j-”,
“PhaseEncodingSteps”: 81,
“PhaseResolution”: 1,
“PixelBandwidth”: 1852,
“ProcedureStepDescription”: “INVESTIGATORS_Kanwisher_Active”,
“ProtocolName”: “SMS3_2mmiso_localizer”,
“PulseSequenceDetails”: “%CustomerSeq%_ep2d_bold_sms_mgh_V21_delay”,
“ReceiveCoilName”: “32Ch_Head”,
“ReconMatrixPE”: 108,
“RepetitionTime”: 2,
“SAR”: 0.168297,
“ScanOptions”: “PFP_FS”,
“ScanningSequence”: “EP”,
“SequenceName”: “epfid2d1_108”,
“SequenceVariant”: “SK”,
“SeriesDescription”: “SMS3_2mmiso_localizer”,
“SeriesNumber”: 8,
“ShimSetting”: [6212, -28044, -24482, 345, -239, 50, -96, 188],
“SliceThickness”: 2,
“SliceTiming”: [0, 2.93, 0.0825, 3.015, 0.1675, 3.0975, 0.25, 3.1825, 0.335, 3.265, 0.4175, 3.35, 0.5025, 3.4325, 0.585, 3.5175, 0.67, 3.6, 0.7525, 3.685, 0.8375, 3.7675, 0.92, 3.8525, 1.005, 3.935, 1.0875, 4.02, 1.1725, 4.1025, 1.255, 4.1875, 1.34, 4.27, 1.4225, 4.355, 1.5075, 4.4375, 1.59, 4.5225, 1.675, 4.605, 1.7575, 4.69, 1.8425, 4.7725, 1.925, 4.8575, 2.01, 4.94, 2.0925, 5.025, 2.1775, 5.1075, 2.26, 5.1925, 2.345, 5.275, 2.4275, 5.36, 2.5125, 5.4425, 2.595, 5.5275, 2.68, 5.61, 2.7625, 5.695, 2.8475],
“SoftwareVersions”: “syngo_MR_B17”,
“SpacingBetweenSlices”: 2,
“StationName”: “MRC35469”,
“TaskName”: “EXP”,
“TotalReadoutTime”: 0.0738312,
“TxRefAmp”: 320.445}

sizeof_hdr 348
data_type INT16
dim0 4
dim1 108
dim2 108
dim3 69
dim4 209
dim5 1
dim6 1
dim7 1
vox_units mm
time_units s
datatype 4
nbyper 2
bitpix 16
pixdim0 0.000000
pixdim1 2.000000
pixdim2 2.000000
pixdim3 2.000000
pixdim4 2.000000
pixdim5 0.000000
pixdim6 0.000000
pixdim7 0.000000
vox_offset 352
cal_max 0.0000
cal_min 0.0000
scl_slope 1.000000
scl_inter 0.000000
phase_dim 2
freq_dim 1
slice_dim 3
slice_name alternating_increasing
slice_code 3
slice_start 0
slice_end 0
slice_duration 0.000000
time_offset 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 -1.998962 0.027163 0.058431 108.412506
qto_xyz:2 0.029374 1.998342 0.075949 -98.250397
qto_xyz:3 0.057351 -0.076768 1.997703 -47.447166
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 -1.998962 0.027163 0.058431 108.412506
sto_xyz:2 0.029374 1.998341 0.075949 -98.250397
sto_xyz:3 0.057351 -0.076768 1.997703 -47.447166
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=143732.020;phase=1
aux_file SMS_MGH_V2.1;_MB=3;_FOV

I don’t think we would modify any of those, but to isolate an issue first – could you please just do direct dcm2niix -b y ... conversion on that dicom series? if issue manifests itself – please report to Chris against dcm2niix – Sign in to GitHub · GitHub

Thanks for including the JSON. This includes an early (B17) implementation of multi-band (x3 SMS) before this became a Siemens product sequence, yet the CSA slice timing suggests a single band image.

The early experimental SMS sequences stored the single band reference (e.g. non-multi-band) slice times in the CSA header. This reflects a limitation of your DICOMs, not dcm2niix which assumes DICOM files are truthful. The core issue is documented here for the seminal and outstanding CMRR sequences. This fundamental problem might be compounded by using a four year old version (2019) of dcm2niix. Recent versions of dcm2niix will inspect the 2nd volume for slice times, which at least for some of the early SMS sequences included the correct times. So I would first try converting the DICOMs with dcm2niix v1.0.20230411 - if that fails you will have to contact the sequence developers to infer the slice times.

Thanks to both of you for the help! I did already try a direct conversion with the latest version of dcm2niix, but got the same result (new JSON copied below). I’ll reach out to the sequence developer.

{
“Modality”: “MR”,
“MagneticFieldStrength”: 3,
“ImagingFrequency”: 123.11637,
“Manufacturer”: “Siemens”,
“ManufacturersModelName”: “TrioTim”,
“InstitutionName”: “McGovern Institute for Brain Research (3T2)”,
“InstitutionalDepartmentName”: “Department”,
“InstitutionAddress”: “Vassar 43,Cambridge,MA,US,02139”,
“DeviceSerialNumber”: “35469”,
“StationName”: “MRC35469”,
“PatientPosition”: “HFS”,
“ProcedureStepDescription”: “INVESTIGATORS^Kanwisher_Active”,
“SoftwareVersions”: “syngo MR B17”,
“MRAcquisitionType”: “2D”,
“SeriesDescription”: “SMS3_2mmiso_localizer”,
“ProtocolName”: “SMS3_2mmiso_localizer”,
“ScanningSequence”: “EP”,
“SequenceVariant”: “SK”,
“ScanOptions”: “PFP\FS”,
“SequenceName”: “epfid2d1_108”,
“ImageType”: [“ORIGINAL”, “PRIMARY”, “M”, “ND”, “MOSAIC”],
“NonlinearGradientCorrection”: false,
“SeriesNumber”: 8,
“AcquisitionTime”: “14:37:32.020000”,
“AcquisitionNumber”: 1,
“ImageComments”: “SMS_MGH_V2.1; MB=3; FOVshift=3; K_PE=3; K_RO=3; CCR=1; LeakBlockOn;”,
“SliceThickness”: 2,
“SpacingBetweenSlices”: 2,
“SAR”: 0.168297,
“EchoTime”: 0.03,
“RepetitionTime”: 2,
“FlipAngle”: 90,
“PartialFourier”: 0.75,
“BaseResolution”: 108,
“ShimSetting”: [
6212,
-28044,
-24482,
345,
-239,
50,
-96,
188 ],
“TxRefAmp”: 320.445,
“PhaseResolution”: 1,
“ReceiveCoilName”: “32Ch_Head”,
“CoilString”: “C:HEA;HEP”,
“PulseSequenceDetails”: “%CustomerSeq%\ep2d_bold_sms_mgh_V21_delay”,
“CoilCombinationMethod”: “Sum of Squares”,
“MatrixCoilMode”: “SENSE”,
“PercentPhaseFOV”: 100,
“PercentSampling”: 100,
“PhaseEncodingSteps”: 81,
“AcquisitionMatrixPE”: 108,
“ReconMatrixPE”: 108,
“BandwidthPerPixelPhaseEncode”: 13.419,
“EffectiveEchoSpacing”: 0.000690011,
“DerivedVendorReportedEchoSpacing”: 0.000690011,
“TotalReadoutTime”: 0.0738312,
“PixelBandwidth”: 1852,
“DwellTime”: 2.5e-06,
“PhaseEncodingDirection”: “j-”,
“SliceTiming”: [
0,
2.93,
0.0825,
3.015,
0.1675,
3.0975,
0.25,
3.1825,
0.335,
3.265,
0.4175,
3.35,
0.5025,
3.4325,
0.585,
3.5175,
0.67,
3.6,
0.7525,
3.685,
0.8375,
3.7675,
0.92,
3.8525,
1.005,
3.935,
1.0875,
4.02,
1.1725,
4.1025,
1.255,
4.1875,
1.34,
4.27,
1.4225,
4.355,
1.5075,
4.4375,
1.59,
4.5225,
1.675,
4.605,
1.7575,
4.69,
1.8425,
4.7725,
1.925,
4.8575,
2.01,
4.94,
2.0925,
5.025,
2.1775,
5.1075,
2.26,
5.1925,
2.345,
5.275,
2.4275,
5.36,
2.5125,
5.4425,
2.595,
5.5275,
2.68,
5.61,
2.7625,
5.695,
2.8475 ],
“ImageOrientationPatientDICOM”: [
0.999481,
-0.0146871,
0.0286756,
0.0135813,
0.999171,
0.0383838 ],
“ImageOrientationText”: “Tra>Cor(2.2)>Sag(1.7)”,
“InPlanePhaseEncodingDirectionDICOM”: “COL”,
“ConversionSoftware”: “dcm2niix”,
“ConversionSoftwareVersion”: “v1.0.20230411”
}