Problem when using DcmImage in Ubuntu

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
buiductoan
Posts: 24
Joined: Thu, 2013-01-10, 16:40

Problem when using DcmImage in Ubuntu

#1 Post by buiductoan »

Hello everybody, I am using DCMTK library in Ubuntu. This is my code to get Pixeldata of a DICOM file. But the output notifies

Code: Select all

E: can't load data dictionary
And this is my code

Code: Select all

        OFString 	imgPath_ ="/home/abc/Desktop/002.dcm" //path file
        DicomImage *image=new DicomImage(imgPath_.c_str());//Can not read file
	if (image != NULL)
 	{
 	  if (image->getStatus() == EIS_Normal)
	  {
		Uint16* volumeData_ = (Uint16 *)(image->getOutputData(16/* bits per sample */));
 		
 	  } 
 	  else
 		cerr << "Error: cannot load DICOM image (" << DicomImage::getString(image->getStatus()) << ")" << endl;
 	  if(image != NULL) delete image;
 	}
	
	return true;
	}
I am using ubuntu 12.04 and newest DCMTK . What is my happend? Can you resolve help me?

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

Re: Problem when using DcmImage in Ubuntu

#2 Post by J. Riesmeier »

This is #7 in the FAQ.

Post Reply

Who is online

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