Find(DicomScp,FindQuery,bool,DicomDataSet) Method

Summary
Sends a C-FIND-REQ message to a peer member of a connection defined by Scp. The C-FIND-REQ dataset is provided by Template.
Syntax
C#
C++/CLI
public: 
void Find(  
   DicomScp^ Scp, 
   FindQuery^ Query, 
   bool AddOptional, 
   DicomDataSet^ Template 
)  

Parameters

Scp
The peer connection to send the C-FIND-REQ to.

Query
The query information that describes the DICOM datasets to be found.

AddOptional
If set to true add optional C-FIND-REQ items.

Template
The template dataset to use in the C-FIND-REQ.

Example

Finds a study series with a C-FIND-REQ dataset template.

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 FindSeries() 
{ 
   DicomEngine.Startup(); 
   DicomNet.Startup(); 
 
   QueryRetrieveScu findSeries = 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"; 
   findSeries.BeforeCFind += new BeforeCFindDelegate(findSeries_BeforeCFind); 
   findSeries.MatchSeries += new MatchSeriesDelegate(findSeries_MatchSeries); 
   findSeries.AfterCFind += new AfterCFindDelegate(findSeries_AfterCFind); 
   findSeries.Find(scp, query, true, ds); 
 
   DicomNet.Shutdown(); 
   DicomEngine.Shutdown(); 
} 
 
void findSeries_BeforeCFind(object sender, BeforeCFindEventArgs e) 
{ 
   Console.WriteLine("Before CFind: " + e.QueryLevel.ToString()); 
} 
 
void findSeries_MatchSeries(object sender, MatchEventArgs<Series> e) 
{ 
   Console.Write("Series Instance UID: " + e.Info.InstanceUID); 
   Console.WriteLine("Series Number: " + e.Info.Number != null ? e.Info.Number.ToString() : string.Empty); 
   Console.WriteLine("Series Date: " + e.Info.Date); 
   Console.WriteLine("Series Description: " + e.Info.Description); 
   Console.WriteLine("Modality: " + e.Info.Modality); 
   Console.WriteLine("Number of Related Instances: " + e.Info.NumberOfRelatedInstances); 
   Console.WriteLine("Performed Procedure Step ID:" + e.Info.PerformedProcStepId); 
   Console.WriteLine("Performed Procedure Step Start Date: " + e.Info.PerfProcStepStartDate); 
   Console.WriteLine("Performed Procedure Step Start Time: " + e.Info.PerfProcStepStartTime); 
   Console.WriteLine("Requested Procedure ID: " + e.Info.RequestedProcId); 
   Console.WriteLine("Scheduled Procedure Step ID: " + e.Info.SchedProcStepId); 
} 
 
void findSeries_AfterCFind(object sender, AfterCFindEventArgs e) 
{ 
   Debug.Assert(e.Status == DicomCommandStatusType.Success); 
} 
 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 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.