How to send images by Dicom dataset

32 views
Skip to first unread message

Mehdi Foroughi

unread,
Jan 6, 2024, 2:57:54 AMJan 6
to Fellow Oak DICOM
Hello,
I am reading a dicomdir file. Then I save all the datasets corresponding to each file. Then I create a DicomCStoreRequest for each dataset and add it to a list and the list of requests to a dicom client and send:

List<DicomCStoreRequest> cStoreRequestsList = new List<DicomCStoreRequest>();
for (int i = 0; i < dicomDatasetList.Count; i++)
{
        DicomDataset ds = dicomDatasetList[i];
        DicomCStoreRequest storeReq = new DicomCStoreRequest(ds) ;
        cStoreRequestsList.Add(storeReq);
}
        var client = new Dicom.Network.Client.DicomClient("127.0.0.1", 104, false, "MyAE", "CalledAe");
        await client.AddRequestsAsync(cStoreRequestsList.ToArray());
        await client.SendAsync();

but I get different kind of errors.
How can I send dicom datasets instead of sending dicom files?


Reply all
Reply to author
Forward
0 new messages