Skip to content

Commit

Permalink
GE slice timing (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jul 24, 2024
1 parent e73095c commit cd7e481
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion console/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Regular use
CFLAGS=-s -O3

# Universal files used for everything
UFILES=main_console.cpp nii_foreign.cpp nii_dicom.cpp jpg_0XC3.cpp ujpeg.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp -o dcm2niix -DmyDisableOpenJPEG
# Debugging
#CFLAGS=-g

Expand Down Expand Up @@ -44,4 +46,7 @@ ifneq ($(OS),Windows_NT)
endif
endif
all:
g++ $(CFLAGS) -I. $(JSFLAGS) $(JFLAGS) $(LFLAGS) main_console.cpp nii_foreign.cpp nii_dicom.cpp jpg_0XC3.cpp ujpeg.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp -o dcm2niix -DmyDisableOpenJPEG
g++ $(CFLAGS) -I. $(JSFLAGS) $(JFLAGS) $(LFLAGS) $(UFILES)

sanitize:
g++ -O1 -g -fsanitize=address -fno-omit-frame-pointer $(LFLAGS) $(UFILES)
5 changes: 5 additions & 0 deletions console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7255,6 +7255,11 @@ void sliceTimingGE(struct TDICOMdata *d, const char *filename, struct TDCMopts o
printWarning("Unable to determine GE Slice timing, no Protocol Data Block GE (0025,101B): %s\n", filename);
return;
}
if (strlen(d->softwareVersions) < 10) { //issue838
d->CSA.sliceTiming[0] = -1;
printWarning("Unable to determine GE Slice timing, invalid SoftwareVersions (0018,1020): %s\n", filename);
return;
}
//start version check:
float geMajorVersion = 0;
int geMajorVersionInt = 0, geMinorVersionInt = 0, geReleaseVersionInt = 0;
Expand Down

0 comments on commit cd7e481

Please sign in to comment.