Skip to content

Commit

Permalink
GE AcquisitionDuration (rordenlab#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaemin Shin authored and Jaemin Shin committed Mar 28, 2024
1 parent 550b9e2 commit b256504
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions console/nii_dicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4477,6 +4477,7 @@ const uint32_t kEffectiveTE = 0x0018 + uint32_t(0x9082 << 16); //FD
#define kLastScanLoc 0x0019 + (0x101B << 16)
#define kBandwidthPerPixelPhaseEncode 0x0019 + (0x1028 << 16) //FD
#define kSliceTimeSiemens 0x0019 + (0x1029 << 16) ///FD
#define kAcquisitionDurationGE 0x0019 + (0x105a << 16) //FL Acquisition Duration in microsecond, Duration of Scan (series)
#define kPulseSequenceNameGE 0x0019 + (0x109C << 16) //LO 'epiRT' or 'epi'
#define kInternalPulseSequenceNameGE 0x0019 + (0x109E << 16) //LO 'EPI' or 'EPI2'
#define kRawDataRunNumberGE 0x0019 + (0x10A2 << 16)//SL
Expand Down Expand Up @@ -5838,6 +5839,12 @@ const uint32_t kEffectiveTE = 0x0018 + uint32_t(0x9082 << 16); //FD
printf("%s\t FrameAcquisitionDateTime %0.4f \n", dateTime, dTime);
//d.triggerDelayTime = dTime;
}*/
case kAcquisitionDurationGE: // issue 808
if (d.manufacturer != kMANUFACTURER_GE)
break;
d.acquisitionDuration = dcmFloat(lLength, &buffer[lPos], d.isLittleEndian);
d.acquisitionDuration /= 1000000.0; //convert microsec to sec
break;
case kDiffusionDirectionality: { // 0018, 9075
set_directionality0018_9075(&volDiffusion, (&buffer[lPos]));
if ((d.manufacturer != kMANUFACTURER_PHILIPS) || (lLength < 10))
Expand Down
2 changes: 1 addition & 1 deletion console/nii_dicom.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
#define kCPUsuf " " //unknown CPU
#endif

#define kDCMdate "v1.0.20240325"
#define kDCMdate "v1.0.20240327"
#define kDCMvers kDCMdate " " kJP2suf kLSsuf kCCsuf kCPUsuf

static const int kMaxEPI3D = 1024; //maximum number of EPI images in Siemens Mosaic
Expand Down
5 changes: 5 additions & 0 deletions console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2256,6 +2256,11 @@ tse3d: T2*/
// FSL definition is start of first line until start of last line.
// Other than the use of (n-1), the value is basically just 1.0/bandwidthPerPixelPhaseEncode.
// https://github.com/rordenlab/dcm2niix/issues/130
if (d.manufacturer == kMANUFACTURER_GE){ //issue808
char acquisitionDurationbuffer[50];
sprintf(acquisitionDurationbuffer, "%02d:%02d",(int)round(d.acquisitionDuration)/60,(int)round(d.acquisitionDuration)%60);
json_Str(fp, "\t\"AcquisitionDurationGE\": \"%s\",\n", acquisitionDurationbuffer);
}
if (d.manufacturer != kMANUFACTURER_UIH) //issue606
json_Float(fp, "\t\"AcquisitionDuration\": %g,\n", d.acquisitionDuration);
if ((d.manufacturer == kMANUFACTURER_UIH) && (effectiveEchoSpacing <= 0.0)) //issue225, issue531
Expand Down

0 comments on commit b256504

Please sign in to comment.