diff --git a/console/makefile b/console/makefile index fcb351e1..5e06cb8c 100644 --- a/console/makefile +++ b/console/makefile @@ -1,8 +1,11 @@ # 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 +# Common files used for everything +CFILES=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 + +# Universal files used for almost everything +UFILES=$(CFILES) -DmyDisableOpenJPEG # Debugging #CFLAGS=-g @@ -55,6 +58,9 @@ sanitize: debug: g++ -O0 $(LFLAGS) $(UFILES) +jp2: + g++ -O0 $(LFLAGS) $(CFILES) -I/opt/homebrew/Cellar/openjpeg/2.5.3/include/openjpeg-2.5/ -L/opt/homebrew/Cellar/openjpeg/2.5.3/lib/ -lopenjp2 + noroi: g++ $(CFLAGS) -I. $(JSFLAGS) $(JFLAGS) $(LFLAGS) $(UFILES) -DmyNoRois diff --git a/console/nii_dicom.cpp b/console/nii_dicom.cpp index 41630cb9..a53d6e2f 100644 --- a/console/nii_dicom.cpp +++ b/console/nii_dicom.cpp @@ -5403,6 +5403,10 @@ struct TDICOMdata readDICOMx(char *fname, struct TDCMprefs *prefs, struct TDTI4D } else if ((compressFlag != kCompressNone) && (strcmp(transferSyntax, "1.2.840.10008.1.2.4.90") == 0)) { d.compressionScheme = kCompressYes; // printMessage("JPEG2000 Lossless support is new: please validate conversion\n"); + } else if ((compressFlag != kCompressNone) && (strcmp(transferSyntax, "1.2.840.10008.1.2.4.201") == 0)) { + d.compressionScheme = kCompressYes; //High-Throughput JPEG 2000 issue 897 + } else if ((compressFlag != kCompressNone) && (strcmp(transferSyntax, "1.2.840.10008.1.2.4.203") == 0)) { + d.compressionScheme = kCompressYes; //High-Throughput JPEG 2000 issue 897 } else if ((strcmp(transferSyntax, "1.2.840.10008.1.2.1.99") == 0)) { // n.b. Deflate compression applied applies to the encoding of the **entire** DICOM Data Set, not just image data // see https://www.medicalconnections.co.uk/kb/Transfer-Syntax/ diff --git a/js/index.html b/js/index.html index 1c2c1547..467bf204 100644 --- a/js/index.html +++ b/js/index.html @@ -114,7 +114,7 @@

dcm2niix WASM Demo

const t0 = performance.now(); const inputFileList = selectedFiles - const resultFileList = await dcm2niix.input(inputFileList).run() + const resultFileList = await dcm2niix.input(inputFileList).z('y').run() console.log(resultFileList); const t1 = performance.now(); diff --git a/js/package-lock.json b/js/package-lock.json index 42fd6f0a..1524ca6f 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "@niivue/dcm2niix", - "version": "0.1.1", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@niivue/dcm2niix", - "version": "0.1.1", + "version": "1.0.0", "license": "BSD-2-Clause", "devDependencies": { "esbuild": "^0.23.1" diff --git a/js/package.json b/js/package.json index 0f560159..fdf19a14 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "@niivue/dcm2niix", - "version": "0.1.1-dev.2", + "version": "1.0.0", "main": "dist/index.js", "module": "dist/index.js", "exports": {