Looking for JPEG2000 support - DICOM
This is a discussion on Looking for JPEG2000 support - DICOM ; Hello,
I have been finally fooling around and writting jpeg2000 images(1)
using GDCM. But the early results are not very satisfying:
- TomoVision crash,
- DicomWorks display noisy images,
- dcmtk (dcmdump) cannot parse my images (2),
- dciodvfy report ...
-
Looking for JPEG2000 support
Hello,
I have been finally fooling around and writting jpeg2000 images(1)
using GDCM. But the early results are not very satisfying:
- TomoVision crash,
- DicomWorks display noisy images,
- dcmtk (dcmdump) cannot parse my images (2),
- dciodvfy report funny result (3)
Are there any other tools I can get my hand on to check that my DICOM
are indeed -somewhat- ok ?
Thanks for suggestions
Mathieu
(1)
http://www.creatis.insa-lyon.fr/~malaterre/gdcm/jpeg/
(2)
$ dcmdump /tmp/testacr-j2k.dcm
DcmItem: Non-standard VR ' encountered while parsing attribute
(0008,0012), assuming 2 byte length field
DcmItem: Non-standard VR '07' encountered while parsing attribute
(3032,3630), assuming 2 byte length field
DcmElement: Unknown Tag & Data(3032,3630) larger (13616) that remaining
bytes in file
dcmdump: error: Invalid Stream: reading file: /tmp/testacr-j2k.dcm
(2)
$ dciodvfy /tmp/testacr-j2k.dcm
(0x0008,0x0012) DA Instance Creation Date - Warning - Explicit value
representation doesn't match data dictionary; Explicit > Dictionary
(0x0008,0x0012) ? Warning - Value representation unsupported by this
implementation - Error - Dicom dataset read failed
Error - Information Object Not found
-
Re: Looking for JPEG2000 support
Hi Mathieu
It looks fine to me.
I tried the testacr-j2k.dcm file from the web site
you listed, both with my dicom3tools and my pixelmed
tools, and had no problem with it (other than that
it was only 8 bits deep and looks like crap when
I display it after decompressing with the JIIO
codecs, but that is not a DICOM encoding issue).
Perhaps you are not using a current version of my
dicom3tools.
Try also the com.pixelmed.display.DicomImageViewer
(with the appropriate JIIO codecs installed).
It also loads and displays fine in Osirix, whether
the Papyrus or dcmtk frameworks are selected.
For example:
% dcfile testacr-j2k.dcm
Meta: UID 1.2.840.10008.1.2.1
Meta: Description "Explicit VR Little Endian"
Meta: ByteOrder Little
Meta: VR Explicit
Meta: Encapsulated No
Data: UID 1.2.840.10008.1.2.4.90
Data: Description "JPEG 2000 Lossless Only"
Data: ByteOrder Little
Data: VR Explicit
Data: Encapsulated Yes
% dciodvfy testacr-j2k.dcm
SCImage
% dcdump testacr-j2k.dcm
(0x0002,0x0000) UL File Meta Information Group Length VR= VL=<0x0004> [0x000000e4]
(0x0002,0x0001) OB File Meta Information Version VR= VL=<0x0002> [0x00,0x01]
(0x0002,0x0002) UI Media Storage SOP Class UID VR= VL=<0x001a> <1.2.840.10008.5.1.4.1.1.7>
(0x0002,0x0003) UI Media Storage SOP Instance UID VR= VL=<0x003a>
<1.2.826.0.1.3680043.2.1143.55594096315.20060705223 74480484>
(0x0002,0x0010) UI Transfer Syntax UID VR= VL=<0x0016> <1.2.840.10008.1.2.4.90>
(0x0002,0x0012) UI Implementation Class UID VR= VL=<0x003a>
<1.2.826.0.1.3680043.2.1143.55594096315.20060705223 74480439>
(0x0002,0x0013) SH Implementation Version Name VR= VL=<0x000a>
(0x0008,0x0012) DA Instance Creation Date VR= VL=<0x0008> <20060705>
(0x0008,0x0013) TM Instance Creation Time VR= VL=<0x0006> <223744>
(0x0008,0x0016) UI SOP Class UID VR= VL=<0x001a> <1.2.840.10008.5.1.4.1.1.7>
(0x0008,0x0018) UI SOP Instance UID VR= VL=<0x003a>
<1.2.826.0.1.3680043.2.1143.55594096315.20060705223 74480484>
(0x0008,0x0020) DA Study Date VR= VL=<0x0008> <20060705>
(0x0008,0x0030) TM Study Time VR= VL=<0x0006> <223744>
(0x0008,0x0050) SH Accession Number VR= VL=<0x0000> <>
(0x0008,0x0060) CS Modality VR= VL=<0x0002>
(0x0008,0x0064) CS Conversion Type VR= VL=<0x0004>
(0x0008,0x0070) LO Manufacturer VR= VL=<0x000c>
(0x0008,0x0080) LO Institution Name VR= VL=<0x000e>
(0x0008,0x0090) PN Referring Physician's Name VR= VL=<0x0000> <>
(0x0010,0x0010) PN Patient's Name VR= VL=<0x000c>
(0x0010,0x0020) LO Patient's ID VR= VL=<0x0008>
(0x0010,0x0030) DA Patient's Birth Date VR= VL=<0x0000> <>
(0x0010,0x0040) CS Patient's Sex VR= VL=<0x0000> <>
(0x0018,0x1164) DS Imager Pixel Spacing VR= VL=<0x0008> <1.0\1.0 >
(0x0020,0x000d) UI Study Instance UID VR= VL=<0x003a>
<1.2.826.0.1.3680043.2.1143.55594096315.20060705223 74480478>
(0x0020,0x000e) UI Series Instance UID VR= VL=<0x003a>
<1.2.826.0.1.3680043.2.1143.55594096315.20060705223 74480479>
(0x0020,0x0010) SH Study ID VR= VL=<0x0000> <>
(0x0020,0x0011) IS Series Number VR= VL=<0x0000> <>
(0x0020,0x0013) IS Instance (formerly Image) Number VR= VL=<0x0000> <>
(0x0020,0x0020) CS Patient Orientation VR= VL=<0x0004>
(0x0020,0x0037) DS Image Orientation (Patient) VR= VL=<0x000c> <1\0\0\0\1\0 >
(0x0028,0x0002) US Samples per Pixel VR= VL=<0x0002> [0x0001]
(0x0028,0x0004) CS Photometric Interpretation VR= VL=<0x000c>
(0x0028,0x0010) US Rows VR= VL=<0x0002> [0x0200]
(0x0028,0x0011) US Columns VR= VL=<0x0002> [0x0200]
(0x0028,0x0030) DS Pixel Spacing VR= VL=<0x0008> <1.0\1.0 >
(0x0028,0x0100) US Bits Allocated VR= VL=<0x0002> [0x0008]
(0x0028,0x0101) US Bits Stored VR= VL=<0x0002> [0x0008]
(0x0028,0x0102) US High Bit VR= VL=<0x0002> [0x0007]
(0x0028,0x0103) US Pixel Representation VR= VL=<0x0002> [0x0000]
(0x7fe0,0x0000) UL Pixel Data Group Length VR= VL=<0x0004> [0x00002d94]
(0x7fe0,0x0010) OX Pixel Data VR= VL=<0x40000>
% dctoraw testacr-j2k.dcm /tmp/crap
******** Parameters ... ********
(0x0028,0x0010) US Rows VR= VL=<0x0002> [0x0200]
(0x0028,0x0011) US Columns VR= VL=<0x0002> [0x0200]
(0x0028,0x0002) US Samples per Pixel VR= VL=<0x0002> [0x0001]
(0x0028,0x0103) US Pixel Representation VR= VL=<0x0002> [0x0000]
(0x0028,0x0004) CS Photometric Interpretation VR= VL=<0x000c>
(0x0028,0x0100) US Bits Allocated VR= VL=<0x0002> [0x0008]
(0x0028,0x0101) US Bits Stored VR= VL=<0x0002> [0x0008]
(0x0028,0x0102) US High Bit VR= VL=<0x0002> [0x0007]
Encapsulated Yes
ByteOrder Little
UnencapsulatePixelData::read Item Tag length=0x4 (4 dec)
UnencapsulatePixelData::read Item Tag length=0x2d6c (11628 dec)
% ls -l /tmp/crap
-rw-r--r-- 1 dclunie wheel 11628 Jul 6 11:40 /tmp/crap
[helgray:~/Desktop/Downloads] dclunie% jpegdump
Offset 0x0000 Marker 0xff4f SOC Start of codestream
Offset 0x0002 Marker 0xff51 SIZ Image and tile size length variable 0x29
Offset 0x002d Marker 0xff52 COD Coding style default length variable 0x0c
Offset 0x003b Marker 0xff5c QCD Quantization default length variable 0x13
Offset 0x0050 Marker 0xff64 COM Comment (JPEG 2000) length variable 0x23
Offset 0x0075 Marker 0xff90 SOT Start of tile-part length variable 0x0a
Offset 0x0081 Marker 0xff93 SOD Start of data
Offset 0x2d69 Fill byte 0xfff
Offset 0x2d6a Marker 0xffd9 EOI End of Image (JPEG 2000 EOC End of codestream)
End of file
Mathieu Malaterre wrote:
> Hello,
>
> I have been finally fooling around and writting jpeg2000 images(1)
> using GDCM. But the early results are not very satisfying:
> - TomoVision crash,
> - DicomWorks display noisy images,
> - dcmtk (dcmdump) cannot parse my images (2),
> - dciodvfy report funny result (3)
>
> Are there any other tools I can get my hand on to check that my DICOM
> are indeed -somewhat- ok ?
>
> Thanks for suggestions
> Mathieu
>
> (1)
> http://www.creatis.insa-lyon.fr/~malaterre/gdcm/jpeg/
> (2)
> $ dcmdump /tmp/testacr-j2k.dcm
>
>
> DcmItem: Non-standard VR ' encountered while parsing attribute
> (0008,0012), assuming 2 byte length field
> DcmItem: Non-standard VR '07' encountered while parsing attribute
> (3032,3630), assuming 2 byte length field
> DcmElement: Unknown Tag & Data(3032,3630) larger (13616) that remaining
> bytes in file
> dcmdump: error: Invalid Stream: reading file: /tmp/testacr-j2k.dcm
>
> (2)
> $ dciodvfy /tmp/testacr-j2k.dcm
>
>
> (0x0008,0x0012) DA Instance Creation Date - Warning - Explicit value
> representation doesn't match data dictionary; Explicit > Dictionary
>
> (0x0008,0x0012) ? Warning - Value representation unsupported by this
> implementation - Error - Dicom dataset read failed
> Error - Information Object Not found
>
-
Re: Looking for JPEG2000 support
David Clunie wrote:
> Hi Mathieu
>
> It looks fine to me.
>
> I tried the testacr-j2k.dcm file from the web site
> you listed, both with my dicom3tools and my pixelmed
> tools, and had no problem with it (other than that
> it was only 8 bits deep and looks like crap when
> I display it after decompressing with the JIIO
> codecs, but that is not a DICOM encoding issue).
Yeah I know. I never really understood how this image was
acquired/stored, but there was definitely something wrong. That's the
easiest image to read so it's good for debugging 
http://cvs.creatis.insa-lyon.fr/view...v=1.1&view=log
Anyway I tried again today and everything seems to be working fine. I
must have done something wrong yesterday. Sorry for the noise.
I will try again today and summarize my conclusion here:
http://gdcm.sourceforge.net/wiki/ind...pport_in_DICOM
Thanks for the detailed steps,
Mathieu