Unsupported value for 'PhotometricInterpretation'

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Unsupported value for 'PhotometricInterpretation'

#16 Post by J. Riesmeier »

If you only need the first frame, why do you decompress the entire dataset then?
I would rather suggest to have a look at DcmElement::getUncompressedFrame(), which should do what you need.

First step would be to get the Pointer to the DcmPixelData instance, of course. This could e.g. be done with DcmItem::findAndGetElement().

ilia71
Posts: 22
Joined: Wed, 2016-10-19, 13:13

Re: Unsupported value for 'PhotometricInterpretation'

#17 Post by ilia71 »

Thank you it worked!
But this method, unlike initiation of DicomImage instance, does not handle cases when the PhotometricInterpretation is palette color.
i.e.

Code: Select all

pixelElement->getUncompressedFrame(..)
returns pixel data containing inputs for the color lookup tables.

Is there any way to overcome this issue?

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Unsupported value for 'PhotometricInterpretation'

#18 Post by J. Riesmeier »

Right, if you need rendered pixel data, you should stay with the DicomImage class. Of course, you can also process a DICOM image dataset or file with compressed pixel data using this class, and pass the number of the frame you are interested in as well as the flag CIF_UsePartialAccessToPixelData to the constructor.

ilia71
Posts: 22
Joined: Wed, 2016-10-19, 13:13

Re: Unsupported value for 'PhotometricInterpretation'

#19 Post by ilia71 »

Thank you!
Your answers helped me a lot :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 1 guest