Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Palette Color

46 views
Skip to first unread message

Mathieu Malaterre

unread,
Sep 25, 2008, 5:47:36 AM9/25/08
to
Hi there,

I am trying to convert a Segmented Palette to a regular Palette,
taking the following file as input:

http://cvs.creatis.insa-lyon.fr/viewvc/gdcmData/gdcm-US-ALOKA-16.dcm

I am generating the following file:

http://gdcm.sourceforge.net/thingies/gdcm-US-ALOKA-16-LUT.dcm

Using GDCM I can reread the image fine:

http://gdcm.sourceforge.net/thingies/gdcm-US-ALOKA-16-LUT.gdcm.png

but using dcmtk I am getting some errors that I do not understand,

WARNING: unsuitable value for 'BitsPerTableEntry' (16) ... assuming
8 !
WARNING: unsuitable value for 'BitsPerTableEntry' (16) ... assuming
8 !


and the image looks garbaged:

http://gdcm.sourceforge.net/thingies/gdcm-US-ALOKA-16-LUT.dcmtk.png

Thanks for any information.
-Mathieu

Joerg Riesmeier

unread,
Sep 25, 2008, 7:34:19 AM9/25/08
to
Mathieu,

> but using dcmtk I am getting some errors that I do not understand,

[...]


> and the image looks garbaged:

did you use the latest version of DCMTK (CVS snapshot)? Using the current
version, I could convert the image using dcm2pnm without any warnings and
with the expected result.

Probably the following entry in the CHANGES file is related to this issue:

=== CUT ===

**** Changes from 2007.03.16 (riesmeier)

- Fixed problem with wrong interpretation of the palette descriptor in
certain
cases. Now the BitsPerTableEntry stored in the LUT descriptor is used by
default. The previous behavior can be enabled using the ELM_CheckValue
mode.
Thanks to Ewald de Vries <removed_email_address> for the report.
Affects: dcmimgle/libsrc/diluptab.cc

=== CUT ===

The wrong interpretation in previous versions was the result of a
workaround
that is necessary for incorrectly encoded LUT descriptors ...

Regards,
Joerg

Mathieu Malaterre

unread,
Sep 25, 2008, 7:55:42 AM9/25/08
to

Thank you so much for report, I was getting ready to cut a new
release !

So just FYI TomoVision / PowerDicom / Irfanview and Dicomworks all
fails to
display properly the image. I will add that image to my gdcm DICOM
conformance dataset.

regards
-Mathieu

maty

unread,
Sep 26, 2008, 6:58:46 AM9/26/08
to
Joerg-san

Thank you for your infomation.
I have carefully read the infomation and I understand the bug in the
dcmtk 3.5.4.
By the way, there is one point I can't understand, it is the following
context;

> Now the BitsPerTableEntry stored in the LUT descriptor is used by
> default. The previous behavior can be enabled using the ELM_CheckValue
> mode.

Please let me know what BitsPerTableEntry means, and what
ELM_CheckValue mode means.
I would appreciate it if you give me the answers of the above
questions.

Thanks,

Maty

Joerg Riesmeier

unread,
Sep 26, 2008, 8:00:03 AM9/26/08
to
> Please let me know what BitsPerTableEntry means, and what
> ELM_CheckValue mode means.

'BitsPerTableEntry' refers to the third value of the LUT Descriptor
and ELM_CheckValue is explained in the source code documentation:

/** bits per table entry modes.
* Specifies whether the given value in the LUT descriptor is used.
*/
enum EL_BitsPerTableEntry
{
/// use given value
ELM_UseValue,
/// ignore given value, use auto detection
ELM_IgnoreValue,
/// check whether given value is consistent with LUT data
ELM_CheckValue
};

Btw, for further questions regarding DCMTK you should use the public
discussion forum at http://forum.dcmtk.org/ .

Regards,
Joerg Riesmeier

0 new messages