Comments (10)
Not sure how to get other data into correct json format or other way to load data. Also need some RBG data to test with
from vtkplugin.
Gist is here:
https://gist.github.com/swederik/b7901bd933e6497720783e532616eec0
from vtkplugin.
Check image pixelRepresentation (signed) and bitsAllocated to determine data type. Use correct typed array. An example is here: https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/b468ad706276daa4c3cf6aefb3beca924a588b61/src/shared/decoders/decodeLittleEndian.js#L6
from vtkplugin.
The point here is to use the BitsAllocated and the PixelRepresentation to determine the correct array datatype to create. Also to generate appropriate diagnostics if there isn't a valid mapping.
from vtkplugin.
We now support signed and unsigned 16 bit data. console.asserts() have been put in for 8 bit data (signed and unsigned) as the vtk renderer crashes when using 8 bit data. RGB data makes no sense for these plugins so we also console.assert() on components > 1.
from vtkplugin.
console.assert doesn't really do anything except print. Better to throw an error that can be caught and acted on by the application.
from vtkplugin.
Agreed. I’ll add them. One advantage to the Singleton approach might be that if we associate a valid data configuration with the class rather than the instance we can show one error message for the class. So in the case of the MPR views we would get 2 errors thrown rather than 4....
Or perhaps the application can combine the errors in a list view dialog....
from vtkplugin.
I put in throw new Error("messages") but they get swallowed here in tracker.js:
_compute() {
this.invalidated = false;
var previous = Tracker.currentComputation;
setCurrentComputation(this);
var previousInCompute = inCompute;
inCompute = true;
try {
withNoYieldsAllowed(this._func)(this);
} finally {
setCurrentComputation(previous);
inCompute = previousInCompute;
}
}
The try just does a finally, no errors are reported to the user.
I put in console.log() messages as well so that something will show up.
from vtkplugin.
Oh that's interesting... I'll see if we can fix that
from vtkplugin.
Is there more to do on this task?
from vtkplugin.
Related Issues (17)
- Fix initial display of reformatted views
- Making this a separate issue. Zoom level must be computed from camera distance AND size of viewport on resize. HOT 3
- Problem with Slicing
- Window/Level defaults not correct
- Add meta data information to volume view
- Multiple 3D textures instead viewports HOT 2
- Error when loading plugin HOT 7
- Demo Link does not work (https://vtk-plugin.ohif.org) HOT 4
- Is there an example of CPR HOT 3
- Click a certain position with the mouse. Is there any way to get the world POS HOT 1
- Lost OHIF.plugins
- Add middle-click Pan (Dolly) interaction HOT 3
- Add right-click Zoom behaviour HOT 1
- Add dictionary of transfer function presets HOT 2
- Add Study/Series/Patient tags to the corners of the Viewport HOT 1
- Add debounced resize event handler 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 vtkplugin.