C#
Objective-C
C++/CLI
public void InitializeCommandSet(
DicomCommandType commandType,
bool request
)
- (void)initializeCommandSet:(LTDicomCommandType)commandType request:(BOOL)request;
public:
void InitializeCommandSet(
DicomCommandType commandType,
bool request
)
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.
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.
This example will initialize a new DICOM command set and copy it to another command set.
using Leadtools;
using Leadtools.Dicom;
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();
}