Skip to content

Commit

Permalink
Detect SMS using 0051,1011 if MosaicRefAcqTimes missing rordenlab#141
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Nov 3, 2017
1 parent 2c16fe2 commit 9ccc4c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions console/nii_dicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2865,6 +2865,7 @@ uint32_t kUnnest2 = 0xFFFE +(0xE0DD << 16 ); //#define kUnnest2 0xFFFE +(0xE0DD
//float intenScalePhilips = 0.0;
char acquisitionDateTimeTxt[kDICOMStr] = "";
bool isEncapsulatedData = false;
int multiBandFactor = 0;
int encapsulatedDataFragments = 0;
int encapsulatedDataFragmentStart = 0; //position of first FFFE,E000 for compressed images
int encapsulatedDataImageStart = 0; //position of 7FE0,0010 for compressed images (where actual image start should be start of first fragment)
Expand Down Expand Up @@ -3386,6 +3387,13 @@ uint32_t kUnnest2 = 0xFFFE +(0xE0DD << 16 ); //#define kUnnest2 0xFFFE +(0xE0DD
d.accelFactPE = (float)strtof(accelStr, &ptr);
if (*ptr != '\0')
d.accelFactPE = 0.0;
//between slice accel
dcmStr (lLength, &buffer[lPos], accelStr);
dcmStrDigitsOnlyKey('s', accelStr); //e.g. if "p2s4" return "4", if "p2" return ""
multiBandFactor = (int)strtol(accelStr, &ptr, 10);
if (*ptr != '\0')
multiBandFactor = 0.0;
//printMessage("p%gs%d\n", d.accelFactPE, multiBandFactor);
break; }
case kLocationsInAcquisition :
d.locationsInAcquisition = dcmInt(lLength,&buffer[lPos],d.isLittleEndian);
Expand Down Expand Up @@ -3761,6 +3769,8 @@ uint32_t kUnnest2 = 0xFFFE +(0xE0DD << 16 ); //#define kUnnest2 0xFFFE +(0xE0DD
printError("Unable to convert DTI [recompile with increased kMaxDTI4D] detected=%d, max = %d\n", d.CSA.numDti, kMaxDTI4D);
d.CSA.numDti = 0;
}
if (multiBandFactor > d.CSA.multiBandFactor)
d.CSA.multiBandFactor = multiBandFactor; //SMS reported in 0051,1011 but not CSA header
//d.isValid = false; //debug only - will not create output!
#ifndef myLoadWholeFileToReadHeader
fclose(file);
Expand Down
2 changes: 1 addition & 1 deletion console/nii_dicom.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern "C" {
#define kCCsuf " CompilerNA" //unknown compiler!
#endif

#define kDCMvers "v1.0.20171021" kDCMsuf kCCsuf
#define kDCMvers "v1.0.20171103" kDCMsuf kCCsuf

static const int kMaxEPI3D = 1024; //maximum number of EPI images in Siemens Mosaic
static const int kMaxDTI4D = 4096; //maximum number of DTI directions for 4D (Philips) images, also maximum number of 3D slices for Philips 3D and 4D images
Expand Down

0 comments on commit 9ccc4c0

Please sign in to comment.