x86_64 + JPEG: Error: Pixel representation cannot be changed

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mask
Posts: 5
Joined: Fri, 2004-11-19, 20:06

x86_64 + JPEG: Error: Pixel representation cannot be changed

#1 Post by mask » Tue, 2006-01-10, 12:37

With the current V3.5.4, despite following the FAQ#20 viewtopic.php?t=26&start=0&postdays=0&p ... highlight=
I always get the cannot change to unencapsulated representation error when opening JPEG-decoded dcm files.

Even when using dcmdjpeg I get a similar error:

Code: Select all

./dcmdjpeg -v spy1_dicom_H70h_069.dcm foo.bar
reading input file spy1_dicom_H70h_069.dcm
decompressing file
Error: Pixel representation cannot be changed: decompressing file: spy1_dicom_H70h_069.dcm
The file is JPEG Lossless:

Code: Select all

(0002,0010) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction #  22, 1 TransferSyntaxUID
This only occurs on 64-bit linux systems. Anything I can do?

- Martin

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

#2 Post by Marco Eichelberg » Fri, 2006-01-13, 12:46

Could you send a sample file by e-mail to <dicom at offis dot de>? It is difficult to say what might be going wrong here without reproducing the problem locally. This might be a problem of the x86_64 port, a general bug or simply an incorrect DICOM image. The error message "representation cannot be changed" only means that the decompressor class has refused the object for whatever reason.

mask
Posts: 5
Joined: Fri, 2004-11-19, 20:06

#3 Post by mask » Fri, 2006-01-13, 15:24

sample file sent.

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

#4 Post by Marco Eichelberg » Tue, 2006-01-17, 10:27

We have been unable to reproduce the bug. On a x86_64 machine with Fedora Core 4 and gcc 4.0, dcmdjpeg decompressed the file just fine, without any error message.

mask
Posts: 5
Joined: Fri, 2004-11-19, 20:06

#5 Post by mask » Tue, 2006-01-17, 11:55

Thanks for the info. I was able to isolate the problem a bit more.

I was running ./configure --disable-threads - this broke the jpeg codec. Without the --disable-threads it works.

BTW: I am using gentoo with gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8).

anba
DCMTK Tester
Posts: 4
Joined: Wed, 2004-11-10, 19:09

#6 Post by anba » Wed, 2006-01-18, 21:05

mask wrote: I was running ./configure --disable-threads - this broke the jpeg codec. Without the --disable-threads it works.
Marco asked me to look after this and with --disable-threads I am able to reproduce the problem on my Fedora 4 x86_64 with gcc 4.0.2. A fast fix would be to change every occurence of

Code: Select all

_REENTRANT
in dcmdata/libsrc/dccodec.cc with

Code: Select all

WITH_THREADS
Recompile everthing
(make clean all in the dcmtk source root directory) and it should work.

Andreas
Andreas Barth

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#7 Post by Jörg Riesmeier » Mon, 2010-10-04, 15:27

This issue is now fixed (see commit). Thanks again for both the report and suggested fix.

Post Reply

Who is online

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