Skip to content

Commit

Permalink
Release v0.31.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Nov 16, 2023
1 parent 584d437 commit b69d14a
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 14 deletions.
18 changes: 12 additions & 6 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [v0.31.3](https://github.com/ivmartel/dwv/releases/tag/v0.31.3) - 16/11/2023

### Added

- Allow to change image smoothing from the app [#1555](https://github.com/ivmartel/dwv/issues/1555)

## [v0.31.2](https://github.com/ivmartel/dwv/releases/tag/v0.31.2) - 07/05/2023

### Fixed
Expand Down Expand Up @@ -483,7 +489,7 @@

### Added

- Make mouse-wheel and mouse-move coherent for scroll [#427](https://github.com/ivmartel/dwv/issues/427)
- Make mouse-wheel and mouse-move coherent for scroll [#427](https://github.com/ivmartel/dwv/issues/427)
- Misprint in label [#426](https://github.com/ivmartel/dwv/issues/426)
- Add folder support on file input [#424](https://github.com/ivmartel/dwv/issues/424)
- Allow to cancel a file download and/or display [#412](https://github.com/ivmartel/dwv/issues/412)
Expand Down Expand Up @@ -532,7 +538,7 @@

### Added

- Allow for easier file loader integration [#337](https://github.com/ivmartel/dwv/issues/337)
- Allow for easier file loader integration [#337](https://github.com/ivmartel/dwv/issues/337)
- Use a top of page line progress for the mobile viewer [#333](https://github.com/ivmartel/dwv/issues/333)
- Import data from video file [#328](https://github.com/ivmartel/dwv/issues/328)
- Do not show mesures when no pixel spacing is set [#302](https://github.com/ivmartel/dwv/issues/302)
Expand Down Expand Up @@ -589,7 +595,7 @@

### Added

- Allow for individual draw display toggle [#293](https://github.com/ivmartel/dwv/issues/293)
- Allow for individual draw display toggle [#293](https://github.com/ivmartel/dwv/issues/293)
- Add a free-hand draw tool [#292](https://github.com/ivmartel/dwv/issues/292)
- Add an annotation draw tool [#291](https://github.com/ivmartel/dwv/issues/291)
- Change the line tool into a ruler [#290](https://github.com/ivmartel/dwv/issues/290)
Expand Down Expand Up @@ -677,7 +683,7 @@

- Fix id generator [#201](https://github.com/ivmartel/dwv/issues/201)
- Fix slice order glitch [#200](https://github.com/ivmartel/dwv/issues/200)
- group.id argument for draw listener [#198](https://github.com/ivmartel/dwv/issues/198)
- group.id argument for draw listener [#198](https://github.com/ivmartel/dwv/issues/198)
- Uncaught TypeError: Cannot read property 'add' of null [#197](https://github.com/ivmartel/dwv/issues/197)

---
Expand All @@ -699,7 +705,7 @@

### Added

- Access GUI component per app [#177](https://github.com/ivmartel/dwv/issues/177)
- Access GUI component per app [#177](https://github.com/ivmartel/dwv/issues/177)

### Fixed

Expand Down Expand Up @@ -897,7 +903,7 @@
- Adapt presets to modality [#37](https://github.com/ivmartel/dwv/issues/37)
- MVC Design [#36](https://github.com/ivmartel/dwv/issues/36)
- Safeguard zoom/pan [#35](https://github.com/ivmartel/dwv/issues/35)
- Use the bits* DICOM tags [#30](https://github.com/ivmartel/dwv/issues/30)
- Use the bits\* DICOM tags [#30](https://github.com/ivmartel/dwv/issues/30)
- Load multiple local slices [#3](https://github.com/ivmartel/dwv/issues/3)

### Fixed
Expand Down
53 changes: 51 additions & 2 deletions dist/dwv.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dwv 0.31.2 2023-05-07 12:03:47 */
/*! dwv 0.31.3 2023-11-16 12:13:08 */
// Inspired from umdjs
// See https://github.com/umdjs/umd/blob/master/templates/returnExports.js
(function (root, factory) {
Expand Down Expand Up @@ -617,6 +617,16 @@ dwv.App = function () {
controller.initialise();
};

/**
* Set the imageSmoothing flag value. Default is false.
*
* @param {boolean} flag True to enable smoothing.
*/
this.setImageSmoothing = function (flag) {
stage.setImageSmoothing(flag);
stage.draw();
};

/**
* Get the layer group configuration from a data index.
* Defaults to div id 'layerGroup' if no association object has been set.
Expand Down Expand Up @@ -4749,7 +4759,7 @@ dwv.dicom = dwv.dicom || {};
* @returns {string} The version of the library.
*/
dwv.getVersion = function () {
return '0.31.2';
return '0.31.3';
};

/**
Expand Down Expand Up @@ -13819,6 +13829,13 @@ dwv.gui.LayerGroup = function (containerDiv) {
*/
var currentPosition;

/**
* Image smoothing flag.
*
* @type {boolean}
*/
var imageSmoothing = false;

/**
* Get the target orientation.
*
Expand Down Expand Up @@ -13868,6 +13885,21 @@ dwv.gui.LayerGroup = function (containerDiv) {
}
};

/**
* Set the imageSmoothing flag value.
*
* @param {boolean} flag True to enable smoothing.
*/
this.setImageSmoothing = function (flag) {
imageSmoothing = flag;
// set for existing layers
for (let i = 0; i < layers.length; ++i) {
if (layers[i] instanceof dwv.gui.ViewLayer) {
layers[i].enableImageSmoothing(flag);
}
}
};

/**
* Update crosshair on offset or zoom change.
*/
Expand Down Expand Up @@ -14080,6 +14112,7 @@ dwv.gui.LayerGroup = function (containerDiv) {
containerDiv.append(div);
// view layer
var layer = new dwv.gui.ViewLayer(div);
layer.enableImageSmoothing(imageSmoothing);
// add layer
layers.push(layer);
// mark it as active
Expand Down Expand Up @@ -14693,6 +14726,9 @@ dwv.gui.Stage = function () {
// binder callbacks
var callbackStore = null;

// image smoothing flag
var imageSmoothing = false;

/**
* Get the layer group at the given index.
*
Expand Down Expand Up @@ -14758,6 +14794,7 @@ dwv.gui.Stage = function () {
this.addLayerGroup = function (htmlElement) {
activeLayerGroupIndex = layerGroups.length;
var layerGroup = new dwv.gui.LayerGroup(htmlElement);
layerGroup.setImageSmoothing(imageSmoothing);
// add to storage
var isBound = callbackStore && callbackStore.length !== 0;
if (isBound) {
Expand Down Expand Up @@ -14895,6 +14932,18 @@ dwv.gui.Stage = function () {
callbackStore = null;
};

/**
* Set the imageSmoothing flag value.
*
* @param {boolean} flag True to enable smoothing.
*/
this.setImageSmoothing = function (flag) {
imageSmoothing = flag;
for (let i = 0; i < layerGroups.length; ++i) {
layerGroups[i].setImageSmoothing(flag);
}
};

/**
* Get the binder callback function for a given layer group index.
* The function is created if not yet stored.
Expand Down
4 changes: 2 additions & 2 deletions dist/dwv.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dwv",
"version": "0.31.2",
"version": "0.31.3",
"description": "DICOM Web Viewer.",
"keywords": [
"DICOM",
Expand Down
4 changes: 2 additions & 2 deletions resources/doc/jsdoc.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"package": "package.json",
"theme_opts": {
"title": "DWV",
"footer": "<i>Documentation generated for dwv v0.31.2.</i>",
"footer": "<i>Documentation generated for dwv v0.31.3.</i>",
"sections": [
"Tutorials",
"Namespaces",
Expand All @@ -50,7 +50,7 @@
"codepen": {
"enable_for": ["examples"],
"options": {
"js_external": "https://github.com/ivmartel/dwv/releases/download/v0.31.2/dwv-0.31.2.min.js",
"js_external": "https://github.com/ivmartel/dwv/releases/download/v0.31.3/dwv-0.31.3.min.js",
"html": "<div id='dwv'><div id='layerGroup0'></div></div>"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/dicom/dicomParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dwv.dicom = dwv.dicom || {};
* @returns {string} The version of the library.
*/
dwv.getVersion = function () {
return '0.31.2';
return '0.31.3';
};

/**
Expand Down

0 comments on commit b69d14a

Please sign in to comment.