BeforeCMove Event

Summary
Occurs before a C-MOVE-REQ is sent to the SCP.
Syntax
C#
C++/CLI
public event BeforeCMoveDelegate BeforeCMove 
public: 
event BeforeCMoveDelegate^ BeforeCMove 
Event Data

The event handler receives an argument of type BeforeCMoveEventArgs containing data related to this event. The following BeforeCMoveEventArgs properties provide information specific to this event.

PropertyDescription
AffectedClass Gets or sets the affected class.
Dataset Gets the dataset.
DestinationAETitle Gets the move destination ae title.
MessageId Gets or sets the message id.
PresentationID Gets or sets the presentation ID.
Priority Gets or sets the priority.
Scp (Inherited from Leadtools.Dicom.Scu.Common.BaseEventArgs)Gets the SCP.
Example
C#
using Leadtools; 
using Leadtools.Dicom.Scu; 
using Leadtools.Dicom.Scu.Common; 
using Leadtools.Dicom; 
using Leadtools.Dicom.Common.DataTypes; 
using Leadtools.Dicom.Common.DataTypes.Status; 
 
 
public void MoveStudy() 
{ 
   DicomEngine.Startup(); 
   DicomNet.Startup(); 
 
   QueryRetrieveScu retrieveStudy = new QueryRetrieveScu(); 
   FindQuery query = new FindQuery(); 
   DicomScp scp = new DicomScp(); 
 
   // 
   // Change these parameters to reflect the calling AETitle. 
   // 
 
   retrieveStudy.AETitle = "LEAD_CLIENT"; 
   retrieveStudy.HostPort = 1000; 
   retrieveStudy.HostAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork); 
 
   // 
   // Change these parameters to reflect the called AETitle (server). 
   // 
 
   scp.AETitle = "MI_SERVER"; 
   scp.Port = 104; 
   scp.Timeout = 60; 
   scp.PeerAddress = IPAddress.Parse("10.1.1.96"); 
 
   retrieveStudy.BeforeCMove += new BeforeCMoveDelegate(retrieveStudy_BeforeCMove); 
   retrieveStudy.Moved += new MovedDelegate(retrieveStudy_Moved); 
   retrieveStudy.AfterCMove += new AfterCMoveDelegate(retrieveStudy_AfterCMove); 
   retrieveStudy.HostReady += RetrieveStudy_HostReady; 
   retrieveStudy.Move(scp, string.Empty, "1.2.840.114257.3.6.5.41964868"); 
 
   DicomNet.Shutdown(); 
   DicomEngine.Shutdown(); 
} 
 
private void RetrieveStudy_HostReady(object sender, HostReadyEventArgs e) 
{ 
   if (e.ScpHost != null) 
   { 
      Console.WriteLine("HostReady: Host AETitle:{0} Host Port:{1}", e.ScpHost.AETitle, e.ScpHost.HostPort); 
   } 
} 
 
void retrieveStudy_BeforeCMove(object sender, BeforeCMoveEventArgs e) 
{ 
   Console.WriteLine("Before CMove"); 
} 
 
void retrieveStudy_Moved(object sender, MovedEventArgs e) 
{ 
   Console.WriteLine(e.Patient.Name.Full); 
   Console.WriteLine(e.Study.AccessionNumber); 
   Console.WriteLine(e.Series.Number); 
   Console.WriteLine(e.Instance.SOPInstanceUID); 
   Console.WriteLine("=========================================="); 
} 
 
void retrieveStudy_AfterCMove(object sender, AfterCMoveEventArgs e) 
{ 
   Console.WriteLine("{0} Completed", e.Completed); 
   Console.WriteLine("{0} Failed", e.Failed); 
   Console.WriteLine("{0} Warning", e.Warning); 
   Console.WriteLine("Status: {0}", e.Status); 
 
   if (e.Status != DicomCommandStatusType.Success) 
   { 
      string statusAllString = e.StatusAll.ToString(StatusFormatFlags.IgnoreStatus, "\n", "\t"); 
      Console.WriteLine(statusAllString); 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2023.1.24
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom.Scu Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.