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", 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"];