Leadtools.Dicom.Scu Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
FindSeries Method
See Also  Example
Leadtools.Dicom.Scu Namespace > Study Class : FindSeries Method




Finds the list of series for this study. Match event will be called for each series.

Syntax

Visual Basic (Declaration) 
Public Sub FindSeries() 
Visual Basic (Usage)Copy Code
Dim instance As Study
 
instance.FindSeries()
C# 
public void FindSeries()
Managed Extensions for C++ 
public: void FindSeries(); 
C++/CLI 
public:
void FindSeries(); 

Example

Finds a moves a study.

Visual BasicCopy Code
Private Studies As List(Of Study) = New List(Of Study)()
Private StudySeries As List(Of Series) = New List(Of Series)()


Public Sub StudyRetrieve()
    DicomEngine.Startup()
    DicomNet.Startup()

    Dim studyRetrieve_Dataset As QueryRetrieveScu = New QueryRetrieveScu()
    Dim query As FindQuery = New FindQuery()
    Dim scp As DicomScp = New DicomScp()

    scp.AETitle = "MI_SERVER"
    scp.Port = 104
    scp.Timeout = 60
    scp.PeerAddress = IPAddress.Parse("10.1.1.96")

    '
    ' Find all studies
    '
    query.QueryLevel = QueryLevel.Study
    AddHandler studyRetrieve_Dataset.MatchStudy, AddressOf studyRetrieve_MatchStudy
    AddHandler studyRetrieve_Dataset.MatchSeries, AddressOf studyRetrieve_MatchSeries
    studyRetrieve_Dataset.Find(scp, query)

    If Studies.Count > 0 Then
        '
        ' Find all series in study
        '
        Studies(0).FindSeries()
        If StudySeries.Count > 0 Then
            '
            ' Move all series to me
            '
            Studies(0).Move(String.Empty)
        End If
    End If

    studyRetrieve_Dataset = Nothing
    query = Nothing
    scp = Nothing

    DicomNet.Shutdown()
    DicomEngine.Shutdown()
End Sub

Private Sub studyRetrieve_MatchStudy(ByVal sender As Object, ByVal e As MatchEventArgs(Of Study))
    Studies.Add(e.Info)
End Sub

Private Sub studyRetrieve_MatchSeries(ByVal sender As Object, ByVal e As MatchEventArgs(Of Series))
    StudySeries.Add(e.Info)
End Sub
C#Copy Code
List<Study> Studies = new List<Study>(); 
List<Series> StudySeries = new List<Series>(); 
 
 
public void StudyRetrieve() 

    DicomEngine.Startup(); 
    DicomNet.Startup(); 
 
    QueryRetrieveScu studyRetrieve = new QueryRetrieveScu(); 
    FindQuery query = new FindQuery(); 
    DicomScp scp = new DicomScp(); 
 
    scp.AETitle = "MI_SERVER"; 
    scp.Port = 104; 
    scp.Timeout = 60; 
    scp.PeerAddress = IPAddress.Parse("10.1.1.96"); 
 
    // 
    // Find all studies 
    // 
    query.QueryLevel = QueryLevel.Study; 
    studyRetrieve.MatchStudy += new MatchStudyDelegate(studyRetrieve_MatchStudy); 
    studyRetrieve.MatchSeries += new MatchSeriesDelegate(studyRetrieve_MatchSeries); 
    studyRetrieve.Find(scp, query); 
 
    if(Studies.Count>0) 
    { 
        // 
        // Find all series in study 
        // 
        Studies[0].FindSeries(); 
        if(StudySeries.Count>0) 
        { 
            // 
            // Move all series to me 
            // 
            Studies[0].Move(string.Empty); 
        } 
    } 
 
    studyRetrieve = null; 
    query = null; 
    scp = null; 
 
    DicomNet.Shutdown(); 
    DicomEngine.Shutdown(); 
}         
 
void studyRetrieve_MatchStudy(object sender, MatchEventArgs<Study> e) 

    Studies.Add(e.Info); 

 
void studyRetrieve_MatchSeries(object sender, MatchEventArgs<Series> e) 

    StudySeries.Add(e.Info); 
}

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

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