Skip to content

Commit 2e48bf5

Browse files
authored
fix: remove segmentation background (#154)
* fix: remove segmentation background * fix: linting
1 parent 3a8bf14 commit 2e48bf5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/viewer.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4283,6 +4283,7 @@ class VolumeImageViewer {
42834283

42844284
const defaultSegmentStyle = {
42854285
opacity: 0.75,
4286+
backgroundOpacity: 0,
42864287
paletteColorLookupTable: buildPaletteColorLookupTable({
42874288
data: colormap,
42884289
firstValueMapped: 0
@@ -4342,13 +4343,16 @@ class VolumeImageViewer {
43424343
source,
43434344
extent: this[_pyramid].extent,
43444345
visible: false,
4345-
opacity: 0.9,
4346+
opacity: 1,
43464347
preload: this[_options].preload ? 1 : 0,
43474348
transition: 0,
43484349
style: _getColorPaletteStyleForTileLayer({
43494350
windowCenter,
43504351
windowWidth,
4351-
colormap: segment.style.paletteColorLookupTable.data
4352+
colormap: [
4353+
[...segment.style.paletteColorLookupTable.data.at(0), defaultSegmentStyle.backgroundOpacity],
4354+
[...segment.style.paletteColorLookupTable.data.at(-1)]
4355+
]
43524356
}),
43534357
useInterimTilesOnError: false,
43544358
cacheSize: this[_options].tilesCacheSize,

0 commit comments

Comments
 (0)