PhotometricInterpretation lost

All other questions regarding DCMTK

Moderator: Moderator Team

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

PhotometricInterpretation lost

#1 Post by George »

Hello,

I am using img2dcm --input-format BMP --write-file -nsc --dataset-from documents/study-00000.series-00000.image-00000.dcm sample.bmp ./frame2large/header.dcm

but it did not maintain the photometric conversion. How do I do that? and all the other tags?

$ dcmdump documents/frames/header.dcm | grep 0028,0004
(0028,0004) CS [RGB] # 4, 1 PhotometricInterpretation

Best Regards
George

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: PhotometricInterpretation lost

#2 Post by Michael Onken »

Hi George,

what do you mean, what is your expectation on how Photometric Intepretation should be handled and what happened instead? What "all other tags"?

BR Michael

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: PhotometricInterpretation lost

#3 Post by George »

I mean the value of the photometric from --dataset-from documents/study-00000.series-00000.image-00000.dcm was not copied to ./frame2large/header.dcm

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: PhotometricInterpretation lost

#4 Post by George »

Also, I humbly add that if it is possible to tell me how to modify all the dicom tags without adjusting the one related to jpeg2000 compression because it seems using gdcmconv is not good enough or img to retain the dicom tags

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

Re: PhotometricInterpretation lost

#5 Post by Marco Eichelberg »

I mean the value of the photometric from --dataset-from documents/study-00000.series-00000.image-00000.dcm was not copied to ./frame2large/header.dcm
That is right. The photometric interpretation is derived from the image file that is converted to DICOM. It would make very little sense to specify that separately.

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: PhotometricInterpretation lost

#6 Post by George »

Yes, but how can I ensure the quality of the dicom picture that was extracted using the below code can be restored using img2dcm

Code: Select all

     
DicomImage *dicomImage = new DicomImage(dicomConverted.c_str(), CIF_UsePartialAccessToPixelData, frameNumber, 1 );
 if (dicomImage->getStatus() != EIS_Normal)
 {
     delete dicomImage;
}
            
 if (dicomImage->writeBMP(concat.c_str(), 8, 0) != 1)
 {
     delete dicomImage;
     return false;
 }
  
 

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: PhotometricInterpretation lost

#7 Post by Michael Onken »

I guess this is the same questions as in this thread (answered there), please don't cross-post your questions.
Michael

Post Reply

Who is online

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