[Gdcm2] DataElement.GetByteValue returning NULL
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: KB <bul...@gm...> - 2014-09-05 13:18:43
|
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
gdcm::ImageReader reader;
reader.SetFileName("c.dcm");
if (!reader.Read())
{
return -1;
}
gdcm::SmartPointer< gdcm::Image > mergedImage =
reader.GetImage();
const gdcm::DataElement& de = mergedImage->GetDataElement();
const gdcm::ByteValue *bv = de.GetByteValue();
if (bv == NULL)
{
return -1;
}
|