Hi,
I'm trying to read an US image that has the YBR_FULL_422 photometric type, my goal is to obtain the pixels converted to a standard RGB representation, and I'm having a hard time.
First it's not too clear if I'm supported to use the DicomImage class or DiColorImage. In trying to use DicomImage, I cannot succeed in reading the pixels by using getInterData.
Trying to use the DiColorImage class, I don't understand even the constructor of the class.
Can someone point me to the right direction to achieve this?
Thanks
Reading YBR_FULL_422 color image
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Reading YBR_FULL_422 color image
Maybe, the following is helpful...
First of all, you should use the interface class DicomImage instead of the internal class DiColorImage.
Then, the internal representation of color images is usually RGB (independent of the input color model).
Finally, why do you want to access the internal representation of the pixel data at all? What is the use case?
By the way, the photometric interpretation "YBR_FULL_422" is typically used for compressed DICOM images, so the DicomImage class will usually not "see" it
(because the underlying "dcmjpeg" module creates an uncompressed RGB representation from the input data).
First of all, you should use the interface class DicomImage instead of the internal class DiColorImage.
Then, the internal representation of color images is usually RGB (independent of the input color model).
Finally, why do you want to access the internal representation of the pixel data at all? What is the use case?
By the way, the photometric interpretation "YBR_FULL_422" is typically used for compressed DICOM images, so the DicomImage class will usually not "see" it
(because the underlying "dcmjpeg" module creates an uncompressed RGB representation from the input data).
Re: Reading YBR_FULL_422 color image
It is somewhat helpful, but I'm still blocked.
Ok for using DicomImage, that's what I thought but the documentation is not very clear on this.
I'm trying to obtain the "raw" pixels are we do our own rendering of images, so I want to avoid VOIs, window leveling, etc being applied to the pixels, but I do want the pixels in RGB.
Ok for using DicomImage, that's what I thought but the documentation is not very clear on this.
I'm trying to obtain the "raw" pixels are we do our own rendering of images, so I want to avoid VOIs, window leveling, etc being applied to the pixels, but I do want the pixels in RGB.
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Reading YBR_FULL_422 color image
For color images, there are no "VOIs, window leveling" etc. At least the dcmimgle/dcmimage modules do not support such transformations (for color images). So, for color images DicomImage usually gives you RGB pixel data as the rendered output.
Anyway, if you are not interested in the rendered output of a DICOM image, you should not use these modules at all:
The following excerpt is from the documentation of the main interface class DicomImage:
Anyway, if you are not interested in the rendered output of a DICOM image, you should not use these modules at all:
The following excerpt is from the documentation of the main interface class DicomImage:
Code: Select all
/*
* [...]
* Interface class for dcmimgle/dcmimage module.
* The main purpose of these modules is image display.
* [...]
*/
Re: Reading YBR_FULL_422 color image
OK so how do I get the RGB pixels from such an image then?
I'll try it and see if it fits our needs.
I'll try it and see if it fits our needs.
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Reading YBR_FULL_422 color image
Just use one of the DicomImage::getOutputData() methods.
Who is online
Users browsing this forum: No registered users and 1 guest