From c6918055cf5f07cf45b2cdae24035c570dbd13a6 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 5 Oct 2022 14:33:55 -0400 Subject: [PATCH] fix(ImJoyAPI): Tweak setVolumeScatteringBlend naming - Consistent `Image` prefix for image-related parameters - Shorter, more consistent `Volume` over `Volumetric` --- src/ImJoyPluginAPI.js | 8 ++++---- src/createViewer.js | 4 ++-- test/createViewerTest.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ImJoyPluginAPI.js b/src/ImJoyPluginAPI.js index e026b134..63f8b620 100644 --- a/src/ImJoyPluginAPI.js +++ b/src/ImJoyPluginAPI.js @@ -354,12 +354,12 @@ class ImJoyPluginAPI { return this.viewer.getCroppingPlanes() } - setVolumetricScatteringBlend(scatteringBlend, name) { - this.viewer.setVolumetricScatteringBlend(scatteringBlend, name) + setImageVolumeScatteringBlend(scatteringBlend, name) { + this.viewer.setImageVolumeScatteringBlend(scatteringBlend, name) } - getVolumetricScatteringBlend(name) { - return this.viewer.getVolumetricScatteringBlend(name) + getImageVolumeScatteringBlend(name) { + return this.viewer.getImageVolumeScatteringBlend(name) } } diff --git a/src/createViewer.js b/src/createViewer.js index 873618b2..721fa48b 100644 --- a/src/createViewer.js +++ b/src/createViewer.js @@ -1175,7 +1175,7 @@ const createViewer = async ( return store.itkVtkView } - publicAPI.setVolumetricScatteringBlend = (scatteringBlend, name) => { + publicAPI.setImageVolumeScatteringBlend = (scatteringBlend, name) => { if (typeof name === 'undefined') { name = context.images.selectedName } @@ -1189,7 +1189,7 @@ const createViewer = async ( }) } - publicAPI.getVolumetricScatteringBlend = name => { + publicAPI.getImageVolumeScatteringBlend = name => { if (typeof name === 'undefined') { name = context.images.selectedName } diff --git a/test/createViewerTest.js b/test/createViewerTest.js index 64057009..3e9830e6 100644 --- a/test/createViewerTest.js +++ b/test/createViewerTest.js @@ -117,11 +117,11 @@ test('Test createViewer', async t => { viewer.setBackgroundColor(TEST_VIEWER_STYLE.backgroundColor) const VALUE = 0.3 - viewer.setVolumetricScatteringBlend(VALUE) + viewer.setImageVolumeScatteringBlend(VALUE) t.equal( - viewer.getVolumetricScatteringBlend(), + viewer.getImageVolumeScatteringBlend(), VALUE, - 'getVolumetricScatteringBlend matches setVolumetricScatteringBlend' + 'getImageVolumeScatteringBlend matches setImageVolumeScatteringBlend' ) viewer.setUICollapsed(false)