DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Sat, 2017-05-27, 09:19

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu, 2012-12-13, 11:28 
Offline

Joined: Sun, 2012-10-07, 19:39
Posts: 1
Hi,

It is the first time, that I have to access the the internal pixel data. And after reading some forum threads, I know now, that I have to use the interData. But I have some trouble with the Array returned by getInterData()->getData(). I am quite sure, that the function should return a pointer to Uint16 (at least getRepresentation() gave me this information). But in my case, the returned value is NULL. I tried to allocate the memory first, but it hadnt any effect and I still got the same error. I tried to use the documentation, but couldnt solve my problem.

Sorry, I know, that it's a stupid question, but i couldnt solve it on my own.

Code:
        DicomImage *image = new DicomImage(filename);
   if (image->getStatus() != EIS_Normal){
      cerr << filename << endl;
   }

   cerr<< "interdata, representation: " << image->getInterData()->getRepresentation() << endl;

   unsigned short* p = NULL;                    //new unsigned short[image->getInterData()->getCount()];
   const DiPixel* interData=image->getInterData();
   p =(unsigned short*)interData->getData();
 



Best regards and thanks a lot for your help,

Sabine

Edit:
I found my mistake. It was really quite stupid.


Best regards,

Sabine


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group