@cornerstonejs/adapters 1.58.4 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters.es.js +18 -0
- package/dist/adapters.es.js.map +1 -1
- package/package.json +5 -5
package/dist/adapters.es.js
CHANGED
|
@@ -5099,6 +5099,7 @@ var Events$2;
|
|
|
5099
5099
|
Events["VOLUME_SCROLL_OUT_OF_BOUNDS"] = "CORNERSTONE_VOLUME_SCROLL_OUT_OF_BOUNDS";
|
|
5100
5100
|
Events["CLIPPING_PLANES_UPDATED"] = "CORNERSTONE_CLIPPING_PLANES_UPDATED";
|
|
5101
5101
|
Events["WEB_WORKER_PROGRESS"] = "CORNERSTONE_WEB_WORKER_PROGRESS";
|
|
5102
|
+
Events["COLORMAP_MODIFIED"] = "CORNERSTONE_COLORMAP_MODIFIED";
|
|
5102
5103
|
})(Events$2 || (Events$2 = {}));
|
|
5103
5104
|
var EVENTS = Events$2;
|
|
5104
5105
|
|
|
@@ -41587,6 +41588,13 @@ class BaseVolumeViewport extends Viewport$1 {
|
|
|
41587
41588
|
cfun.setMappingRange(range[0], range[1]);
|
|
41588
41589
|
volumeActor.getProperty().setRGBTransferFunction(0, cfun);
|
|
41589
41590
|
this.viewportProperties.colormap = colormap$1;
|
|
41591
|
+
if (!suppressEvents) {
|
|
41592
|
+
const eventDetail = {
|
|
41593
|
+
viewportId: this.id,
|
|
41594
|
+
colormap: colormap$1
|
|
41595
|
+
};
|
|
41596
|
+
triggerEvent(this.element, EVENTS.COLORMAP_MODIFIED, eventDetail);
|
|
41597
|
+
}
|
|
41590
41598
|
}
|
|
41591
41599
|
setOpacity(colormap, volumeId) {
|
|
41592
41600
|
const applicableVolumeActorInfo = this._getApplicableVolumeActor(volumeId);
|
|
@@ -46308,6 +46316,11 @@ class StackViewport extends Viewport$1 {
|
|
|
46308
46316
|
this.fillWithBackgroundColor();
|
|
46309
46317
|
this.cpuRenderingInvalidated = true;
|
|
46310
46318
|
this.render();
|
|
46319
|
+
const eventDetail = {
|
|
46320
|
+
viewportId: this.id,
|
|
46321
|
+
colormap: colormapData
|
|
46322
|
+
};
|
|
46323
|
+
triggerEvent(this.element, EVENTS.COLORMAP_MODIFIED, eventDetail);
|
|
46311
46324
|
}
|
|
46312
46325
|
setColormapGPU(colormap$1) {
|
|
46313
46326
|
const ActorEntry = this.getDefaultActor();
|
|
@@ -46327,6 +46340,11 @@ class StackViewport extends Viewport$1 {
|
|
|
46327
46340
|
}
|
|
46328
46341
|
this.colormap = colormap$1;
|
|
46329
46342
|
this.render();
|
|
46343
|
+
const eventDetail = {
|
|
46344
|
+
viewportId: this.id,
|
|
46345
|
+
colormap: colormap$1
|
|
46346
|
+
};
|
|
46347
|
+
triggerEvent(this.element, EVENTS.COLORMAP_MODIFIED, eventDetail);
|
|
46330
46348
|
}
|
|
46331
46349
|
unsetColormapGPU() {
|
|
46332
46350
|
throw new Error('unsetColormapGPU not implemented.');
|