Pixel data sequence

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
angad
Posts: 112
Joined: Thu, 2010-02-18, 09:54

Re: Pixel data sequence

#16 Post by angad »

Hi ,

I got the problem.....This image is with High Bit value = 13(means max 16383 value).....Raw pixel value at side marker label("R") is 16384....

So in my code, after reading the pixel data(through findAndGet.... API), we are masking the pixel data...

Following is the code to mask :

case 15:
Pixel_Value = Pixel_Value & 0xFFFF; // bitwise AND
return (Pixel_Value);
break;

case 13:
Pixel_Value = Pixel_Value & 0x3FFF; // bitwise AND
return (Pixel_Value);
break;

and so on...

So , now the pixel value (16384) after masking becomes 0...

After removing the masking, side markers(labels) coming exactly fine in my viewer....

Now the question is : Should we mask pixel values or not after the high bit.... Is there any tag depending on its value can we decide either to mask it or not ?

Thanks in advance!!!!

Angad Nath

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Pixel data sequence

#17 Post by J. Riesmeier »

Good catch :-) ... but then the image is corrupted.

These are the relevant data element values:

Code: Select all

(0028,0100) US 16                                       #   2, 1 BitsAllocated
(0028,0101) US 14                                       #   2, 1 BitsStored
(0028,0102) US 13                                       #   2, 1 HighBit
(0028,0103) US 0                                        #   2, 1 PixelRepresentation
(0028,0106) US 0                                        #   2, 1 SmallestImagePixelValue
(0028,0107) US 16383                                    #   2, 1 LargestImagePixelValue
BitsStored=14 and PixelRepresentation=0 means that the raw pixel values (without modality LUT transformation) have to be in the range of 0..16383, which is apparently not the case.

angad
Posts: 112
Joined: Thu, 2010-02-18, 09:54

Re: Pixel data sequence

#18 Post by angad »

But then how all other viewers are showing this image(are they not masking the pixel value ? ).....

Also all the studies are coming with such side markers only....I can't treat all of them as Corrupted Dicoms. One tag is there in all the images(BurnedInAnnotation) and its value is "YES".. Is there any thing related to this tag....

Is there any work around for this ? Or should we talk to modality technician to correct it at their end ?

Thanks,
Angad Nath

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Pixel data sequence

#19 Post by J. Riesmeier »

You could fix the wrong encoding by the following program call:

Code: Select all

dcmodify -m BitsStored=15 -m HighBit=14 image.dcm
But then how all other viewers are showing this image(are they not masking the pixel value ? ).....
I don't know, but according to the DICOM standard, the respective bit does not belong to the pixel data (to be displayed). The creator was probably trying to use the maximum pixel value (so 16383 instead of 16384, which is also the value of LargestImagePixelValue).

Regarding BurnedInAnnotation, you should consult the DICOM standard. I think a value of "YES" is also incorrect because this flag "Indicates whether or not image contains sufficient burned in annotation to identify the patient and date the image was acquired."
Or should we talk to modality technician to correct it at their end ?
You should definitely report this issue to the vendor of the system!

Post Reply

Who is online

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