Getting Pixel data out of Dicom images

3 views (last 30 days)
UBC
UBC on 30 Aug 2011
Hello,
I wanted to find out if it is possible to extract only the pixel data from a dicom image, without any metadata.
Thanks,
Jurek

Answers (2)

Walter Roberson
Walter Roberson on 31 Aug 2011
No. The metadata includes information about the pixel encoding and the image encoding, and includes information about where the pixel data is stored. Whether or not this information makes it all the way back to your routine, some level of code needs to read this metadata in order to be able to extract the image for you.
DICOM is complex, and is not as simple as a fixed-length header followed by a block of bytes that represents the uncompressed image data. You need the meta data to get anywhere.

Houssam Eddine KHELIFA
Houssam Eddine KHELIFA on 2 Feb 2021
yes, you can extract pixel data from the file but you will have to read the file byte by byte until you find the index and size of pixel data, you can then save those bytes in a new file where the format of this file must be the same as the transfer syntaxe says in the meta data.

Categories

Find more on DICOM Format in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!