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
DIMSE_storeProvider
Moderator: Moderator Team
-
- OFFIS DICOM Team
- Posts: 1445
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
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.
In your case you should receive the image to memory and then use DcmFileFormat::saveFile() to write the image to disk.
-
- OFFIS DICOM Team
- Posts: 1445
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
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);
Who is online
Users browsing this forum: Bing [Bot] and 1 guest