Skip to content

Commit

Permalink
Fix PAR/REC ADC detection (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Dec 10, 2020
1 parent 2b96ee9 commit aa5dfda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions FILENAMING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ In general dcm2niix creates images with 3D dimensions, or 4 dimensions when the

Some post-fixes are specific to Philips DICOMs
- _ADC Philips specific case. A DWI image where derived isotropic, ADC or trace volume was appended to the series. Since this image will disrupt subsequent processing, and because subsequent processing (dwidenoise, topup, eddy) will yield better derived images, dcm2niix will also create an additional image without this volume. Therefore, the _ADC file should typically be discarded. If you want dcm2niix to discard these useless derived images, use the ignore feature ('-i y').
- _fieldmaphz unwrapped B0 field map (in Hz) generated by a Philips scanner. Suggests Image Type (0008,0008) includes the terms 'B0' and 'MAP'.
- _Raw Philips XX_* DICOMs (Raw Data Storage).
- _PS Philips PS_* DICOMs (Grayscale Softcopy Presentation State).

Expand Down
3 changes: 2 additions & 1 deletion console/nii_dicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1969,7 +1969,7 @@ int kbval = 33; //V3: 27
}
//diskSlice ++;
bool isADC = false;
if ((maxNumberOfGradientOrients >= 2) && (cols[kbval] > 50) && isSameFloat(0.0, cols[kv1]) && isSameFloat(0.0, cols[kv2]) && isSameFloat(0.0, cols[kv2]) ) {
if ((maxNumberOfGradientOrients >= 2) && (cols[kbval] > 50) && isSameFloat(0.0, cols[kv1]) && isSameFloat(0.0, cols[kv2]) && isSameFloat(0.0, cols[kv3]) ) {
isADC = true;
ADCwarning = true;
}
Expand Down Expand Up @@ -2447,6 +2447,7 @@ int kbval = 33; //V3: 27
d.imageStart = 0;
if (d.CSA.numDti >= kMaxDTI4D) {
printError("Unable to convert DTI [increase kMaxDTI4D] found %d directions\n", d.CSA.numDti);
printMessage(" slices*grad*bval*cardiac*echo*dynamic*mix*label = %d*%d*%d*%d*%d*%d*%d*%d\n", d.xyzDim[3], maxNumberOfGradientOrients,maxNumberOfDiffusionValues, maxNumberOfCardiacPhases, maxNumberOfEchoes, maxNumberOfDynamics, maxNumberOfMixes, maxNumberOfLabels);
d.CSA.numDti = 0;
};
//check if dimensions vary
Expand Down
2 changes: 1 addition & 1 deletion console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6119,7 +6119,7 @@ bool isSameSet (struct TDICOMdata d1, struct TDICOMdata d2, struct TDCMopts* opt
}
if (d1.coilCrc != d2.coilCrc) {
if (!warnings->coilVaries)
printMessage("Slices not stacked: coil varies\n");
printMessage("Slices not stacked: coil varies '%s' vs '%s'\n", d1.coilName, d2.coilName);
warnings->coilVaries = true;
*isCoilVaries = true;
return false;
Expand Down

0 comments on commit aa5dfda

Please sign in to comment.