JPEG2000 Help(Icon Image Sequence issue)

All other questions regarding DCMTK

Moderator: Moderator Team

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

JPEG2000 Help(Icon Image Sequence issue)

#1 Post by angad »

Hi All,

I have tried to implement JPEG 2000 compression logic using OPENJPEG library.

For most of the cases, it worked fine.

But for studies with IconImageSequence , its crashing.

FOllowing is the ImageIconSequence tag :

(0028,0002) US 1 # 2, 1 SamplesPerPixel
(0028,0004) CS [PALETTE COLOR] # 14, 1 PhotometricInterpretation

(0028,0010) US 64 # 2, 1 Rows
(0028,0011) US 64 # 2, 1 Columns
(0028,0100) US 8 # 2, 1 BitsAllocated
(0028,0101) US 8 # 2, 1 BitsStored
(0028,0102) US 7 # 2, 1 HighBit
(0028,0103) US 0 # 2, 1 PixelRepresentation
(0028,1101) US 256\0\8 # 6, 3 RedPaletteColorLookupTableDescriptor
(0028,1102) US 256\0\8 # 6, 3 GreenPaletteColorLookupTableDescriptor
(0028,1103) US 256\0\8 # 6, 3 BluePaletteColorLookupTableDescriptor
(0028,1201) OW 0100\0302\0504\0706\0908\0b0a\0d0c\0f0e\1110\1312\1514\1716\1918... # 256, 1 RedPaletteColorLookupTableData
(0028,1202) OW 0100\0302\0504\0706\0908\0b0a\0d0c\0f0e\1110\1312\1514\1716\1918... # 256, 1 GreenPaletteColorLookupTableData
(0028,1203) OW 0100\0302\0504\0706\0908\0b0a\0d0c\0f0e\1110\1312\1514\1716\1918... # 256, 1 BluePaletteColorLookupTableData
(7fe0,0010) OW 2121\2121\2121\2121\2221\2221\2121\2122\2222\2221\2221\2121\2121... # 4096, 1 PixelData

As you can see, sample per pixel coming is 1 where as photo metric interpretation is PALETTE COLOR. Is it correct ?

I have one very basic question : Why dcmtk is compressing/decompressing all the pixel data tags ?

Should we compress / decompress Icon Image Sequence Pixel data tag or not ? ( or any other private sequence with pixel data tag)

Is it required to compress all the pixel data tags according to DICOM standards ?

If not, can i change following code here :

In dcdataset.cc file, while searching for DCM_PixelData tag:

while(search(DCM_PixelData, resultStack, ESM_afterStackTop, OFTrue).good() && l_error.good())

So, Can i change OfTrue to OfFalse in above statement.

while(search(DCM_PixelData, resultStack, ESM_afterStackTop, OFFalse).good() && l_error.good())

Any help will be highly appreciated.

Thanks,
Angad Nath

annapurne.s
Posts: 23
Joined: Wed, 2024-01-31, 10:42

Re: JPEG2000 Help(Icon Image Sequence issue)

#2 Post by annapurne.s »

Hi, can you please share the code for convert JPEG2000 image to DICOM file with openjpeg support. I tried lot but it results the pixel issue. Are you able to help me please, Thanks.

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

Re: JPEG2000 Help(Icon Image Sequence issue)

#3 Post by Marco Eichelberg »

  • Within the Icon Image Sequence, you will find an image that is either monochrome or palette color. In both cases, Samples per Pixel will be one.
  • As far as I remember, the encoder is permitted to either compress the icon image, or to leave it uncompressed. Decoders need to be able to handle both.
  • I think that the DICOM standard is silent on Pixel Data occuring elsewhere. In a standard DICOM IOD, this does not happen. If the pixel data is somewhere within a private sequence, well then you are outside the scope of the standard.

Post Reply

Who is online

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