Skip to content

Commit

Permalink
Merge pull request #162 from ivmartel/dependabot/npm_and_yarn/dwv-0.33.0
Browse files Browse the repository at this point in the history
Bump dwv from 0.32.6 to 0.33.0
  • Loading branch information
ivmartel authored Jun 10, 2024
2 parents 4f8c38a + 19cdabe commit 7d948b7
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"url": "git://github.com/ivmartel/dwv-jqui.git"
},
"dependencies": {
"dwv": "0.32.6",
"dwv": "0.33.0",
"i18next": "~23.11.2",
"i18next-browser-languagedetector": "~7.2.0",
"i18next-http-backend": "~2.5.0",
Expand Down
6 changes: 4 additions & 2 deletions src/gui/colourMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ dwvjq.gui.info.MiniColourMap = function (div, app) {
var lg = app.getActiveLayerGroup();
var vl = lg.getActiveViewLayer();
var viewController = vl.getViewController();
var colourMap = viewController.getColourMap();
var colourMapName = viewController.getColourMap();
var colourMap = dwv.luts[colourMapName];
var imageData = context.getImageData(0, 0, canvas.width, canvas.height);
// histogram sampling
var c = 0;
var range = app.getImage(0).getRescaledDataRange();
const dataId0 = app.getDataIds()[0];
var range = app.getImage(dataId0).getRescaledDataRange();
var minInt = range.min;
var size = range.max - minInt;
var incrC = size / canvas.width;
Expand Down
15 changes: 12 additions & 3 deletions src/gui/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,27 @@ dwvjq.gui.Slider = function (app) {
* Initialise the slider HTML.
*/
this.initialise = function () {
var dataRange = app.getImage(0).getDataRange();
var dataId0 = app.getDataIds()[0];
var dataRange = app.getImage(dataId0).getDataRange();
var min = dataRange.min;
var max = dataRange.max;
console.log(min, max);

// jquery-ui slider
$('.thresholdLi').slider({
$('#thresholdLi').slider({
range: true,
min: min,
max: max,
values: [min, max],
slide: function (event, ui) {
app.setFilterMinMax({min: ui.values[0], max: ui.values[1]});
app.setToolFeatures({
run: true,
runArgs: {
dataId: app.getDataIds()[0],
min: ui.values[0],
max: ui.values[1]
}
});
}
});
};
Expand Down
7 changes: 6 additions & 1 deletion src/gui/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ dwvjq.gui.filter.base.createFilterApplyButton = function (app) {
var button = document.createElement('button');
button.id = 'runFilterButton';
button.onclick = function (/*event*/) {
app.setToolFeatures({run: true});
app.setToolFeatures({
runArgs: {
dataId: app.getDataIds()[0]
},
run: true
});
};
button.setAttribute('style', 'width:100%; margin-top:0.5em;');
button.setAttribute('class', 'ui-btn ui-btn-b');
Expand Down
6 changes: 4 additions & 2 deletions src/gui/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ dwvjq.gui.info.Plot = function (div, app) {
dwvjq.html.cleanNode(div);
}
// plot
plot(div, app.getImage(0).getHistogram());
const dataId0 = app.getDataIds()[0];
plot(div, app.getImage(dataId0).getHistogram());
};

/**
Expand All @@ -42,7 +43,8 @@ dwvjq.gui.info.Plot = function (div, app) {
];

// plot
plot(div, app.getImage(0).getHistogram(), {markings: markings});
const dataId0 = app.getDataIds()[0];
plot(div, app.getImage(dataId0).getHistogram(), {markings: markings});
};

/**
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,12 @@ duplexify@^3.5.1:
readable-stream "^2.0.0"
stream-shift "^1.0.0"

dwv@0.32.6:
version "0.32.6"
resolved "https://registry.yarnpkg.com/dwv/-/dwv-0.32.6.tgz#0d9bba6ce143adb6173771ed6d0b6750b9a0f4ab"
integrity sha512-PRjuBMJruhK1ZeEWhnLZa1uP1By1Kyf8GWJPv0f5/VqyTF60CHwDvsa2OilP5YFBKnPh5dd9hgQ3FR0nWnAvGA==
dwv@0.33.0:
version "0.33.0"
resolved "https://registry.yarnpkg.com/dwv/-/dwv-0.33.0.tgz#727ba406593c52b10d8efbc4a54012f08de62f2d"
integrity sha512-RhfiUedI+4RNEjaLrfDoVjTm9gYVAAaZgKGZlwg7x6lU5nHGuipRjbHRhz+xfgiCPZ/s6t1+cQLkNw5rrr7Wjg==
dependencies:
jszip "~3.10.1"
jszip "^3.10.1"
konva "~8.4.2"
magic-wand-tool "~1.1.7"

Expand Down Expand Up @@ -1201,7 +1201,7 @@ json-stable-stringify-without-jsonify@^1.0.1:
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=

jszip@~3.10.1:
jszip@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2"
integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==
Expand Down

0 comments on commit 7d948b7

Please sign in to comment.