Leadtools.Medical.Workstation.Client Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
StoreSeries Method
See Also  Example
Leadtools.Medical.Workstation.Client Namespace > StoreClient Class : StoreSeries Method



studyInstanceUid
The Study Instance UID String value to match in the DICOM database to be stored. This can be null or Empty.
seriesInstanceUid
The Series Instance UID String value to match in the DICOM database to be stored. This can be null or Empty.
studyInstanceUid
The Study Instance UID String value to match in the DICOM database to be stored. This can be null or Empty.
seriesInstanceUid
The Series Instance UID String value to match in the DICOM database to be stored. This can be null or Empty.
Start the operation of storing the DICOM instances with the provided parameters.

Syntax

Visual Basic (Declaration) 
Public Sub StoreSeries( _
   ByVal studyInstanceUid As String, _
   ByVal seriesInstanceUid As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As StoreClient
Dim studyInstanceUid As String
Dim seriesInstanceUid As String
 
instance.StoreSeries(studyInstanceUid, seriesInstanceUid)
C# 
public void StoreSeries( 
   string studyInstanceUid,
   string seriesInstanceUid
)
C++/CLI 
public:
void StoreSeries( 
   String^ studyInstanceUid,
   String^ seriesInstanceUid
) 

Parameters

studyInstanceUid
The Study Instance UID String value to match in the DICOM database to be stored. This can be null or Empty.
seriesInstanceUid
The Series Instance UID String value to match in the DICOM database to be stored. This can be null or Empty.

Example

Visual BasicCopy Code
<Test> _
Public Sub StoreDicom()
  Leadtools.Examples.Support.Unlock()
  Dim clientInfo As AeInfo = New AeInfo()

  clientInfo.Address = Dns.GetHostName() 'local machine
  clientInfo.AETitle = "TEST_CLIENT"
  clientInfo.Port = 1000

  'Make sure that the FindAddIn is configured properly before using this class.
  Dim queryClient As DbQueryClient = New DbQueryClient (clientInfo)

  queryClient.EnableLog = True
  queryClient.LogFileName = ("c:\DicomLog.txt")

  Dim series As ClientQueryDataSet = queryClient.FindSeries (New FindQuery ())

  If series.Series.Count > 0 Then
     Dim scpInfo As DicomScp = New DicomScp()

     scpInfo.AETitle = "LEAD_SERVER"
     scpInfo.Port = 104
     scpInfo.Timeout = 30

     Dim addressFound As Boolean
     Dim addresses As IPAddress()

     addressFound = False
     addresses = Dns.GetHostAddresses (Dns.GetHostName ())

     For Each address As IPAddress In addresses
       'we need to get an IP V4, won't work with IP V6
       If address.AddressFamily = System.Net.Sockets.AddressFamily.InterNetwork Then
         addressFound = True

         scpInfo.PeerAddress = address

         Exit For
       End If
     Next address

     If (Not addressFound) Then
       Throw New ArgumentException("Couldn't resolve a valid host Address. Address must conform to IP version 4")
     End If

     Dim client As StoreClient = New StoreClient(clientInfo, scpInfo, Compression.Native)

     client.EnableLog = True
     client.LogFileName = ("c:\DicomLog.txt")

     client.StoreSeries (series.Series (0).StudyInstanceUID, series.Series (0).SeriesInstanceUID)

     Console.WriteLine ("Series {0} has been stored successfully.", series.Series (0).SeriesInstanceUID)
  End If
End Sub
C#Copy Code
public void StoreDicom() 

   Leadtools.Examples.Support.Unlock(); 
 
   AeInfo clientInfo = new AeInfo(); 
 
   clientInfo.Address = Dns.GetHostName(); //local machine 
   clientInfo.AETitle = "TEST_CLIENT"; 
   clientInfo.Port = 1000; 
 
   //Make sure that the FindAddIn is configured properly before using this class. 
   DbQueryClient queryClient = new DbQueryClient ( clientInfo ) ; 
 
   queryClient.EnableLog = true; 
   queryClient.LogFileName = ( @"c:\DicomLog.txt" ) ; 
 
   ClientQueryDataSet series = queryClient.FindSeries ( new FindQuery ( ) ) ; 
 
   if ( series.Series.Count > 0 ) 
   { 
      DicomScp scpInfo = new DicomScp(); 
 
      scpInfo.AETitle = "LEAD_SERVER"; 
      scpInfo.Port = 104; 
      scpInfo.Timeout = 30; 
 
      bool addressFound; 
      IPAddress [] addresses ; 
 
      addressFound = false; 
      addresses = Dns.GetHostAddresses ( Dns.GetHostName ( ) ) ; 
 
      foreach (IPAddress address in addresses) 
      { 
         //we need to get an IP V4, won't work with IP V6 
         if (address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) 
         { 
            addressFound = true; 
 
            scpInfo.PeerAddress = address; 
 
            break; 
         } 
      } 
 
      if (!addressFound) 
      { 
         throw new ArgumentException("Couldn't resolve a valid host Address. Address must conform to IP version 4"); 
      } 
 
      StoreClient client = new StoreClient(clientInfo, scpInfo, Compression.Native); 
 
      client.EnableLog = true ; 
      client.LogFileName = ( @"c:\DicomLog.txt" ) ; 
 
      client.StoreSeries ( series.Series [ 0 ].StudyInstanceUID, series.Series [ 0 ].SeriesInstanceUID ) ; 
 
      Console.WriteLine ( "Series {0} has been stored successfully.", series.Series [ 0 ].SeriesInstanceUID ) ; 
   } 
}

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Medical.Workstation.Client requires a Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features