Mono repo for FNNDSC's Javascript projects.
fnndsc / ami Goto Github PK
View Code? Open in Web Editor NEWAMI Medical Imaging (AMI) JS ToolKit
Home Page: https://fnndsc.github.io/ami/#viewers_upload
License: MIT License
AMI Medical Imaging (AMI) JS ToolKit
Home Page: https://fnndsc.github.io/ami/#viewers_upload
License: MIT License
Mono repo for FNNDSC's Javascript projects.
We should minify the js bundle after running through browserify
See MedXT and Cornerstone
People shouldn't have to write the load sequences in general.
https://github.com/FNNDSC/ami-loader/blob/master/ami-loader.html
Add a method to get well formatted data to display thumbnails easily.
Right now, Nifti parser doesn't read data orientation information.
Is it possible to define what each mouse input do ?
For instance, I want to change the index via mouse wheel, change ww/wc via left click instead of having them in stack helpers.
I cannot find it in any example.
EDIT: I guess I spoke too fast.
Whenever I use a serie to make a 2D representation, following the example, I get almost half the serie that works, then the other half is just noise (like on old tvs).
Here's the view for the images that don't compute
I don't know where it comes from, as it works on the OSIRIX desktop viewer.
It's the same on the example where I load dicom files with those series.
Is there something I'm missing ?
Thanks.
https://github.com/scijs/nrrd-js
could be useful for SPL folks
https://github.com/stity/spl-brain-atlas
Raw parser working, needs to be formatted/integrated in VJS and a demo!
Load/parser:
https://github.com/FNNDSC/vjs/blob/master/src/loaders/loaders.trk.js
Demo:
https://github.com/FNNDSC/vjs/blob/master/deprecated/examples/trk_loader/trk_loader.js
Use the simple XTK nii parser to get started then maybe get going with Papaya.
https://github.com/xtk/X/blob/master/io/parserNII.js
we should only load 1 series.
As a result, the stack displayed is not always the one presented in the thumbnail.
It takes forever to run npm install.
The texture has a limited resolution (currently 256 values) which ends up degrading the data visualization.
Create a THREEJS like slice geometry to slice a cube easily.
Store here larger files not to make git source code too big
rotate should get the rotation angle as input
this rotation angle should be the angle relative to the current rotation (or relative to the default orientation?)
https://github.com/FNNDSC/ami/blob/master/src/cameras/cameras.orthographic.js
camera.rotate(); // clockwise
camera.rotate(-1); // counter clock-wise
in cameras.ortho
rotate( clockwise=1) {
this.center();
// Pi/2 rotation if camera is positions at the front of the volume
// else -Pi/2 rotation
let invertClock = 1;
if(this.position.distanceTo(this._back) < this.position.distanceTo(this._front)){
invertClock = -1;
}
// Rotate the up vector around the "zCosine"
let rotation = new THREE.Matrix4().makeRotationAxis(
this._zCosine,
clockwise * invertClock * Math.PI/2);
this.up.applyMatrix4(rotation);
this._updateMatrices();
}
32 bits are stored in RGBA:
https://github.com/FNNDSC/ami/blob/master/src/shaders/glsl/shaders.unpack.glsl
There should be a way to specify if we want to unpack it as integers (as it currently does), or as a float.
https://en.wikipedia.org/wiki/Single-precision_floating-point_format#Converting_from_decimal_representation_to_binary32_format
sitemaps, robots.txt, canonical url, etc.
0 - not filter
1 - trilinear interpolation "filter"
...
create a shader texture which will display target data over an object if location matches.
A THREEJS dev should be confortable with using VJS. Follow same conventions and logic.
VJS allows us to create/update Frame, Stack and Image geometries.
Same for textures.
Might also need helpers such as "ArrowHelper", etc.
http://fnndsc.github.io/ami/#geometries_slice
The slice is not well positioned, there is an offset in a direction.
To be investigated and fixed ASAP.
Must follow @pieper implementation as closely as possible.
(https://github.com/pieper/CommonGL/blob/master/ShaderComputation/ShaderComputation.py)
Underline goal is to extract common (python/JS) GLSL functions and get started with CommonGL.
Store all LUTs in a map for easy access/add/remove.
Create a simple dicom view element.
Input: data = [image1, image2, image3, etc.]
Mimic THREEJS loading/parsing approach for DICOM.
Ideally it create a "ImageHelper" (contains geometries + textures + stackHelpers)
Terminology:
Geometry: -
Texture: -
Helper: Geometry + Texture. It is a ThreeJS Object that can be visualized.
Sometimes it is painfully slow to scroll between slices in lesson 04 or examples label maps or image compare.
Just rebuilding AMI fixes it sometimes...
Binary demo dataset from Andreii
examples/viewers_dicom2D/index.html three.min.js:631 THREE.WebGLRenderer 75 models.stack.js:235 do not know how to order the frames... – Hemanth Anakapalle 10 hours ago
three.min.js:704 THREE.WebGLProgram: shader error: 0 gl.VALIDATE_STATUS false gl.getProgramInfoLog C:\fakepath(167,37-79): error X4002: indefinite logarithm Warning: D3D shader compilation failed with default flags. (ps_3_0) Retrying with avoid flow control C:\fakepath(167,37-79): error X4002: indefinite logarithm Warning: D3D shader compilation failed with avoid flow control flags. (ps_3_0) Retrying with prefer flow control C:\fakepath(167,37-79): error X4002: indefinite logarithm – Hemanth Anakapalle 10 hours ago
Warning: D3D shader compilation failed with prefer flow control flags. (ps_3_0) Failed to create D3D shaders. – Hemanth Anakapalle 10 hours ago
WebGL: INVALID_OPERATION: useProgram: program not valid three.min.js:671 WebGL: INVALID_OPERATION: drawArrays: no valid shader program in use 254three.min.js:600 WebGL: INVALID_OPERATION: useProgram: program not valid three.min.js:600 WebGL: too many errors, no more errors will be reported to the console for this context. – Hemanth Anakapalle 10 hours ago
I am seeing all these errors over browser console. I am trying this over windows, Is it fine ? –
I used the Three.js obj exporter https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/OBJExporter.js
and this code to download the file `
var exporter = new THREE.OBJExporter();
var result = exporter.parse(scene);
var link = document.createElement('a');
document.body.appendChild(link);
save( new Blob( [ result], { type: 'text/plain' } ), 'model.obj' );
function save( blob, filename ) {
link.href = URL.createObjectURL( blob );
link.download = filename || 'data.json';
link.click();
// URL.revokeObjectURL( url ); breaks Firefox...
}`
and i get a black box
Data should be hosted in a proper location and the github repo should only contain source code.
Minimal/(very)small datasets are acceptable for testings.
Using dicomParsers, like in the wado loader:
Showcase how one can connect 2 separated renderers. Useful for remote collaborators.
it will also help cleanup the lesson 02, where 2 series are being loaded but it is hard to know which file belong to which series without it.
It takes 30+ seconds to browserify/babelify/glslify the core - it is way to much
In the shaders, AMI only handles unsigned data.
Test for both Chrome Version 48, 64-bit and Safari.
The fiddle example could not display anything. Please take a look.
People should be able to install it with bower.
Right now, we are using tweaked THREEJS controls.
We should create medical imaging specific controls.
Allow to hook up special behavior, in XTK like way.
Needs to support old and new (XML) VTK formats.
http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf
README is outdated, it should reflect current implementation, logic and goals.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.