Skip to content

Commit

Permalink
Merge pull request #5 from utkarshayachit/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
utkarshayachit authored Nov 22, 2023
2 parents 53c5aa6 + 61ec001 commit 18045a6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
27 changes: 25 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,32 @@ version = "0.1.0"
description = "Data Visualization Application"
requires-python = ">=3.7"
dependencies = [
"trame<3",
"sympy>=1.11",
"aiohttp==3.8.5",
"aiosignal==1.3.1",
"async-timeout==4.0.3",
"attrs==23.1.0",
"charset-normalizer==3.3.0",
"idna==3.4",
"mpmath==1.3.0",
"multidict==6.0.4",
"quantiphy==2.19",
"sympy==1.12",
"trame==2.5.2",
"trame-client==2.12.0",
"trame-components==2.2.1",
"trame-deckgl==2.0.2",
"trame-markdown==2.0.2",
"trame-matplotlib==2.0.2",
"trame-plotly==2.1.1",
"trame-rca==0.4.0",
"trame-router==2.1.0",
"trame-server==2.12.0",
"trame-simput==2.3.3",
"trame-vega==2.0.3",
"trame-vtk==2.5.8",
"trame-vuetify==2.3.1",
"wslink==1.12.2",
"yarl==1.9.2",
]

[project.optional-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion vizer/views/quad.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,8 @@ def update_color_map(self):
if drange[0] != drange[1]:
ds = dsa.WrapDataObject(self.dataset)
array = ds.PointData[self.get_scalar_name()]
drange = [numpy.percentile(array, 5), numpy.percentile(array, 95)]
percentiles = numpy.percentile(array, [5, 95])
drange = [percentiles[0], percentiles[1]]
log.info('5/95 percentile: %f/%f', drange[0], drange[1])
self._lut.InterpretValuesAsCategories = False
self._lut.ApplyPreset('Grayscale', True)
Expand Down
3 changes: 2 additions & 1 deletion vizer/views/segmentation_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,8 @@ def update_color_map(self):
if drange[0] != drange[1]:
ds = dsa.WrapDataObject(self.dataset)
array = ds.PointData[self.get_scalar_name()]
drange = [numpy.percentile(array, 5), numpy.percentile(array, 95)]
percentiles =numpy.percentile(array, [5, 95])
drange = [percentiles[0], percentiles[1]]
log.info('5/95 percentile: %f/%f', drange[0], drange[1])
self._lut.InterpretValuesAsCategories = False
self._lut.ApplyPreset('Grayscale', True)
Expand Down

0 comments on commit 18045a6

Please sign in to comment.