From 22dd9c288c04dcf69fa6d20410a05fee7f23fb8f Mon Sep 17 00:00:00 2001 From: LinkunGao Date: Sun, 29 Jan 2023 21:41:24 +1300 Subject: [PATCH 1/2] fixed the axis cannot find in 16 bits Nrrd files --- src/NRRDLoader.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/NRRDLoader.js b/src/NRRDLoader.js index 33eee69..d31be18 100644 --- a/src/NRRDLoader.js +++ b/src/NRRDLoader.js @@ -329,9 +329,13 @@ class NRRDLoader extends Loader { ); const axisOrder = []; - axisOrder[xIndex] = "x"; - axisOrder[yIndex] = "y"; - axisOrder[zIndex] = "z"; + if (xIndex !== yIndex && xIndex !== zIndex && yIndex !== zIndex) { + axisOrder[xIndex] = "x"; + axisOrder[yIndex] = "y"; + axisOrder[zIndex] = "z"; + } else { + axisOrder = ["x", "y", "z"]; + } volume.axisOrder = axisOrder; } else { volume.axisOrder = ["x", "y", "z"]; From 6d2fd6585a58ea8bf609c9f253ce9262c33855b1 Mon Sep 17 00:00:00 2001 From: LinkunGao Date: Sun, 29 Jan 2023 21:42:32 +1300 Subject: [PATCH 2/2] 1.2.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 399e5d7..1727375 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "copper3d_plugin_nrrd", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "copper3d_plugin_nrrd", - "version": "1.2.0", + "version": "1.2.1", "license": "ISC", "dependencies": { "fflate": "^0.7.4", diff --git a/package.json b/package.json index f5e61ea..ba8be81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "copper3d_plugin_nrrd", - "version": "1.2.0", + "version": "1.2.1", "description": "a nrrd support for copper3D", "main": "dist/bundle.esm.mjs", "moudle": "dist/bundle.esm.mjs",