DicomImage problem with codecs

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
juan_7_89
Posts: 15
Joined: Sat, 2013-06-15, 05:52

DicomImage problem with codecs

#1 Post by juan_7_89 » Tue, 2014-11-11, 21:20

Hello. I'm having problems opening some Dicom Images.

This is my code:

Code: Select all

	DJDecoderRegistration::registerCodecs();
	if(!larchivos.empty()){
		string nombre_archivo = *(larchivos.begin());
		FileFormat fileFormat;
		OFCondition status = fileFormat.loadFile(nombre_archivo.c_str());
		if (status.good()){	
			DicomImage img(nombre_archivo.c_str());
			this->width=img.getWidth();
			this->height=img.getHeight();
		}
	}
	DJDecoderRegistration::cleanup();
	return;
And im getting this error:

Code: Select all

E: can't change to unencapsulated representation for pixel data
E: can't determine 'PhotometricInterpretation' of decompressed image
E: mandatory attribute 'PhotometricInterpretation' is missing or can't be determined
I know its something with the codecs registrations but i cannot figure out what is it.

I've tried with DJLSDecoderRegistration::registerCodecs() instead of DJDecoderRegistration::registerCodecs(). But i get this error:

Code: Select all

djcodecd.cc:(.text+0x1323): undefined reference to `JpegLsDecode'
djcodecd.cc:(.text+0x2210): undefined reference to `JpegLsReadHeader'
Do i have to install something else?

Thank you!

J. Riesmeier
DCMTK Developer
Posts: 2284
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DicomImage problem with codecs

#2 Post by J. Riesmeier » Wed, 2014-11-12, 14:04

First of all, you should check which transfer syntax is used for the particular DICOM image(s).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest