From ba03669a5dd064eafff5a9a14aa29efd533a498c Mon Sep 17 00:00:00 2001 From: neurolabusc Date: Sun, 11 Aug 2024 12:41:13 -0400 Subject: [PATCH] Siemens version details (https://github.com/rordenlab/dcm2niix/issues/848) --- console/nii_dicom_batch.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/console/nii_dicom_batch.cpp b/console/nii_dicom_batch.cpp index cff0b91c..b44f0bea 100644 --- a/console/nii_dicom_batch.cpp +++ b/console/nii_dicom_batch.cpp @@ -836,7 +836,20 @@ void siemensCsaAscii(const char *filename, TCsaAscii *csaAscii, int csaOffset, i char keyStrCoil[] = "sCoilElementID.tCoilID"; readKeyStr(keyStrCoil, keyPos, csaLengthTrim, coilID); char keyStrCI[] = "sProtConsistencyInfo.tMeasuredBaselineString"; + // issue848 VE11 reports N4_VE11C_LATEST_20160120 readKeyStr(keyStrCI, keyPos, csaLengthTrim, consistencyInfo); + // issue848 VB17 reports N4_VB17A_LATEST_20090307 + if (strlen(consistencyInfo) < 1) { + char keyStrCI2[] = "sProtConsistencyInfo.tBaselineString"; + readKeyStr(keyStrCI2, keyPos, csaLengthTrim, consistencyInfo); + } + // issue848 XA30 reports 63010001 + if (strlen(consistencyInfo) < 1) { + char keyStrCI3[] = "sProtConsistencyInfo.ulConvFromVersion"; + int vers = readKey(keyStrCI3, keyPos, csaLengthTrim); + if (vers > 0) + snprintf(consistencyInfo, 16, "%d", vers); + } char keyStrCS[] = "sCoilSelectMeas.sCoilStringForConversion"; readKeyStr(keyStrCS, keyPos, csaLengthTrim, coilElements); char keyStrSeq[] = "tSequenceFileName";