FindInstances Method

Summary
Finds instances under this series. The Match event will be called for each instance.
Syntax
C#
C++/CLI
public void FindInstances() 
public: 
void FindInstances();  
Example

Finds a moves a study.

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; 
 
 
 
List<Series> AllSeries = new List<Series>(); 
List<CompositeObjectInstance> SeriesInstances = new List<CompositeObjectInstance>(); 
 
public void RetrieveSeries() 
{ 
   DicomEngine.Startup(); 
   DicomNet.Startup(); 
 
   QueryRetrieveScu seriesRetrieve = new QueryRetrieveScu(); 
   FindQuery query = new FindQuery(); 
   DicomScp scp = new DicomScp(IPAddress.Parse("10.1.1.96"), "MI_SERVER", 104); 
   DicomDataSet ds = new DicomDataSet(); 
 
   // 
   // Change these parameters to reflect your Dicom server. 
   //   
 
   scp.Timeout = 60; 
 
   // 
   // Load a dataset that has information needed for a C-FIND-REQ at series level.  Change 
   // this to reflect a dataset on your computer. 
   // 
 
   ds.Load(Path.Combine(LEAD_VARS.ImagesDir, "DICOM", "Image1.dcm"), DicomDataSetLoadFlags.LoadAndClose); 
   query.QueryLevel = QueryLevel.Series; 
 
   // 
   // Query for a specific study instance uid.  Change this to a study instance 
   // that is available on your Dicom Server 
   // 
 
   query.StudyInstanceUID = "1.2.840.114257.3.6.5.41964868"; 
   seriesRetrieve.MatchSeries += new MatchSeriesDelegate(seriesRetrieve_MatchSeries); 
   seriesRetrieve.MatchInstance += new MatchInstanceDelegate(seriesRetrieve_MatchInstance); 
   seriesRetrieve.Find(scp, query, true, ds); 
 
   if (AllSeries.Count > 0) 
   { 
      AllSeries[0].FindInstances(); 
      if (SeriesInstances.Count > 0) 
      { 
         // 
         // Move all instances to me 
         // 
 
         AllSeries[0].Move(string.Empty); 
      } 
   } 
 
   DicomNet.Shutdown(); 
   DicomEngine.Shutdown(); 
} 
 
void seriesRetrieve_MatchSeries(object sender, MatchEventArgs<Series> e) 
{ 
   // 
   // Find all instances in series 
   // 
 
   AllSeries.Add(e.Info); 
} 
 
void seriesRetrieve_MatchInstance(object sender, MatchEventArgs<CompositeObjectInstance> e) 
{ 
   SeriesInstances.Add(e.Info); 
} 
 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

See Also

Reference

Series Class

Series Members

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.