Skip to content

Commit

Permalink
Reset PET values for classic DICOMs (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jul 13, 2022
1 parent 63c76f2 commit 3583fcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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.20220606"
#define kDCMdate "v1.0.20220707"
#define kDCMvers kDCMdate " " kJP2suf kLSsuf kCCsuf kCPUsuf

static const int kMaxEPI3D = 1024; //maximum number of EPI images in Siemens Mosaic
Expand Down
8 changes: 7 additions & 1 deletion console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ tse3d: T2*/
}
fprintf(fp, "\t],\n");
}
if (dti4D->volumeOnsetTime[0] >= 0.0) { //see BEP009 PET https://docs.google.com/document/d/1mqMLnxVdLwZjDd4ZiWFqjEAmOmfcModA_R535v3eQs0
if ((h->dim[4] > 1) && (dti4D->volumeOnsetTime[0] >= 0.0)) { //see BEP009 PET https://docs.google.com/document/d/1mqMLnxVdLwZjDd4ZiWFqjEAmOmfcModA_R535v3eQs0
fprintf(fp, "\t\"FrameTimesStart\": [\n");
for (int i = 0; i < h->dim[4]; i++) {
if (i != 0)
Expand Down Expand Up @@ -6430,6 +6430,12 @@ int saveDcm2NiiCore(int nConvert, struct TDCMsort dcmSort[], struct TDICOMdata d
uint64_t indxEnd = dcmSort[nConvert - 1].indx;
dti4D->repetitionTimeInversion = 0.0; //only set for Siemens and GE 3D T1 "TR"
dti4D->repetitionTimeExcitation = 0.0; //only set for Philips 3D T1 "TR"
if (nConvert > 0) { //issue 616: not enhanced DICOMs: infer these arrays from multiple volumes
dti4D->volumeOnsetTime[0] = -1;
dti4D->decayFactor[0] = -1;
dti4D->frameDuration[0] = -1;
dti4D->frameReferenceTime[0] = -1;
}
#ifdef newTilt //see issue 254
if (((nConvert > 1) || (dcmList[indx0].xyzDim[3] > 1)) && ((dcmList[indx0].modality == kMODALITY_CT) || (dcmList[indx0].isXRay) || (dcmList[indx0].gantryTilt > 0.0))) { //issue372: enhanced DICOMs can also have gantry tilt
dcmList[indx0].gantryTilt = computeGantryTiltPrecise(dcmList[indx0], dcmList[indxEnd], opts.isVerbose);
Expand Down

0 comments on commit 3583fcc

Please sign in to comment.