How can we get the PixelData of the dicom image instead of converting it into an Uint16Array?
See original GitHub issueHi I have two server talking to each other one is python over which I am using pydicom, which sends the file to my node server.
So in order to check the integrity of the images I wanted to apply a checksum with pixeldata on both the side.
On pydicom when I happened to get the pixel data from dataset I get a big string of "\x00\x80B\xc3........"
but when I happened to check the same on dicom parser for the same I get an object something like
{ tag: 'x7fe00010',
vr: 'OW',
length: 175186,
dataOffset: 2334,
hadUndefinedLength: true,
encapsulatedPixelData: true,
basicOffsetTable: [],
fragments: [ { offset: 0, position: 2350, length: 175162 } ] } '
so anything can be done to get the same set of pixeldata ? or is there any way to get the encapsulatedPixelData with the help of this object which seems to be a meta-data
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
display image by using uint16array data - javascript
During the rendering process, XTK provides an array of pixel data in an Uint16Array of each DICOM file. But I have no idea...
Read more >Working with Pixel Data — pydicom 2.3.1 documentation
Some DICOM datasets store their output image pixel values in a lookup table (LUT), where the values in Pixel Data are the index...
Read more >dicomParser/README.md at master · cornerstonejs ... - GitHub
dicomParser is a lightweight library for parsing DICOM P10 byte streams, ... example assumes 16 bit unsigned data) var pixelData = new Uint16Array(dataSet....
Read more >DiDocument Class Reference - DCMTK
DiDocument Class Reference. Interface class to DICOM data management (dcmdata). ... convert pixel data to uncompressed representation (if required).
Read more >Chapter 12: Pixel Data - DICOM is Easy
The first part of the application, up to line 87 (look for the comment "Setting the image pixel group elements") is rather standard....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Image Frame = single 2D image encoded in the specified transfer synbtax. Fragmentation = encoding an image frame into multiple pieces. These are both DICOM terms and you can read more about them in the DICOM standard if you wish. Getting an uncompressed 2D image frame is very complex in DICOM due to a variety of issues. If you just want to access 2D image frame buffer, you can see how CornerstoneImageLoader does it here:
https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/src/imageLoader/wadouri/getPixelData.js
Note that this image frame will be encoded with the transfer syntax. You can see how CornerstoneWADOImageLoader decodes it here:
https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/src/imageLoader/createImage.js#L69
Is anything floating around in the
react-vtkjs-viewport
library helpful for you @agirault? It’s usingdicomParser
,cornerstoneWADOImageLoader
, and a dash of its own code to buildvtk.js
volumes:https://github.com/OHIF/react-vtkjs-viewport/blob/master/src/lib/getImageData.js