Skip to content

Commit 061c570

Browse files
authored
Merge pull request #139 from LinkunGao/release/v1.12.15
Release/v1.12.15
2 parents b900956 + 4808a7a commit 061c570

File tree

6 files changed

+32
-12
lines changed

6 files changed

+32
-12
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.12.14'
25+
release = 'v1.12.15'
2626

2727

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

docs/source/release/release.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,5 +1116,10 @@ const resetMainAreaSize = (factor: number) => {
11161116
## Release v1.12.14
11171117

11181118
- remove arrow key function in nrrd tools.
1119-
- add using cursor function to selete the point position on NRRD slice via corsshair.
1119+
- add using cursor function to selete the point position on NRRD slice via crosshair.
11201120
- press `s` on keyboard to use this function.
1121+
1122+
## Release v1.12.15
1123+
1124+
- Add basic logic for crosshair system.
1125+
- Now when using crosshair system mode, when user click the cursor on nrrd slice and use the switch orientation function, the next position's slice index will base the click point.

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.14",
4+
"version": "1.12.15",
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: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export class nrrd_tools {
6767
currentIndex: 0,
6868
maxIndex: 0,
6969
minIndex: 0,
70+
z_Index: 0,
7071
RSARatio: 0,
7172
latestNotEmptyImg: new Image(),
7273
contrastNum: 0,
@@ -206,16 +207,30 @@ export class nrrd_tools {
206207
* @param {string} aixs:"x" | "y" | "z"
207208
* */
208209
setSliceOrientation(axis: "x" | "y" | "z") {
210+
if (this.nrrd_states.enableCursorChoose) {
211+
if (this.axis === "z") {
212+
this.nrrd_states.z_Index = this.nrrd_states.currentIndex;
213+
}
214+
215+
if (axis === "z") {
216+
this.nrrd_states.oldIndex = this.nrrd_states.currentIndex =
217+
this.nrrd_states.z_Index;
218+
} else if (axis === "x") {
219+
this.nrrd_states.oldIndex = this.nrrd_states.currentIndex = Math.ceil(
220+
this.nrrd_states.cursorPageX
221+
);
222+
} else if (axis === "y") {
223+
this.nrrd_states.oldIndex = this.nrrd_states.currentIndex = Math.ceil(
224+
this.nrrd_states.cursorPageY
225+
);
226+
}
227+
}
228+
209229
this.axis = axis;
210230
this.resetDisplaySlicesStatus();
211231
}
212232

213233
addSkip(index: number) {
214-
// const result = this.backUpDisplaySlices.includes(index);
215-
// if (result) {
216-
// this.displaySlices.splice(index, 0, result);
217-
// this.nrrd_states.contrastNum = index;
218-
// }
219234
this.skipSlicesDic[index] = this.backUpDisplaySlices[index];
220235
if (index >= this.displaySlices.length) {
221236
this.nrrd_states.contrastNum = this.displaySlices.length;

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.14";
36+
export const REVISION = "v1.12.15";
3737

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

0 commit comments

Comments
 (0)