Stack bug in DcmPixelData::getDecompressedColorModel()?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
csmeso
Posts: 17
Joined: Mon, 2006-06-19, 15:21

Stack bug in DcmPixelData::getDecompressedColorModel()?

#1 Post by csmeso »

I have a strange problem:

In the beginning of my application, I register some decoders:

Code: Select all

		DJDecoderRegistration::registerCodecs();
		DcmRLEDecoderRegistration::registerCodecs();
after that,
&DcmCodecList::registeredCodecs = 0x065fc370 (example), and the list contains 7 elements

...
later in the program, I try to create a DicomImage with a RLE compressed Ultrasound Multiframe image:

Code: Select all

DicomImage image(m_pDataset, m_xfer, CIF_UsePartialAccessToPixelData, 0,10);
The constructor of DicomImage calls

Code: Select all

DiDocument::convertPixelData()
If I check &DcmCodecList::registeredCodecs here, everything is still ok (address and 7 elements in the list).

DiDocument::convertPixelData() then calls

Code: Select all

                OFCondition status = PixelData->getDecompressedColorModel(OFstatic_cast(DcmItem *, Object), PhotometricInterpretation);
When I jump into DcmPixelData::getDecompressedColorModel(), and check again, I get:

&DcmCodecList::registeredCodecs = 0x05cc3ff8, and the list is empty. Therefore, image.getStatus() fails.

If I try the same without the CIF_UsePartialAccessToPixelData, it works.

May this be a bug in the TcmTK???

FYI: I use Visual Studio 6; if I compile the toolkit as shared library (DLL), the problem doesn't occur. I use DcmTk snapshot from 15.05.2012

csmeso
Posts: 17
Joined: Mon, 2006-06-19, 15:21

Re: Stack bug in DcmPixelData::getDecompressedColorModel()?

#2 Post by csmeso »

I solved it:
the Library was called from 2 DLLs which both statically linked the DcmTK. This is not allowed because the global data is created twice then.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest