Creates the Command Set and inserts the elements for the specified command.
Syntax
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.
Example
This example will initialize a new DICOM command set and copy it to another command set.
Visual Basic | Copy Code |
---|
Public Sub TestCommandSet()
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 |
C# | Copy Code |
---|
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(); } |
Remarks
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