DIMSE_storeProvider

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Lorpha
Posts: 2
Joined: Wed, 2007-11-07, 15:36

DIMSE_storeProvider

#1 Post by Lorpha »

Hi,

I'm trying to develep an application where we can visualise in eral time images received by a DICOM server and so I need to store them into memory to have a faster access and in the same time to store them on the hard drive. Beeing a newbie in dcmtk, i tried to use twice DIMSE_storeProvider in a same fonction, one time to store in memory and after that to store images on the hard drive but it seems to fail. If I only try to store on memory or on hard drive it works. I thought that the problem could be that we cannot use twice DIMSE_storeProvider in a same function. Is it the case?

Thanks in advance et bare with me please for my bad english

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

DIMSE_storeProvider is a function that receives an object over a network connection using a C-STORE transaction, and either stores the image in memory, or on harddisk, but never both.
In your case you should receive the image to memory and then use DcmFileFormat::saveFile() to write the image to disk.

Lorpha
Posts: 2
Joined: Wed, 2007-11-07, 15:36

#3 Post by Lorpha »

Thank you for answering my question and sorry for the late reply.
Concerning DIMSE_storeProvider, I found how to store images on harddisk or how to put them into a temporary file but not how to store them in memory. What are the parameters to put so as to store them in memory only?

Thanks a lot

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#4 Post by Marco Eichelberg »

You simply pass NULL as imageFileName and a pointer to a DcmDataset object in parameter imageDataSet (actually a DcmDataset **). Upon successful return the DcmDataset instance will contain the received dataset.

Code: Select all

DcmFileFormat dcmff;
DcmDataset *dset = dcmff.getDataset();
OFCondition cond = DIMSE_storeProvider(assoc, presContextID, request, NULL, OFTrue, &dset, storeSCPCallback, &callbackData, OFTrue, 0);
if (cond.good()) dcmff.saveFile("image.dcm", EXS_LittleEndianExplicit);

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest