Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix): don't calculate statistics for masks #1867

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ilan-gold
Copy link
Collaborator

@ilan-gold ilan-gold commented May 7, 2024

Background

Something I noticed while playing around is that we were calculating stats for masks as well. So this PR should fix that. I am open to other options for this!

Change List

  • Add isBitmask argument to initializeLayerChannels to stop stats calculation for masks

Checklist

  • Ensure PR works with all demos on the dev.vitessce.io homepage
  • Open (draft) PR's into vitessce-python and vitessce-r if this is a release PR
  • Documentation added or updated

Comment on lines 283 to 285
let domains = defaultSelection.map(i => [0, 255])
let sliders = defaultSelection.map(i => [0, 255])
let colors = defaultSelection.map((_, i) => PALETTE[i])
Copy link
Collaborator Author

@ilan-gold ilan-gold May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure of a better way to do this - maybe if-then instead of default and then an if statement to change? But the assignment operation is inexpensive. I think the first two defaults don't matter anyway, and the colors seems reasonable but not sure of the default palette for this.

Copy link
Contributor

github-actions bot commented May 7, 2024

Size Change: +381 B (+0.01%)

Total Size: 6.43 MB

ℹ️ View Unchanged
Filename Size Change
./packages/main/prod/dist/blosc-********.js 612 kB 0 B
./packages/main/prod/dist/browser-********.js 16.2 kB 0 B
./packages/main/prod/dist/chunk-INHXZS53-********.js 558 B 0 B
./packages/main/prod/dist/deflate-********.js 244 B 0 B
./packages/main/prod/dist/gzip-********.js 693 B 0 B
./packages/main/prod/dist/hglib-********.js 4.33 MB 0 B
./packages/main/prod/dist/index-********.js 459 kB +381 B (+0.08%)
./packages/main/prod/dist/index.min.js 927 B 0 B
./packages/main/prod/dist/jpeg-********.js 15.3 kB 0 B
./packages/main/prod/dist/lerc-********.js 47.2 kB 0 B
./packages/main/prod/dist/lz4-********.js 43.9 kB 0 B
./packages/main/prod/dist/lzw-********.js 2.11 kB 0 B
./packages/main/prod/dist/packbits-********.js 577 B 0 B
./packages/main/prod/dist/pako.esm-********.js 68.6 kB 0 B
./packages/main/prod/dist/raw-********.js 169 B 0 B
./packages/main/prod/dist/troika-three-text.esm-********.js 182 kB 0 B
./packages/main/prod/dist/webimage-********.js 837 B 0 B
./packages/main/prod/dist/zlib-********.js 695 B 0 B
./packages/main/prod/dist/zstd-********.js 643 kB 0 B

compressed-size-action

@ilan-gold
Copy link
Collaborator Author

ilan-gold commented May 7, 2024

TODO: fix the opacity causing loads

edit: maybe this is not happening? can't reproduce now

@ilan-gold
Copy link
Collaborator Author

What's up with the size action also?

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 74.89% 10789 / 14405
🔵 Statements 74.89% 10789 / 14405
🔵 Functions 63.03% 295 / 468
🔵 Branches 79.53% 999 / 1256
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/utils/spatial-utils/src/spatial.js 36.72% 71.42% 16.66% 36.72% 51-54, 57-68, 71-88, 96-110, 115-148, 150-214, 221-231, 240-259, 265-267, 276-315, 327-398, 400-404, 408-430, 433-440, 462-463, 469, 478-479, 485, 496-502, 526-530, 537-543
Generated in workflow #3588

@ilan-gold ilan-gold marked this pull request as ready for review May 10, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant