Skip to content

Commit

Permalink
Siemens instance number re-use (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jul 25, 2024
1 parent 720ba60 commit 1eab724
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions console/nii_dicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4517,6 +4517,7 @@ const uint32_t kEffectiveTE = 0x0018 + uint32_t(0x9082 << 16); //FD
#define kSequenceVariant21 0x0021 + (0x105B << 16) //CS Siemens ONLY: For GE this is TaggingFlipAngle
#define kScanOptionsSiemens 0x0021 + (0x105C << 16) //CS Siemens ONLY
#define kPATModeText 0x0021 + (0x1009 << 16) //LO, see kImaPATModeText
#define kFrameNumberInSeries 0x0021 + (0x118A << 16) //IS issue837
#define kCSASeriesHeaderInfoXA 0x0021 + (0x1019 << 16)
#define kCSASeriesHeaderInfoXA2 0x0021 + (0x11FE << 16)
#define kTimeAfterStart 0x0021 + (0x1104 << 16) //DS
Expand Down Expand Up @@ -4727,6 +4728,7 @@ const uint32_t kEffectiveTE = 0x0018 + uint32_t(0x9082 << 16); //FD
int gradientOrientationNumberPhilips = -1;
int numberOfFrames = 0;
int numberOfFramesICEdims = 0;
int frameNumberInSeries = -1; //issue837
//int MRImageGradientOrientationNumber = 0;
//int minGradNum = kMaxDTI4D + 1;
//int maxGradNum = -1;
Expand Down Expand Up @@ -6227,6 +6229,9 @@ const uint32_t kEffectiveTE = 0x0018 + uint32_t(0x9082 << 16); //FD
case kScanOptionsSiemens:
dcmStr(lLength, &buffer[lPos], scanOptionsSiemens, true);
break;
case kFrameNumberInSeries: //issue837
frameNumberInSeries = dcmStrInt(lLength, &buffer[lPos]);
break;
case kPATModeText: { //e.g. Siemens iPAT x2 listed as "p2"
char accelStr[kDICOMStr];
dcmStr(lLength, &buffer[lPos], accelStr);
Expand Down Expand Up @@ -8072,6 +8077,8 @@ const uint32_t kEffectiveTE = 0x0018 + uint32_t(0x9082 << 16); //FD
d.seriesUidCrc = mz_crc32X((unsigned char *)&d.protocolName, strlen(d.protocolName));
}
}
if (frameNumberInSeries >= 0) //issue837
d.imageNum = frameNumberInSeries;
//TODO533: alias Philips ASL PLD as frameDuration? isKludgeIssue533
//if ((d.manufacturer == kMANUFACTURER_PHILIPS) && ((!isTriggerSynced) || (!isProspectiveSynced)) ) //issue408
// d.triggerDelayTime = 0.0; //Philips ASL use "(0018,9037) CS [NONE]" but "(2001,1010) CS [TRIGGERED]", a situation not described in issue408
Expand Down

0 comments on commit 1eab724

Please sign in to comment.