bug in DcmPixelData::hasRepresentation ?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Roelant
Posts: 12
Joined: Thu, 2005-04-21, 14:42
Location: Nijmegen, the Netherlands

bug in DcmPixelData::hasRepresentation ?

#1 Post by Roelant »

I had some unexpected behaviour of my software which may be caused by a bug in DcmPixelData::hasRepresentation:

DcmPixelData::hasRepresentation checks if an appropriate representation of the pixel data is available. However, since DcmPixelData::findConformingEncapsulatedRepresentation returns either EC_Normal or EC_RepresentationNotFound

the code (in DcmPixelData::hasRepresentation):

Code: Select all

else if (repTypeSyn.isEncapsulated())
        return findConformingEncapsulatedRepresentation(
            repTypeSyn, repParam, found) != EC_Normal;
will return TRUE if an encapsulated representation is not available (!=EC_Normal) while required.

Best regards,
Roelant.

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

#2 Post by Marco Eichelberg »

This looks like a bug indeed. It seems that DcmPixelData::hasRepresentation is not used anywhere in the toolkit (except for DcmDataset::hasRepresentation, which is not used anywhere either), so this bug may very well never have surfaced. If changing the code (replacing the "!= EC_Normal" by ".good()" ) fixes your application, please let me know and I will also fix this in our code repository.

Post Reply

Who is online

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