Skip to content

Commit

Permalink
Merge pull request #13 from LinkunGao/release/v1.3.2
Browse files Browse the repository at this point in the history
Release/v1.3.2
  • Loading branch information
LinkunGao authored Apr 4, 2023
2 parents 883f7d9 + 54dd2c7 commit cc58146
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "copper3d_plugin_nrrd",
"version": "1.3.1",
"version": "1.3.2",
"description": "a nrrd support for copper3D",
"main": "dist/bundle.esm.mjs",
"moudle": "dist/bundle.esm.mjs",
Expand Down
13 changes: 7 additions & 6 deletions src/NRRDLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class NRRDLoader extends Loader {
} else {
const v = headerObject.vectors;

const ijk_to_transition = new Matrix4().fromArray([
const ijk_to_transition = new Matrix4().set(
v[0][0],
v[1][0],
v[2][0],
Expand All @@ -386,8 +386,8 @@ class NRRDLoader extends Loader {
0,
0,
0,
1,
]);
1
);

const transition_to_ras = new Matrix4().multiplyMatrices(
ijk_to_transition,
Expand All @@ -401,11 +401,12 @@ class NRRDLoader extends Loader {
volume.inverseMatrix.copy(volume.matrix).invert();

// volume.RASDimensions = new Vector3( volume.xLength, volume.yLength, volume.zLength ).applyMatrix4( volume.matrix ).round().toArray().map( Math.abs );
volume.RASDimensions = new Vector3(
volume.RASDimensions = [
Math.floor(volume.xLength * spacingX),
Math.floor(volume.yLength * spacingY),
Math.floor(volume.zLength * spacingZ)
).toArray();
Math.floor(volume.zLength * spacingZ),
];

// .. and set the default threshold
// only if the threshold was not already set
if (volume.lowerThreshold === -Infinity) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NRRDLoader } from "./NRRDLoader.js";

export const version = "1.3.1";
export const version = "1.3.2";

export { NRRDLoader };
// export default NRRDLoader;
Expand Down

0 comments on commit cc58146

Please sign in to comment.