How to convert dicom images with differnt samples per pixel

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

How to convert dicom images with differnt samples per pixel

#1 Post by George »

Hello,

It would be nice to point to function that can convert a dicom that has a different samples per pixel given a static photometric value.
for example I wish to know how to convert my dicom which is PALATE COLOR from 3 samples per picture to one

Best Regards
George

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: How to convert dicom images with differnt samples per pixel

#2 Post by Marco Eichelberg »

A PALETTE COLOR image only has one sample per pixel. That value points to an index table with R, G, and B values.
Effectively this is a space-efficient way to store color images that only use a small number of colors.
If you want to convert an existing RGB image to PALETTE COLOR, you have to reduce the number of colors used by using a dithering algorithm, and then you can compute a color palette. See the dcmquant tool.

Post Reply

Who is online

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