void send_series(string studyUid, string seriesUid) { AEInformation destination = get_server(); if (destination != null) { BackgroundTask task = new BackgroundTask( delegate(IBackgroundTaskContext context) { DicomSendServiceClient sender = new DicomSendServiceClient(); sender.Open(); SendSeriesRequest series_request = new SendSeriesRequest(); series_request.DestinationAEInformation = destination; series_request.StudyInstanceUid = studyUid; List <string> seriesUids = new List <string>(); seriesUids.Add(seriesUid); series_request.SeriesInstanceUids = seriesUids; sender.SendSeries(series_request); sender.Close(); }, true); task.Run(); LocalDataStoreActivityMonitorComponentManager.ShowSendReceiveActivityComponent(this.Context.DesktopWindow); } }
void send_images(List <IPresentationImage> queue) { AEInformation destination = get_server(); SendSopInstancesRequest image_request = new SendSopInstancesRequest(); DicomSendServiceClient sender = new DicomSendServiceClient(); if (destination != null) { image_request.DestinationAEInformation = destination; List <string> studyUids = new List <string>(); List <string> seriesUids = new List <string>(); List <string> imageSopUids = new List <string>(); foreach (IPresentationImage image in queue) { if (image is IImageSopProvider) { ImageSop imageSop = ((IImageSopProvider)image).ImageSop; studyUids.Add(imageSop.StudyInstanceUid); seriesUids.Add(imageSop.SeriesInstanceUid); imageSopUids.Add(imageSop.SopInstanceUid); } } image_request.StudyInstanceUid = studyUids[0]; image_request.SeriesInstanceUid = seriesUids[0]; image_request.SopInstanceUids = imageSopUids; sender.SendSopInstances(image_request); sender.Close(); LocalDataStoreActivityMonitorComponentManager.ShowSendReceiveActivityComponent(this.Context.DesktopWindow); } }
// Note: you may change the name of the 'Apply' method as desired, but be sure to change the // corresponding parameter in the MenuAction and ButtonAction attributes /// <summary> /// Called by the framework when the user clicks the "apply" menu item or toolbar button. /// </summary> public void Apply() { if (!Enabled || this.Context.SelectedSingleSeries == null) { return; } List <string> seriesUIDs = new List <string>(); List <string> studyUIDs = new List <string>(); foreach (SeriesItem item in this.Context.SelectedMultipleSeries) { string foo = item.SeriesInstanceUID; Platform.Log(LogLevel.Info, foo); seriesUIDs.Add(item.SeriesInstanceUID); studyUIDs.Add(item.StudyInstanceUID); } AEInformation destination = get_server(); if (destination != null) { BackgroundTask task = new BackgroundTask( delegate(IBackgroundTaskContext context) { DicomSendServiceClient sender = new DicomSendServiceClient(); sender.Open(); SendSeriesRequest series_request = new SendSeriesRequest(); series_request.DestinationAEInformation = destination; series_request.StudyInstanceUid = studyUIDs[0]; series_request.SeriesInstanceUids = seriesUIDs; sender.SendSeries(series_request); sender.Close(); // OnMoveCompleted(); }, true); task.Run(); LocalDataStoreActivityMonitorComponentManager.ShowSendReceiveActivityComponent(this.Context.DesktopWindow); } }
void send_images(List<IPresentationImage> queue) { AEInformation destination = get_server(); SendSopInstancesRequest image_request = new SendSopInstancesRequest(); DicomSendServiceClient sender = new DicomSendServiceClient(); if (destination != null) { image_request.DestinationAEInformation = destination; List<string> studyUids = new List<string>(); List<string> seriesUids = new List<string>(); List<string> imageSopUids = new List<string>(); foreach (IPresentationImage image in queue) { if (image is IImageSopProvider) { ImageSop imageSop = ((IImageSopProvider)image).ImageSop; studyUids.Add(imageSop.StudyInstanceUid); seriesUids.Add(imageSop.SeriesInstanceUid); imageSopUids.Add(imageSop.SopInstanceUid); } } image_request.StudyInstanceUid = studyUids[0]; image_request.SeriesInstanceUid = seriesUids[0]; image_request.SopInstanceUids = imageSopUids; sender.SendSopInstances(image_request); sender.Close(); LocalDataStoreActivityMonitorComponentManager.ShowSendReceiveActivityComponent(this.Context.DesktopWindow); } }
void send_series(string studyUid, string seriesUid) { AEInformation destination = get_server(); if (destination != null) { BackgroundTask task = new BackgroundTask( delegate(IBackgroundTaskContext context) { DicomSendServiceClient sender = new DicomSendServiceClient(); sender.Open(); SendSeriesRequest series_request = new SendSeriesRequest(); series_request.DestinationAEInformation = destination; series_request.StudyInstanceUid = studyUid; List<string> seriesUids = new List<string>(); seriesUids.Add(seriesUid); series_request.SeriesInstanceUids = seriesUids; sender.SendSeries(series_request); sender.Close(); }, true); task.Run(); LocalDataStoreActivityMonitorComponentManager.ShowSendReceiveActivityComponent(this.Context.DesktopWindow); } }