Comments (3)
That sounds good to me. My only real concern with refactoring the models is to make sure that performance doesn't get worse. Right now the viewer unnecessarily paints each visible layer directly to the on-screen canvas, which makes it very unresponsive as soon as you have 3 or 4 layers. I can't tell if your approach will fix that (it sounds like there will still be the same number of pixel-drawing operations), but it doesn't seem like it will make it any worse, so go for it!
from nsviewer.
Well... I have ideas about performance, too :)
Most notably, I'd like to replace nested js arrays with strided, typed arrays (see https://github.com/mikolalysenko/ndarray), mapping the full-range data to byte arrays. Then color mapping and thresholding can both be done by indexing into a 256-element array.
See https://github.com/mikolalysenko/ndarray-experiments for benchmarks of different techniques...
from nsviewer.
But! Note that I do not want to make that major of a change in this PR. That's its own can of worms.
from nsviewer.
Related Issues (20)
- Update image/scene parameters from object
- Allow users to set colormap thresholds when loading images HOT 8
- Add colorbrewer palettes
- Allow loading of images that aren't in MNI space HOT 10
- Link statistical images to 4D data and plot across time at selected voxel HOT 1
- nsviewer fails to display an image properly HOT 4
- current version is broken: example does not work
- The example link in the README is broken
- Nifti size in nsviewer HOT 14
- Replace array-of-array volume representation with ndarrays HOT 1
- Pre-compute final color image and render only once HOT 3
- Package dependencies properly
- Possibly switch to custom nifti reader HOT 2
- Images not loading HOT 1
- Singleton pattern? HOT 1
- Layers in different colors HOT 2
- Loading progress indicator needed HOT 1
- Slider value doesn't reflect actual handle position
- Table of clusters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsviewer.