Dicom Image display in Green Color
Moderator: Moderator Team
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Dicom Image display in Green Color
Hi
When i load the US modality images in the viewer its displayed as GREEN Color.
(0028,0002) SamplesPerPixel 3
(0028,0004) PhotometricInterpretation RGB
(0028,0006) PlanarConfiguration 0
(0028,0008) NumberOfFrames 1
(0028,0010) Rows 900
(0028,0011) Columns 1200
(0028,0014) UltrasoundColorDataPresent 1
(0028,0100) BitsAllocated 8
(0028,0101) BitsStored 8
(0028,0102) HighBit 7
(0028,0103) PixelRepresentation 0
(0028,0301) BurnedInAnnotation YES
(0028,1052) RescaleIntercept 0
(0028,1053) RescaleSlope 1
Kindly help me to fix the issue and load the image as normal in the viewer
Appreciated your help. Thanks
When i load the US modality images in the viewer its displayed as GREEN Color.
(0028,0002) SamplesPerPixel 3
(0028,0004) PhotometricInterpretation RGB
(0028,0006) PlanarConfiguration 0
(0028,0008) NumberOfFrames 1
(0028,0010) Rows 900
(0028,0011) Columns 1200
(0028,0014) UltrasoundColorDataPresent 1
(0028,0100) BitsAllocated 8
(0028,0101) BitsStored 8
(0028,0102) HighBit 7
(0028,0103) PixelRepresentation 0
(0028,0301) BurnedInAnnotation YES
(0028,1052) RescaleIntercept 0
(0028,1053) RescaleSlope 1
Kindly help me to fix the issue and load the image as normal in the viewer
Appreciated your help. Thanks
Thanks
Guna
Guna
-
- DCMTK Developer
- Posts: 2550
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Dicom Image display in Green Color
Is the image JPEG compressed? Which viewer do you mean? What is the output of dcmj2pnm?
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Re: Dicom Image display in Green Color
Hi
Thanks for your response.
Yes, JPEG Lossless compression.
dcmj2pnm output below.
dcmj2pnm.exe I0010001 I0010001.bmp
E: can't change to unencapsulated representation for pixel data
E: can't determine 'PhotometricInterpretation' of decompressed image
E: mandatory attribute 'PhotometricInterpretation' is missing or can't be determined
F: Missing attribute
dcmj2pnm.exe I0010001 I0010001.jpg
E: can't change to unencapsulated representation for pixel data
E: can't determine 'PhotometricInterpretation' of decompressed image
E: mandatory attribute 'PhotometricInterpretation' is missing or can't be determined
F: Missing attribute
Looking forward your support.
Thanks for your response.
Yes, JPEG Lossless compression.
dcmj2pnm output below.
dcmj2pnm.exe I0010001 I0010001.bmp
E: can't change to unencapsulated representation for pixel data
E: can't determine 'PhotometricInterpretation' of decompressed image
E: mandatory attribute 'PhotometricInterpretation' is missing or can't be determined
F: Missing attribute
dcmj2pnm.exe I0010001 I0010001.jpg
E: can't change to unencapsulated representation for pixel data
E: can't determine 'PhotometricInterpretation' of decompressed image
E: mandatory attribute 'PhotometricInterpretation' is missing or can't be determined
F: Missing attribute
Looking forward your support.
Thanks
Guna
Guna
-
- DCMTK Developer
- Posts: 2550
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Dicom Image display in Green Color
Are you sure that the image is not JPEG 2000 Lossless compressed? What is the Transfer Syntax UID (e.g. output of "dcmdump <filename> +P TransferSyntaxUID")?
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Re: Dicom Image display in Green Color
Hi
dcmdump.exe I0010001 +P TransferSyntaxUID
(0002,0010) UI =JPEG2000LosslessOnly # 22, 1 TransferSyntaxUID
Sorry it was JPEG2000 Lossless.
Any Solution ? Thanks
Looking forward your support.
dcmdump.exe I0010001 +P TransferSyntaxUID
(0002,0010) UI =JPEG2000LosslessOnly # 22, 1 TransferSyntaxUID
Sorry it was JPEG2000 Lossless.
Any Solution ? Thanks
Looking forward your support.
-
- DCMTK Developer
- Posts: 2550
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Dicom Image display in Green Color
Unfortunately, the public DCMTK does not support the decompression of JPEG 2000 compressed images. This would require the DCMJP2K extension, which is not freely available and must be licensed separately.
However, I guess that the value for Photometric Interpretation (0028,0004) in your sample file is incorrect. Instead of "RGB", you should give "YBR_FULL" and "YBR_RCT" a try (see Table 8.2.4-1 in DICOM PS3.5). You could modify the value with DCMTK's dcmodify tool.
However, I guess that the value for Photometric Interpretation (0028,0004) in your sample file is incorrect. Instead of "RGB", you should give "YBR_FULL" and "YBR_RCT" a try (see Table 8.2.4-1 in DICOM PS3.5). You could modify the value with DCMTK's dcmodify tool.
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Re: Dicom Image display in Green Color
Hi
Input image - Jpeg Lossless - Photometric Interpretation (0028,0004) - RGB and samplesperpixel - 3
I am importing input image to my application its save as output image as dicom image(Jpeg2000 Lossless and Photometric Interpretation (0028,0004) - RGB and samplesperpixel - 3)
When i try to load the image in the viewer i am saving the output image as temporary dicom image and load the temporary dicom image into viewer, (temporary image compression type LittleEndianExplict and Photometric Interpretation (0028,0004) - RGB and samplesperpixel - 3)
In this case i am getting green display in the viewer. the above case based on your suggestion, Shall i change the Photometric Interpretation (0028,0004) - RGB to Photometric Interpretation (0028,0004) - YBR_FULL ? Is it correct way of doing that?. Thanks
Looking forward your support.
My WorkFlowI guess that the value for Photometric Interpretation (0028,0004) in your sample file is incorrect. Instead of "RGB", you should give "YBR_FULL" and "YBR_RCT" a try (see Table 8.2.4-1 in DICOM PS3.5). You could modify the value with DCMTK's dcmodify tool.
Input image - Jpeg Lossless - Photometric Interpretation (0028,0004) - RGB and samplesperpixel - 3
I am importing input image to my application its save as output image as dicom image(Jpeg2000 Lossless and Photometric Interpretation (0028,0004) - RGB and samplesperpixel - 3)
When i try to load the image in the viewer i am saving the output image as temporary dicom image and load the temporary dicom image into viewer, (temporary image compression type LittleEndianExplict and Photometric Interpretation (0028,0004) - RGB and samplesperpixel - 3)
In this case i am getting green display in the viewer. the above case based on your suggestion, Shall i change the Photometric Interpretation (0028,0004) - RGB to Photometric Interpretation (0028,0004) - YBR_FULL ? Is it correct way of doing that?. Thanks
Looking forward your support.
-
- DCMTK Developer
- Posts: 2550
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Dicom Image display in Green Color
I'm not sure whether the wrong color space conversion (or inconsistent value for PhotometricInterpretation) already happens during the first step ("Input image - Jpeg Lossless - ...") but you might want to check this out, assuming that you have access to the intermediate image files. An example call would be "dcmodify -m PhotometricInterpretation=YBR_FULL <filename>" (please note that the input file is overwritten, a backup is created).
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Re: Dicom Image display in Green Color
Okay.
Thanks for the support. Will come back to with change the RGB to YBR_FULL method and update you.
Once again thanks.
Thanks for the support. Will come back to with change the RGB to YBR_FULL method and update you.
Once again thanks.
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Re: Dicom Image display in Green Color
Hi
After i changed PhotometricInterpretation vaue RGB to YBR_FULL with jpeg2000 lossless compression i am getting 1 image as green color out of 30 images.
Jpeg 2000 Lossless Images - photometric interpretation - YBR_FULL - 1 image displayed green out of 30 images.
Any reason ?
Looking forward your support.
After i changed PhotometricInterpretation vaue RGB to YBR_FULL with jpeg2000 lossless compression i am getting 1 image as green color out of 30 images.
Jpeg 2000 Lossless Images - photometric interpretation - YBR_FULL - 1 image displayed green out of 30 images.
Any reason ?
Looking forward your support.
-
- DCMTK Developer
- Posts: 2550
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Dicom Image display in Green Color
Of course, changing the value of Photometric Interpretation only makes sense if the "original" value was wrong (and the new value is correct). In other words: the right solution depends on the particular image.
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Re: Dicom Image display in Green Color
Hi
Thanks much.
Shall i share the my sample image(with anonymozed) which are displayed in green color with you? If yes, how can i share the files with you by email or ?
Looking forward your reply. Thanks
Thanks much.
Shall i share the my sample image(with anonymozed) which are displayed in green color with you? If yes, how can i share the files with you by email or ?
Looking forward your reply. Thanks
-
- DCMTK Developer
- Posts: 2550
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Dicom Image display in Green Color
If you think there is a bug in the DCMTK that results in this "green image", please send your sample file by email to bugs/at/dcmtk/dot/org.
-
- Posts: 41
- Joined: Tue, 2013-07-23, 12:15
- Location: Chennai, India
Re: Dicom Image display in Green Color
Hi
based on your request i have shared the images via email. Kindly look in to that images and do the needful. Thanks
based on your request i have shared the images via email. Kindly look in to that images and do the needful. Thanks
-
- DCMTK Developer
- Posts: 2550
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Dicom Image display in Green Color
Thank you for the sample files.
My sentence started with "If you think there is a bug in the DCMTK that results in this "green image"...". This does not seem to be the case: both images are uncompressed and the value for PhotometricInterpretation is wrong (should be "YBR_FULL" instead of "RGB"). I fixed this by calling "dcmodify -m PhotometricInterpretation=YBR_FULL <filename>" and tested the result with "dcm2pnm <filename>.dcm <filename>.pnm".
My sentence started with "If you think there is a bug in the DCMTK that results in this "green image"...". This does not seem to be the case: both images are uncompressed and the value for PhotometricInterpretation is wrong (should be "YBR_FULL" instead of "RGB"). I fixed this by calling "dcmodify -m PhotometricInterpretation=YBR_FULL <filename>" and tested the result with "dcm2pnm <filename>.dcm <filename>.pnm".
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest