Search found 4 matches

by jdinca
Tue, 2015-09-15, 22:01
Forum: DCMJP2K
Topic: Creating uncompressed image from JPEG 2000 stream
Replies: 2
Views: 10123

Re: Creating uncompressed image from JPEG 2000 stream

Thank you for this solution. I now ensure the data I use begins at the JPEG 2000 codestream by searching for: const std::string jp2k_data("FF4F"); (And ends at FFD9.) I then insert the offset table to the pixel sequence: DcmPixelItem *offsetTable = new DcmPixelItem(DcmTag(DCM_Item, EVR_OB)); if (off...
by jdinca
Thu, 2015-09-10, 18:49
Forum: DCMJP2K
Topic: Creating uncompressed image from JPEG 2000 stream
Replies: 2
Views: 10123

Creating uncompressed image from JPEG 2000 stream

I have a JPEG 2000 byte stream, which, if I dump to disk with a 'jp2' extension, reads as a JPEG image. I'd like though to create an uncompressed (EXS_LittleEndianExplicit) DICOM file. So far, I can only create a compressed Dicom file, which reads in fine in Matlab, but gives the following error usi...
by jdinca
Wed, 2015-09-09, 18:08
Forum: DCMTK - General
Topic: Decompress a JPEG DICOM image starting from PixData
Replies: 15
Views: 11579

Re: Decompress a JPEG DICOM image starting from PixData

Actually, I have the solution: just use the insertEncapsulatedPixelData private method as an example of how to do this.
by jdinca
Tue, 2015-09-08, 21:37
Forum: DCMTK - General
Topic: Decompress a JPEG DICOM image starting from PixData
Replies: 15
Views: 11579

Re: Decompress a JPEG DICOM image starting from PixData

You have to create a DcmPixelSequence, insert the pixel items with the JPEG data (the first item always contains the basic offset table), and then use DcmPixelData::putOriginalRepresentation() to put the pixel sequence to the DICOM PixelData element. Code examples can be found both in "dump2dcm.cc"...