LEADTOOLS Medical(Leadtools.Dicom.Scuアセンブリ)

フレームを表示

Find(DicomScp,FindQuery,Boolean,DicomDataSet)メソッド






C-FIND-REQを送るピア接続。
見つけられるDICOMデータセットを説明する問合せ情報。
オプションのC-FIND-REQ項目を追加するために設定されるtrueならば。
C-FIND-REQの使用へのテンプレートデータセット。
Scpによって定義される接続のピアメンバに、C-FIND-REQにメッセージを送ります。C-FIND-REQデータセットは、テンプレートで提供されます。
構文
public void Find( 
   DicomScp Scp,
   FindQuery Query,
   bool AddOptional,
   DicomDataSet Template
)
'Declaration
 
Public Overloads Sub Find( _
   ByVal Scp As DicomScp, _
   ByVal Query As FindQuery, _
   ByVal AddOptional As Boolean, _
   ByVal Template As DicomDataSet _
) 
'Usage
 
Dim instance As QueryRetrieveScu
Dim Scp As DicomScp
Dim Query As FindQuery
Dim AddOptional As Boolean
Dim Template As DicomDataSet
 
instance.Find(Scp, Query, AddOptional, Template)

            

            
public:
void Find( 
   DicomScp^ Scp,
   FindQuery^ Query,
   bool AddOptional,
   DicomDataSet^ Template
) 

パラメーター

Scp
C-FIND-REQを送るピア接続。
問合せ
見つけられるDICOMデータセットを説明する問合せ情報。
AddOptional
オプションのC-FIND-REQ項目を追加するために設定されるtrueならば。
テンプレート
C-FIND-REQの使用へのテンプレートデータセット。
サンプル

C-FIND-REQデータセットテンプレートで検査シリーズを見つけます。

Copy Code  
Imports Leadtools
Imports Leadtools.Dicom.Scu
Imports Leadtools.Dicom.Scu.Common
Imports Leadtools.Dicom
Imports Leadtools.Dicom.Common.DataTypes

<TestMethod()> _
Public Sub FindSeries()
    DicomEngine.Startup()
    DicomNet.Startup()
    Dim cfind As QueryRetrieveScu = New QueryRetrieveScu()
    Dim query As FindQuery = New FindQuery()
    Dim scp As DicomScp = New DicomScp(IPAddress.Parse("10.1.1.96"), "MI_SERVER", 104)
    Dim ds As DicomDataSet = 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, "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"
    AddHandler cfind.BeforeCFind, AddressOf cfind_BeforeCFind
    AddHandler cfind.MatchSeries, AddressOf cfind_MatchSeries
    AddHandler cfind.AfterCFind, AddressOf cfind_AfterCFind
    cfind.Find(scp, query, True, ds)

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

Private Sub cfind_BeforeCFind(ByVal sender As Object, ByVal e As BeforeCFindEventArgs)
    Console.WriteLine("Before CFind: " & e.QueryLevel.ToString())
End Sub

Private Sub cfind_MatchSeries(ByVal sender As Object, ByVal e As MatchEventArgs(Of Series))
    Console.Write("Series Instance UID: " & e.Info.InstanceUID)
    Console.WriteLine("Series Number: " & e.Info.Number.Value)
    If e.Info.Date.HasValue Then
        Console.WriteLine("Series Date: " & e.Info.Date.Value)
    Else
        Console.WriteLine("Series Date: ")
    End If
    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)

    If e.Info.PerfProcStepStartDate.HasValue Then
        Console.WriteLine("Performed Procedure Step Start Date: " & e.Info.PerfProcStepStartDate.Value)
    Else
        Console.WriteLine("Performed Procedure Step Start Date: ")
    End If

    If e.Info.PerfProcStepStartTime.HasValue Then
        Console.WriteLine("Performed Procedure Step Start Time: " & e.Info.PerfProcStepStartTime.Value.ToString())
    Else
        Console.WriteLine("Performed Procedure Step Start Time: ")
    End If
    Console.WriteLine("Requested Procedure ID: " & e.Info.RequestedProcId)
    Console.WriteLine("Scheduled Procedure Step ID: " & e.Info.SchedProcStepId)
End Sub

Private Sub cfind_AfterCFind(ByVal sender As Object, ByVal e As AfterCFindEventArgs)
    Debug.Assert(e.Status = DicomCommandStatusType.Success)
End Sub


Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools;
using Leadtools.Dicom.Scu;
using Leadtools.Dicom.Scu.Common;
using Leadtools.Dicom;
using Leadtools.Dicom.Common.DataTypes;

[TestMethod]
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,"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:\Users\Public\Documents\LEADTOOLS Images";
}
必要条件

ターゲットプラットホーム

参照

参照

QueryRetrieveScuクラス
QueryRetrieveScuメンバ
オーバーロードリスト

Leadtools.Dicom.Scuは、Medicalツールキットのライセンスと、解除キーが必要です。詳細は、以下を参照してください。LEADTOOLSツールキット機能