From 373618d80069decf22286046de60d8b112304898 Mon Sep 17 00:00:00 2001 From: neurolabusc Date: Wed, 14 Aug 2024 09:38:09 -0400 Subject: [PATCH] Only add "MAGNITUDE" if neither ?MAGNITUDE" or "M" is listed as ImageType (https://github.com/rordenlab/dcm2niix/issues/851) --- console/nii_dicom_batch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/nii_dicom_batch.cpp b/console/nii_dicom_batch.cpp index 1d714960..539b0e19 100644 --- a/console/nii_dicom_batch.cpp +++ b/console/nii_dicom_batch.cpp @@ -1431,7 +1431,7 @@ tse3d: T2*/ } else isSep = true; } - if ((d.isHasMagnitude) && ((d.manufacturer == kMANUFACTURER_GE) || (strstr(d.imageType, "_MAGNITUDE_") == NULL))) + if ((d.isHasMagnitude) && ((d.manufacturer == kMANUFACTURER_GE) || ( (strstr(d.imageType, "_M_") == NULL) && (strstr(d.imageType, "_MAGNITUDE_") == NULL)))) fprintf(fp, "\", \"MAGNITUDE"); if ((d.isHasPhase) && ((d.manufacturer == kMANUFACTURER_GE) || (strstr(d.imageType, "_PHASE_") == NULL))) fprintf(fp, "\", \"PHASE"); //"_IMAGINARY_"