Creates the Data Set object, inserting the appropriate elements for the specified
class.
Syntax
Parameters
- classType
-
The IOD class to which the Data Set should be initialized.
- flags
-
The Value Representation, byte order, and other options used when initializing the Data Set.
Example
This example will initialize a new DICOM data set with only mandatory modules and elements
Visual Basic | Copy Code |
---|
Private Sub DicomDataSet_InitializeExample()
Dim ds As DicomDataSet = New DicomDataSet()
Dim flags As DicomDataSetInitializeFlags = DicomDataSetInitializeFlags.ExplicitVR Or DicomDataSetInitializeFlags.LittleEndian Or DicomDataSetInitializeFlags.AddMandatoryElementsOnly Or DicomDataSetInitializeFlags.AddMandatoryModulesOnly
ds.Initialize(DicomClassType.CTImageStorage, flags)
ds.Save(LeadtoolsExamples.Common.ImagesPath.Path + "Test.dic", DicomDataSetSaveFlags.None)
End Sub
|
C# | Copy Code |
---|
/// void DicomDataSet_InitializeExample() { DicomDataSet ds = new DicomDataSet(); DicomDataSetInitializeFlags flags = DicomDataSetInitializeFlags.ExplicitVR | DicomDataSetInitializeFlags.LittleEndian | DicomDataSetInitializeFlags.AddMandatoryElementsOnly | DicomDataSetInitializeFlags.AddMandatoryModulesOnly ; ds.Initialize(DicomClassType.CTImageStorage, flags); ds.Save(LeadtoolsExamples.Common.ImagesPath.Path + "Test.dic", DicomDataSetSaveFlags.None); } |
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also