Search found 9 matches

by jdinca
Tue, 2020-03-31, 03:24
Forum: DCMTK - General
Topic: Reading second instance of a duplicated Tag
Replies: 3
Views: 514

Re: Reading second instance of a duplicated Tag

Yes, no problems. Happy to help as this forum has been really useful to us and invariably DCMTK has an excellent solution! So to be quite explicit for other readers, the approach we use is via the DcmStack, in which we can populate all results: DcmStack resultStack; fileformat.getDataset()->findAndG...
by jdinca
Thu, 2020-03-26, 18:50
Forum: DCMTK - General
Topic: Reading second instance of a duplicated Tag
Replies: 3
Views: 514

Re: Reading second instance of a duplicated Tag

Just to follow up, we realized that findAndGetElements returns _all_ elements with the same name, so one simply need loop over the returned values to get them all.

DCMTK is great!

Jonathan.
by jdinca
Mon, 2020-03-23, 19:27
Forum: DCMTK - General
Topic: Reading second instance of a duplicated Tag
Replies: 3
Views: 514

Reading second instance of a duplicated Tag

Hi, I've found that certain data sets have two instances of the same tag, meaning that, when findAndGetOFStringArray is used for the read, the second tag is ignored. OFCondition findAndGetOFStringArray(const DcmTagKey &tagKey, OFString &value, const OFBool searchIntoSub = OFFalse); Is there any solu...
by jdinca
Mon, 2019-05-13, 20:47
Forum: DCMTK - General
Topic: findAndGetUint8Array read of DCM_EncryptedContent
Replies: 2
Views: 468

Re: findAndGetUint8Array read of DCM_EncryptedContent

You are right, sorry, I stepped through all deletions and see that the exception arises because I do delete the data pointer referencing the internally stored element value.

Thanks for catching that!

Yes, 3.6.0 is old, but it's really good! But I do indeed see multiple reasons to upgrade, too.
by jdinca
Mon, 2019-05-13, 19:06
Forum: DCMTK - General
Topic: findAndGetUint8Array read of DCM_EncryptedContent
Replies: 2
Views: 468

findAndGetUint8Array read of DCM_EncryptedContent

Hi, I've been looking to store data in different DCM tags and am currently looking at using DCM_EncryptedContent to store indeed store encrypted information as a unsigned char array: status = dataset->putAndInsertUint8Array(DCM_EncryptedContent, data, num_bytes); I can write this data just fine (usi...
by jdinca
Tue, 2015-09-15, 22:01
Forum: DCMJP2K
Topic: Creating uncompressed image from JPEG 2000 stream
Replies: 2
Views: 12438

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: 12438

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: 13331

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: 13331

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"...