DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Sun, 2018-01-21, 09:37

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon, 2017-12-11, 13:27 
Offline

Joined: Mon, 2017-12-11, 12:50
Posts: 5
Hello,

Thank you for accepting me to register here.

I started to use DCMTK to create a DICOM viewer. I tried the code that you give as an example of DcmSCU (http://support.dcmtk.org/redmine/projects/dcmtk/wiki/Howto_DcmSCU). All seem to work, since I'm able to see the number of studies available in http://www.dicomserver.co.uk, but when I want to verify that there is a study instance ID (see below the code), it doesn't work.

Here is the entire code, after the number of studies available:

Code:
while (study != findResponses.end() && result.good())
  {
    // be sure we are not in the last response which does not have a dataset
    if ( (*study)->m_dataset != NULL)
    {
      OFString studyInstanceUID;
      result = (*study)->m_dataset->findAndGetOFStringArray(DCM_StudyInstanceUID, studyInstanceUID);
      // only try to get study if we actually have study instance uid, otherwise skip it
      if (result.good()) /* ---This condition is never true--- */
      {
        req.putAndInsertOFStringArray(DCM_StudyInstanceUID, studyInstanceUID);
        // fetches all images of this particular study
        result = scu.sendMOVERequest(presID, MOVEAPPLICATIONTITLE, &req, NULL /* we are not interested into responses*/);
        if (result.good())
        {
          DCMNET_INFO("Received study #" << std::setw(7) << studyCount << ": " << studyInstanceUID);
          studyCount++;
        }
      }
    }
    study++;
  }


Just to be clear, I also tried with other tags (like PatientName, for example), but it doesn't work, and always with the same error: "Tag not found". I tried with an other PACS, at work, and again, it's the same problem... And the findAndGetOFString function doesn't work neither.

Thanks,
ChoCChoK.


Top
 Profile  
 
PostPosted: Mon, 2017-12-11, 20:20 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1889
Location: Oldenburg, Germany
Of course, you have to query the PACS for Patient's Name (0010,0010) if you want to get it from the response dataset(s). The referenced example does not query for it.


Top
 Profile  
 
PostPosted: Mon, 2017-12-11, 22:07 
Offline

Joined: Mon, 2017-12-11, 12:50
Posts: 5
Hi,

Thanks for the reply...

It was an example... My real problem is that it's not working, even for the studyInstanceUID like in the code example!

Can anyone help?

Thank you,
ChoCChoK.


Top
 Profile  
 
PostPosted: Mon, 2017-12-11, 22:19 
Offline

Joined: Mon, 2017-12-11, 12:50
Posts: 5
Hi again!

I found the solution to my problem! Thanks for your help.

Best regards,
ChoCChoK.


Top
 Profile  
 
PostPosted: Tue, 2017-12-12, 09:53 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1889
Location: Oldenburg, Germany
Could you tell us what the problem was?


Top
 Profile  
 
PostPosted: Sat, 2017-12-23, 13:41 
Offline

Joined: Mon, 2017-12-11, 12:50
Posts: 5
Yes, of course!

The problem was that I used a bad context... My bad.

Have a good day,
ChoCChoK.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bing [Bot] 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:  
Powered by phpBB® Forum Software © phpBB Group