Skip to content

Commit 3ab5424

Browse files
committed
update the nrrd tools for show a correct slice order
1 parent 8eb6e0a commit 3ab5424

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'LinkunGao'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = 'v1.14.0'
25+
release = 'v1.14.2'
2626

2727

2828
# -- General configuration ---------------------------------------------------

docs/source/release/release.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,3 +1586,7 @@ sceneIn?.loadNrrd(url, loadBar1, false, funa, opts);
15861586
- update default nrrd gui.
15871587
- now it base on mm slice number.
15881588
- update nrrd plugin based on threejs team suggestions.
1589+
1590+
## Release v1.14.2
1591+
1592+
- fixed the slice order issue, when we drag the slice down.

src/Utils/nrrd_tool.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ export class nrrd_tools {
775775
}
776776

777777
private updateCurrentContrastSlice() {
778+
778779
this.currentShowingSlice = this.displaySlices[this.nrrd_states.contrastNum];
779780
return this.currentShowingSlice;
780781
}
@@ -911,7 +912,7 @@ export class nrrd_tools {
911912
// before start drag event, remove wheel event.
912913
this.drawingCanvas.removeEventListener("wheel", this.handleWheelMove);
913914
if (ev.button === 0) {
914-
this.setSyncsliceNum();
915+
// this.setSyncsliceNum();
915916
y = ev.offsetY / h;
916917
this.container.addEventListener(
917918
"pointermove",
@@ -1019,8 +1020,9 @@ export class nrrd_tools {
10191020
this.nrrd_states.contrastNum = 0;
10201021
} else {
10211022
this.mainPreSlice.index = newIndex * this.nrrd_states.RSARatio;
1022-
// clear drawing canvas, and display next slice
1023-
1023+
// clear drawing canvas, and display next slicez
1024+
this.setSyncsliceNum();
1025+
10241026
if (newIndex != this.nrrd_states.currentIndex) {
10251027
this.nrrd_states.switchSliceFlag = true;
10261028
this.drawingCanvasLayerOne.width = this.drawingCanvasLayerOne.width;
@@ -1035,7 +1037,7 @@ export class nrrd_tools {
10351037

10361038
// get the slice that need to be updated on displayCanvas
10371039
let needToUpdateSlice = this.updateCurrentContrastSlice();
1038-
1040+
10391041
needToUpdateSlice.repaint.call(needToUpdateSlice);
10401042
this.nrrd_states.currentIndex = newIndex;
10411043
this.drawDragSlice(needToUpdateSlice.canvas);

src/index.ts

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

3737
import "./css/style.css";
3838

39-
export const REVISION = "v1.14.1";
39+
export const REVISION = "v1.14.2";
4040

4141
console.log(
42-
"%cCopper3D Visualisation %cBeta:v1.14.1",
42+
"%cCopper3D Visualisation %cBeta:v1.14.2",
4343
"padding: 3px;color:white; background:#023047",
4444
"padding: 3px;color:white; background:#f50a25"
4545
);

0 commit comments

Comments
 (0)