Comments (6)
Well, for now the only work around is to go for the traditional approach or use the module ndarrays.js to get things done.
...
series.buildSeries();
var r = series.images[0].getRows();
var c = series.images[0].getCols();
var no = series.images.length;
var volume_buffer = new Array(no);
var i = no, j = 0,k = 0;
while(i--){
var slice_buffer = series.images[j++].getInterpretedData(true);
volume_buffer[j-1] = slice_buffer;
}
var slice = ndarray(new Float32Array(volume_buffer[115]),[r,c]);
...
The weird thing is that, if I try to convert all the images to a single Float32Array
/Array
like this :
...
series.buildSeries();
var r = series.images[0].getRows();
var c = series.images[0].getCols();
var no = series.images.length;
var volume_buffer = new Array(r*c*no);
var i = no, j = 0,k = 0;
while(i--){
var slice_buffer = series.images[j++].getInterpretedData(true);
var l = slice_buffer.length, m = 0;
while(l--){
volume_buffer[k++] = slice_buffer[m++]; // A single stream
}
}
var volume = ndarray(new Float32Array(volume_buffer),[r,c,no]);
var slice = volume.pick(null,null,115);
...
The images dont show up correct. I dont know what I am doing wrong here.
from daikon.
Can you post a screenshot of what it looks like? Is it just noise or do you see some pattern?
from daikon.
It comes as a pattern i guess. Here is the link
from daikon.
Based on the image, it looks like somewhere the dimensions are wrong. Try swapping c and r? The data is usually ordered by column then row.
var volume = ndarray(new Float32Array(volume_buffer),[c,r,no]);
from daikon.
I think that wouldnt help as the ndarray.shape
is a array. from the looks of it, the images are of size 512x512, so because of that, it will give the same result i guess.
from daikon.
Ok I was able to fix it.... it was the way the array is stored in the ndarray, i changed the order as [no,r,c]
and it worked
from daikon.
Related Issues (20)
- Opening a Zipped DICOM File HOT 2
- All tag value is "null" HOT 1
- help create an image using your library HOT 1
- issue for special chacractor in parse dicom have Korean patient name HOT 3
- license.js file references LGPL license for lossless.js but lossless.js has been removed from the repo HOT 1
- Image in negative HOT 1
- can't build app in docker
- More specific documentation for .getInterpretedData() HOT 1
- Parse dicom file error. HOT 1
- Daikon Example Sereis Error HOT 1
- Parse issue with null tag values HOT 1
- Cannot open PALETTE COLOR file HOT 1
- secure dicom format HOT 1
- How convert *.dcm to *.bmp HOT 3
- Cant open encapsulated PDF. HOT 2
- Unable to parse file with private tags. HOT 2
- getTag can return a date object
- Uncaught TypeError: Cannot read properties of null (reading 'buffer')
- Need to bump version and provide a new release HOT 1
- jpeg-lossless-decoder-js version 2.1.0 is broken please lock jpeg-lossless-decoder-js to 2.0.7 HOT 5
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 daikon.