byte array to DicomImage

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
bdarius
Posts: 9
Joined: Thu, 2017-04-27, 16:52

byte array to DicomImage

#1 Post by bdarius »

Hello, great software.

My question is how does one create a DicomImage object from a byte array? This byte array contains a dcm file read from the filesystem. The intention is to return the processed image to some java code with createJavaAWTBitmap. Now for example I already have the DcmInputBufferStream set up

Code: Select all

DcmInputStream* dcmInputStream = new DcmInputBufferStream();
((DcmInputBufferStream*)dcmInputStream)->setBuffer(bufferPtr, numBytes);
if (fileformat.read(*dcmInputStream).good()){
...
}
How do I represent it as JavaAWTBitmap? Thanks

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: byte array to DicomImage

#2 Post by J. Riesmeier »

Pass the DcmFileFormat (or DcmDcmdata) instance to the DicomImage constructor and call DicomImage::createJavaAWTBitmap().

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest