Bad tag conversion with dicom

All other questions regarding DCMTK

Moderator: Moderator Team

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

Bad tag conversion with dicom

#1 Post by George »

Hello,

I have a dicom that when I display using a dicom viewer I see that it is an RGB picture rather than a monochrome which should be.
so I do I exactly convert such dicom file to have correct display in dicom viewer?

Best Regards
George Zaher

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

Re: Bad tag conversion with dicom

#2 Post by Marco Eichelberg »

If I understand the question correctly, you want to convert a color image into a monochrome image. That requires calculation of the gray values using the RGB to gray conversion formula, the computation of a new PixelData array, and the adaptation of a few attributes such as Samples per Pixel, Photometric Interpretation, Image Type, and SOP Instance UID, since you are generating a different, derived image.

Post Reply

Who is online

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