Hi,
I am trying to access the pixel data for a DicomImage by using the getInterData function, but I cannot work out the format. I tried using a function like this, but it causes a memory access violation:
Uint16 samplePixel(
DicomImage* dcmImage, unsigned x, unsigned y)
{
const DiPixel* interData = dcmImage->getInterData();
const void* data = interData->getData();
unsigned offset = y * dcmImage->getWidth() + x;
return *(static_cast<const Uint16*>(data) + offset);
}
What is the correct way to interpret the data buffer returned by getInterData?
Thank you!
Marcus
The format of the DiPixel data returned by getInterData()
Moderator: Moderator Team
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest