OHIF / react-vtkjs-viewport

VTK.js image viewport component in React

Home Page:https://react-vtkjs-viewport.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get the Volume Pixel Data

jgabrantes opened this issue · comments

Hi, Im using ohif with vtk.js and this api in the context of my thesis. I am trying to have an 3d opencv object consuming the pixelArray of a CT volume.
The pipeline of my operation is supposed to be :
1- get the whole pixel array from the series.
2- send it to a python server using XMLHttpRequest
3- Having the array being consumed with opencv for some processing
4- send it back to ohif viewer to then reconstruct it with mpr.

My question is : what is the best /most correct way on doing this. Since ohif preloads the images when the studiesis selected, I am trying to get the pixel array from the image cache.
Im looking at this example VTKCornerstonePaintingSyncExample.js where an 3d Array buffer is constructed to consume the series coming from cornestone.js, but since I'm still not familiar with this API I can't find the proper object where the whole pixelArray volume is located.

Being stuck for a while in this part, can someone help?

Best regards.

Just found out that the only way is to load each slice to a buffer iteratively with wadoImageLoader