Re: [Gdcm2] DataElement.GetByteValue returning NULL
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <mat...@gm...> - 2014-09-05 14:05:39
|
On Fri, Sep 5, 2014 at 3:18 PM, KB <bul...@gm...> wrote: > We have been using something like the following code snippet as part of an > application, and have read several thousand images without issue. Today > however, we came across an image for which GDCM returns NULL for > de.GetByteValue(). We are trying to understand why? The image appears to > be OK, we don’t have any issue viewing it in other image viewers. Any > recommendation on how to proceed? Thanks [...] > const gdcm::DataElement& de = mergedImage->GetDataElement(); > > const gdcm::ByteValue *bv = de.GetByteValue(); This only works for uncompressed DICOM file, none of the encapsulated will work in that code (eg. JPEG, JPEG-LS, RLE...). You should really use the gdcm::ImageReader / GetBuffer API instead. 2cts |