Skip to content

Commit 225bf67

Browse files
committed
Fix unit test for blending information
1 parent 5d46348 commit 225bf67

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

test/multichannel.spec.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,23 @@ describe('dmv.viewer.VolumeImageViewer', () => {
1616
color: [0.0, 0.5, 0.5],
1717
opacity: 1.0,
1818
thresholdValues: [125.0, 255.0],
19+
limitValues: [0.0, 255.0],
1920
visible: true
2021
})
2122
const BITwo = new dmv.metadata.BlendingInformation({
2223
opticalPathIdentifier: '2',
2324
color: [0.5, 0.5, 0.0],
2425
opacity: 1.0,
2526
thresholdValues: [0.0, 255.0],
27+
limitValues: [0.0, 255.0],
2628
visible: true
2729
})
2830
const BIThree = new dmv.metadata.BlendingInformation({
2931
opticalPathIdentifier: '3',
3032
color: [1, 0.0, 0.0],
3133
opacity: 1.0,
3234
thresholdValues: [0.0, 255.0],
35+
limitValues: [0.0, 255.0],
3336
visible: true
3437
})
3538

@@ -58,7 +61,13 @@ describe('dmv.viewer.VolumeImageViewer', () => {
5861
}
5962

6063
viewer.setBlendingInformation(blendingInformation)
61-
assert.deepEqual(thresholdValues, viewer.getBlendingInformation(blendingInformation.opticalPathID).thresholdValues)
64+
const retrievedBlendingInformation = viewer.getBlendingInformation(
65+
blendingInformation.opticalPathID
66+
)
67+
assert.deepEqual(
68+
thresholdValues,
69+
retrievedBlendingInformation.thresholdValues
70+
)
6271
})
6372

6473
it('sets optical path opacity', () => {
@@ -69,21 +78,26 @@ describe('dmv.viewer.VolumeImageViewer', () => {
6978
}
7079

7180
viewer.setBlendingInformation(blendingInformation)
72-
assert.deepEqual(opacity, viewer.getBlendingInformation(blendingInformation.opticalPathID).opacity)
81+
const retrievedBlendingInformation = viewer.getBlendingInformation(
82+
blendingInformation.opticalPathID
83+
)
84+
assert.deepEqual(opacity, retrievedBlendingInformation.opacity)
7385
})
7486

7587
it('hides optical path', () => {
7688
const opticalPathID = '1'
7789

7890
viewer.hideOpticalPath(opticalPathID)
79-
assert.deepEqual(false, viewer.getBlendingInformation(opticalPathID).visible)
91+
const blendingInformation = viewer.getBlendingInformation(opticalPathID)
92+
assert.deepEqual(false, blendingInformation.visible)
8093
})
8194

8295
it('shows optical path', () => {
8396
const opticalPathID = '1'
8497

8598
viewer.showOpticalPath(opticalPathID)
86-
assert.deepEqual(true, viewer.getBlendingInformation(opticalPathID).visible)
99+
const blendingInformation = viewer.getBlendingInformation(opticalPathID)
100+
assert.deepEqual(true, blendingInformation.visible)
87101
})
88102

89103
it('throws an Error if activates optical path identifier 4', () => {

0 commit comments

Comments
 (0)