Skip to content

Commit 3a71385

Browse files
authored
Merge pull request #141 from LinkunGao/release/v1.12.17
Release/v1.12.17
2 parents 1249684 + e951bb1 commit 3a71385

File tree

6 files changed

+44
-18
lines changed

6 files changed

+44
-18
lines changed

docs/source/release/release.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,3 +1128,27 @@ const resetMainAreaSize = (factor: number) => {
11281128

11291129
- fixed the crosshair system bug.
11301130
- add `getCurrentSlicesNumAndContrastNum()`, it will return current index number and contrast index number.
1131+
1132+
## Release v1.12.17
1133+
1134+
- solved the crosshair Inaccuracy issue.
1135+
1136+
- Notice: the real cursor x is releted slice's RASDimension, but in copper3d system the slice index is releted to slice's dimension. So we need to do some convert things!
1137+
- z -> x:
1138+
slice_z cursor x is slice_x's index, so we need to convert cursor x to slice's dimension format.
1139+
slice_z's index is slice_x cursor x, so we need to convert the dimention to RASDimention.
1140+
- z -> y:
1141+
slice_z's cursor y is slice_y's index
1142+
slice_z's index is slice_y's cursor y
1143+
- x -> z:
1144+
slice_x's cursor x is slice_z's index
1145+
slice_x's index is slice_z's cursor x
1146+
- x -> y:
1147+
slice_x's cursor y is slice_y's index
1148+
slice_x's index is slice_y's cursor x
1149+
- y -> z:
1150+
slice_y's cursor y is slice_z's index
1151+
slice_y's index is slice_z's cursor y
1152+
- y -> x:
1153+
slice_y's cursor x is slice_x's index
1154+
slice_y's index is slice_x's cursor y

docs/source/tutorial/15_drawContrastInMainArea.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,6 @@ const resetLoadState = () => {
616616
};
617617

618618
const loaded = (uploadFile: UploadFile) => {
619-
// console.log(uploadFile);
620-
// console.log(uploadFile.name);
621-
// console.log(uploadFile.raw);
622619
if (loadedFiles) {
623620
loadedFiles = false;
624621
resetLoadState();
@@ -639,7 +636,6 @@ const removeLoadFile = (uploadFile: UploadFile) => {
639636
files = files.filter((file) => {
640637
return file.name !== uploadFile.name;
641638
});
642-
console.log(files);
643639
};
644640

645641
/**

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "copper3d_visualisation",
33
"description": "A 3d visualisation package base on threejs provides multiple scenes and Nrrd image load funtion.",
4-
"version": "1.12.16",
4+
"version": "1.12.17",
55
"main": "dist/bundle.umd.js",
66
"moudle": "dist/bundle.esm.js",
77
"types": "dist/types/index.d.ts",

src/Utils/nrrd_tool.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,12 @@ export class nrrd_tools {
246246
if (this.axis === "x") {
247247
this.nrrd_states.oldIndex = this.nrrd_states.currentIndex =
248248
Math.ceil(
249-
(this.cursorPage.x.cursorPageX /
250-
this.mainPreSlice.volume.RASDimensions[0]) *
251-
this.mainPreSlice.volume.dimensions[0]
249+
(1 -
250+
this.cursorPage.x.cursorPageX /
251+
this.mainPreSlice.volume.dimensions[2]) *
252+
this.mainPreSlice.volume.RASDimensions[2]
252253
);
254+
253255
this.nrrd_states.cursorPageX = Math.ceil(
254256
(this.cursorPage.x.index /
255257
this.mainPreSlice.volume.dimensions[0]) *
@@ -258,7 +260,12 @@ export class nrrd_tools {
258260
}
259261
if (this.axis === "y") {
260262
this.nrrd_states.oldIndex = this.nrrd_states.currentIndex =
261-
Math.ceil(this.cursorPage.y.cursorPageY);
263+
Math.ceil(
264+
(1 -
265+
this.cursorPage.y.cursorPageY /
266+
this.mainPreSlice.volume.dimensions[2]) *
267+
this.mainPreSlice.volume.RASDimensions[2]
268+
);
262269
this.nrrd_states.cursorPageY = Math.ceil(
263270
(1 -
264271
this.cursorPage.y.index /
@@ -283,8 +290,9 @@ export class nrrd_tools {
283290
this.mainPreSlice.volume.dimensions[0]
284291
);
285292
this.nrrd_states.cursorPageX = Math.ceil(
286-
(this.cursorPage.z.index /
287-
this.mainPreSlice.volume.dimensions[2]) *
293+
(1 -
294+
this.cursorPage.z.index /
295+
this.mainPreSlice.volume.dimensions[2]) *
288296
this.mainPreSlice.volume.RASDimensions[2]
289297
);
290298
}
@@ -341,9 +349,7 @@ export class nrrd_tools {
341349
this.mainPreSlice.volume.RASDimensions[0]
342350
);
343351
this.nrrd_states.cursorPageY = Math.ceil(
344-
(this.cursorPage.x.cursorPageY /
345-
this.mainPreSlice.volume.RASDimensions[0]) *
346-
this.mainPreSlice.volume.RASDimensions[2]
352+
this.cursorPage.x.cursorPageX
347353
);
348354
}
349355
this.cursorPage.y.updated = true;

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ import {
3333

3434
import "./css/style.css";
3535

36-
export const REVISION = "v1.12.16";
36+
export const REVISION = "v1.12.17";
3737

3838
console.log(
39-
"%cCopper3D Visualisation %cBeta:v1.12.16",
39+
"%cCopper3D Visualisation %cBeta:v1.12.17",
4040
"padding: 3px;color:white; background:#023047",
4141
"padding: 3px;color:white; background:#f50a25"
4242
);

0 commit comments

Comments
 (0)