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:18

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu, 2012-11-15, 04:05 
Offline

Joined: Wed, 2012-06-06, 07:38
Posts: 30
hi,all.

As it said in chapter4 :


Quote:
The C-GET operation allows an application entity to instruct another application entity to transfer stored SOP Instances to the initiating applicationentity using the C-STORE operation. Support for the C-GET service shall be agreed upon at Association establishment time by both the SCU and SCP of the C-GET in order for a C-GET operation to occur over the Association. The C-STORE Sub-operations shall be accomplished on the same Association as the C-GET operation. Hence, the SCP of the Query/Retrieve Service Class serves as the SCU of the Storage Service Class.



My question:
how to use the same association accomplish the C-Store Sub-operations??????
how to start a new C-STORE Sub-operation with the same association??????




My code:
Code:
OFCondition DcmSCP::handleGetRequest(T_DIMSE_C_GetRQ &reqMessage,
                             const T_ASC_PresentationContextID presID)
{
   OFString tempStr;
   // Dump debug information
   if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
   {
      DCMNET_INFO("Received C-Get Request");
      DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, reqMessage, DIMSE_INCOMING, NULL, presID));
      DCMNET_INFO("Sending C-Get Response");
   } else {
      DCMNET_INFO("Received C-Get Request (MsgID " << reqMessage.MessageID << ")");
      DCMNET_INFO("Sending C-Get Response (" << DU_cechoStatusString(STATUS_Success) << ")");
   }

   //// intialize some variables
   //GetCallbackData callbackData;
   //callbackData.assoc = m_assoc;
   //callbackData.imageFileName = "aaaa.DCM";
   //DcmFileFormat dcmff;
   //callbackData.dcmff = &dcmff;
   //callbackData.presID = presID;
   void * callbackData = NULL;
   OFCondition cond = DIMSE_getProvider(m_assoc,presID,&reqMessage,getProviderCallback, callbackData, DIMSE_BLOCKING,5);
   
   return cond;
}


void DcmSCP::getProviderCallback(
   /* in */
   void *callbackData,
   OFBool cancelled, T_DIMSE_C_GetRQ *request,
   DcmDataset *requestIdentifiers, int responseCount,
   /* out */
   T_DIMSE_C_GetRSP *response,
   DcmDataset **responseIdentifiers,
   DcmDataset **statusDetail)
{

   OFString queryRetrieveLevel;
   OFString patientId;
   OFString studyInstanceUID;
   OFString seriesInstanceUID;
   OFString sopInstanceUID;

   OFCondition result = requestIdentifiers->findAndGetOFStringArray(DCM_QueryRetrieveLevel,queryRetrieveLevel);
   result = requestIdentifiers->findAndGetOFStringArray(DCM_StudyInstanceUID,studyInstanceUID);
   result = requestIdentifiers->findAndGetOFStringArray(DCM_SeriesInstanceUID,seriesInstanceUID);
   result = requestIdentifiers->findAndGetOFStringArray(DCM_SOPInstanceUID,sopInstanceUID);

   //OFList<OFString> ts;
   //ts.push_back(UID_LittleEndianExplicitTransferSyntax);
   //ts.push_back(UID_BigEndianExplicitTransferSyntax);
   //ts.push_back(UID_LittleEndianImplicitTransferSyntax);
   //OFCondition m1 = storeSCU.addPresentationContext(UID_DICOS_CTImageStorage, ts);


   T_ASC_PresentationContextID presID = findPresentationContextID(UID_DICOS_CTImageStorage,UID_LittleEndianExplicitTransferSyntax);
   OFString dcmFileName = "aaaa.DCM";
   
   DcmDataset dataset;
   Uint16 rspStatusCode;
   sendSTORERequest(presID, dcmFileName, &dataset, rspStatusCode);
}


Thanks for your help.


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: 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:  
cron
Powered by phpBB® Forum Software © phpBB Group