Skip to content

Commit

Permalink
fix for How to reset Window level to default value #158
Browse files Browse the repository at this point in the history
  • Loading branch information
martinezmj-ims committed Mar 9, 2019
1 parent 5bc6824 commit 7b47d45
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/js/viewer/screenvol.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ papaya.viewer.ScreenVolume = papaya.viewer.ScreenVolume || function (vol, params
papaya.viewer.ColorTable.COLOR_BAR_HEIGHT);
this.colorBar = null;

this.originalScreenMin = this.screenMin;
this.originalScreenMax = this.screenMax;

this.updateIcon();
this.updateColorBar();
};
Expand Down Expand Up @@ -197,6 +200,12 @@ papaya.viewer.ScreenVolume.prototype.setScreenRange = function (min, max) {
};


papaya.viewer.ScreenVolume.prototype.resetScreenRange = function () {
this.screenMin = this.originalScreenMin;
this.screenMax = this.originalScreenMax;
this.updateScreenRange();
};


papaya.viewer.ScreenVolume.prototype.setScreenRangeNegatives = function (min, max) {
this.negativeScreenVol.setScreenRange(min, max);
Expand Down

0 comments on commit 7b47d45

Please sign in to comment.