Hi Andres,
Thanks for getting back to me although I have slightly moved forward.
Firstly as opposed to calling a PACS and requesting images, I have created the small PACS which other Application Entities are requesting images from - although your QR example does assist.
I have a Dicom Browser that I can query my PACS with and my PACS sends back a list of related studies etc...
When the Dicom Browser requests that my PACS send it the requested images, my PACS responds with CMOVE response and then sends a CSTORE request and sends the images.
The problem I have is that although the images get to the Browser and are displayed, the browser still thinks it is waiting for images and had a continuous message saying "receiving" when in my program has already sent the images and completed its termination of network connections etc..
I appear either not to be sending the images correctly or not finishing off the process correctly.
When use the browser on other PACS systems and it received images - it's able to tell how far through the process of receiving images it is (a percentage count down) which it also does not do with the PACS i have created.
Here is my code that I use to send the CMOVE response and the CSTORE requests etc.
public IEnumerable<DicomCMoveResponse> OnCMoveRequest(DicomCMoveRequest request)
{
Console.WriteLine("CMove Responce: " + request.DestinationAE + " " + request.Dataset.Get<string>(DicomTag.SeriesInstanceUID));
var seriesUid = request.Dataset.Get<string>(DicomTag.SeriesInstanceUID);
var studyUid = request.Dataset.Get<string>(DicomTag.StudyInstanceUID);
var MID = request.MessageID;
if (request.Level == DicomQueryRetrieveLevel.Series)
{
// Database stuff in here to get records etc..
int counter = 0;
int to_send = image_count - counter;
DicomCMoveResponse dCmove = new DicomCMoveResponse(request, DicomStatus.Pending);
dCmove.Completed = counter;
dCmove.Remaining = image_count;
dCmove.Failures = 0;
yield return dCmove;
. DicomClient client = new DicomClient();
while (rdr.Read())
{
string location = rdr.GetString(20);
string series_id = rdr.GetString(3);
string study_id = rdr.GetString(2);
counter++;
to_send--;
DicomCStoreRequest request2 = new DicomCStoreRequest(location);
client.AddRequest(request2);
dCmove = new DicomCMoveResponse(request, DicomStatus.Pending);
dCmove.Completed = counter;
dCmove.Remaining = image_count;
dCmove.Failures = 0;
yield return dCmove;
}
rdr.Close();
conn.Close();
dCmove = new DicomCMoveResponse(request, DicomStatus.Success);
dCmove.Completed = counter;
dCmove.Remaining = 0;
dCmove.Failures = 0;
yield return dCmove;
}
}
Any help or advice you can offer would be great - I've already moved the new DicomClient out of the sending loop.
Thanks,
Midge