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/projec ... wto_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: Select all
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++;
}
Thanks,
ChoCChoK.