**responseIdentifiers - add a dcmtk result to dbl pointer?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
AlreadyGoogled
Posts: 17
Joined: Wed, 2005-01-26, 16:43

**responseIdentifiers - add a dcmtk result to dbl pointer?

#1 Post by AlreadyGoogled » Tue, 2005-09-06, 22:31

Hi,

I need to add a default test study to the search results returned through the database using the SCE_findSCP operation in imagectn... The problem is, I am unable to append my data successfully to the double DcmDataset pointer **responseIdentifiers. Do you have a information as to how this double pointer is structured? How best should I deal with it?

right now, whenever I call my AddSampleData function, it overrides the latest entry with my sample data, which is not correct... I instead need to add the result to the image ctn data... any suggestions would be awesome!

Code: Select all

OFCondition AddSampleData( SCE_FindContext *context,
                            MyData structMyData,   //struct w/ info loaded
                            DcmDataset **responseIdentifiers ) 
{

    OFCondition cond = EC_Normal;

    //declare new dcmdataset...  how to associate with responseIdentifiers?
    *responseIdentifiers = new DcmDataset ;

    DcmTag t0(DCM_StudyID);
    DcmElement *dce0 = newDicomElement(t0);
    dce0->putString(structMyData.StudyID);
    
    (*responseIdentifiers)->insert(dce0, OFTrue /*replaceOld*/);

    DcmTag t1(DCM_StudyDescription);
    DcmElement *dce1 = newDicomElement(t1);
    dce1->putString(structMyData.StudyDescription);

    (*responseIdentifiers)->insert(dce1, OFTrue /*replaceOld*/);

    if (*responseIdentifiers != NULL) {
	    addRetreiveAETitle(*responseIdentifiers, context->ourAETitle);
    }

    return cond;
}
thanks!
:mrgreen:
________
VAPORIZER VOLCANO

Post Reply

Who is online

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