LEADTOOLS Medical (Leadtools.Dicom assembly)
LEAD Technologies, Inc

InitializeCommandSet Method

Example 







Type of command to create.
true to create the command set as a request; false to create the command set as a response.
Creates the Command Set and inserts the elements for the specified command. .NET support WinRT support Silverlight support
Syntax
public void InitializeCommandSet( 
   DicomCommandType commandType,
   bool request
)
'Declaration
 
Public Sub InitializeCommandSet( _
   ByVal commandType As DicomCommandType, _
   ByVal request As Boolean _
) 
'Usage
 
Dim instance As DicomDataSet
Dim commandType As DicomCommandType
Dim request As Boolean
 
instance.InitializeCommandSet(commandType, request)
public void InitializeCommandSet( 
   DicomCommandType commandType,
   bool request
)
ObjectiveC Syntax
 function Leadtools.Dicom.DicomDataSet.InitializeCommandSet( 
   commandType ,
   request 
)
public:
void InitializeCommandSet( 
   DicomCommandType commandType,
   bool request
) 

Parameters

commandType
Type of command to create.
request
true to create the command set as a request; false to create the command set as a response.
Remarks
A Command Set is a special type of Data Set. Therefore, to create a Command Set, create a Data Set by instantiating DicomDataSet, and then initialize it by calling InitializeCommandSet method.
Example
Copy CodeCopy Code  
Public Sub TestCommandSet()
   'Make sure to initialize the DICOM engine, this needs to be done only once 
   'In the whole application
   DicomEngine.Startup()

   Dim ds As DicomDataSet = New DicomDataSet()
   Using (ds)
      ds.InitializeCommandSet(DicomCommandType.CFind, True)
      Debug.Assert(ds.InformationCommand = DicomCommandType.CFind)
      Debug.Assert(ds.IsRequestCommand = True)

      Dim ds1 As DicomDataSet = New DicomDataSet()
      Using (ds1)
         ds1.Copy(ds, Nothing, Nothing)
      End Using

   End Using

   DicomEngine.Shutdown()
End Sub
public void TestCommandSet()
{
   //Make sure to initialize the DICOM engine, this needs to be done only once 
   //In the whole application
   DicomEngine.Startup();
   using (DicomDataSet ds = new DicomDataSet())
   {
      ds.InitializeCommandSet(DicomCommandType.CFind, true);
      Debug.Assert(ds.InformationCommand == DicomCommandType.CFind);
      Debug.Assert(ds.IsRequestCommand == true);
      using (DicomDataSet ds1 = new DicomDataSet())
      {
         ds1.Copy(ds, null, null);
      }
   }
   DicomEngine.Shutdown();
}
[TestMethod]
public void TestCommandSet()
{
   //Make sure to initialize the DICOM engine, this needs to be done only once 
   //In the whole application
   DicomEngine.Startup();
   using (DicomDataSet ds = new DicomDataSet())
   {
      ds.InitializeCommandSet(DicomCommandType.CFind, true);
      Debug.Assert(ds.InformationCommand == DicomCommandType.CFind);
      Debug.Assert(ds.IsRequestCommand == true);
      using (DicomDataSet ds1 = new DicomDataSet())
      {
         ds1.Copy(ds, null, null);
      }
   }
   DicomEngine.Shutdown();
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DicomDataSet Class
DicomDataSet Members
InformationCommand Property
IsRequestCommand Property

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.

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