diff --git a/src/components/VolumeRendering.vue b/src/components/VolumeRendering.vue index 861d56579..711223e03 100644 --- a/src/components/VolumeRendering.vue +++ b/src/components/VolumeRendering.vue @@ -120,7 +120,7 @@ export default defineComponent({ { mode, shift: pwfWidget.getOpacityPointShift(), - shiftAlpha: pwfWidget.getOpacityAlphaShift(), + shiftAlpha: pwfWidget.getShiftOpacityAlpha(), } ); } diff --git a/src/vtk/PiecewiseWidget/index.js b/src/vtk/PiecewiseWidget/index.js index b06101255..1d8d74ace 100644 --- a/src/vtk/PiecewiseWidget/index.js +++ b/src/vtk/PiecewiseWidget/index.js @@ -75,7 +75,7 @@ function vtkPiecewiseWidget(publicAPI, model) { model.pwMode = Mode.Gaussians; model.opacityPoints = []; model.opacityPointShift = 0; - model.opacityAlphaShift = 0; + model.shiftOpacityAlpha = 0; publicAPI.setGaussiansMode = () => { model.pwMode = Mode.Gaussians; @@ -93,8 +93,8 @@ function vtkPiecewiseWidget(publicAPI, model) { publicAPI.shiftPosition = (coords, meta) => { if (model.ctrlKeyIsDown) { - model.opacityAlphaShift = - meta.originalOpacityAlphaShift + coords[1] - meta.originalXY[1]; + model.shiftOpacityAlpha = + meta.originalShiftOpacityAlpha + coords[1] - meta.originalXY[1]; } else { model.opacityPointShift = meta.originalOpacityPointShift + coords[0] - meta.originalXY[0]; @@ -137,7 +137,7 @@ function vtkPiecewiseWidget(publicAPI, model) { model.dragAction = { originalXY: mouseCoords, originalOpacityPointShift: model.opacityPointShift, - originalOpacityAlphaShift: model.opacityAlphaShift, + originalShiftOpacityAlpha: model.shiftOpacityAlpha, }; return true; @@ -157,7 +157,7 @@ function vtkPiecewiseWidget(publicAPI, model) { model.opacities = samplePiecewiseLinear( model.opacityPoints, model.opacityPointShift, - model.opacityAlphaShift + model.shiftOpacityAlpha ); publicAPI.invokeOpacityChange(publicAPI, true); } @@ -171,12 +171,12 @@ function vtkPiecewiseWidget(publicAPI, model) { // deep copy model.opacityPoints = points.map((p) => [p[0], p[1]]); model.opacityPointShift = shift; - model.opacityAlphaShift = shiftAlpha; + model.shiftOpacityAlpha = shiftAlpha; model.opacities = samplePiecewiseLinear( model.opacityPoints, model.opacityPointShift, - model.opacityAlphaShift + model.shiftOpacityAlpha ); publicAPI.modified(); } @@ -185,7 +185,7 @@ function vtkPiecewiseWidget(publicAPI, model) { publicAPI.getEffectiveOpacityPoints = () => model.opacityPoints.map((p) => [ p[0] + model.opacityPointShift, - p[1] + model.opacityAlphaShift, + p[1] + model.shiftOpacityAlpha, ]); publicAPI.render = () => { @@ -213,7 +213,7 @@ export function extend(publicAPI, model, initialValues = {}) { macro.setGet(publicAPI, model, [ 'opacityPoints', 'opacityPointShift', - 'opacityAlphaShift', + 'shiftOpacityAlpha', 'ctrlKeyIsDown', ]);