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
Pixel data sequence
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Pixel data sequence
Good catch ... but then the image is corrupted.
These are the relevant data element values:
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.
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
Re: Pixel data sequence
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
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
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Pixel data sequence
You could fix the wrong encoding by the following program call:
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."
Code: Select all
dcmodify -m BitsStored=15 -m HighBit=14 image.dcm
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).But then how all other viewers are showing this image(are they not masking the pixel value ? ).....
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."
You should definitely report this issue to the vendor of the system!Or should we talk to modality technician to correct it at their end ?
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest