Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.3.25
|
Leadtools.Dicom Namespace > DicomDataSet Class : DeleteModule Method |
public void DeleteModule( DicomModuleType module )
'Declaration
Public Sub DeleteModule( _ ByVal module As DicomModuleType _ )
'Usage
Dim instance As DicomDataSet Dim module As DicomModuleType instance.DeleteModule(module)
public void DeleteModule( DicomModuleType module )
public void deleteModule(DicomModuleType module)
function Leadtools.Dicom.DicomDataSet.DeleteModule( module )
public: void DeleteModule( DicomModuleType module )
This example will initialize a DICOM Dataset and then insert and delete some of its modules.
Imports Leadtools Imports Leadtools.Dicom <TestMethod()> _ Public Sub DicomModuleSample() 'Make sure to initialize the DICOM engine, this needs to be done only once 'In the whole application DicomEngine.Startup() Dim dicomDataset As DicomDataSet = New DicomDataSet() Using (dicomDataset) dicomDataset.Initialize(DicomClassType.DXImageStoragePresentation, DicomDataSetInitializeType.ExplicitVRLittleEndian) dicomDataset.DeleteModule(DicomModuleType.Patient) dicomDataset.InsertModule(DicomModuleType.Patient, False) Dim [module] As DicomModule = dicomDataset.FindModule(DicomModuleType.Patient) Debug.Assert(Not [module] Is Nothing) Dim found As Boolean = False Dim i As Integer = 0 Do While i < dicomDataset.ModuleCount [module] = dicomDataset.FindModuleByIndex(i) If [module].Type = DicomModuleType.Patient Then found = True End If i += 1 Loop Debug.Assert(found) End Using DicomEngine.Shutdown() End Sub
using Leadtools; using Leadtools.Dicom; [TestMethod] public void DicomModuleSample() { //Make sure to initialize the DICOM engine, this needs to be done only once //In the whole application DicomEngine.Startup(); using (DicomDataSet dicomDataset = new DicomDataSet()) { dicomDataset.Initialize(DicomClassType.DXImageStoragePresentation, DicomDataSetInitializeType.ExplicitVRLittleEndian); dicomDataset.DeleteModule(DicomModuleType.Patient); dicomDataset.InsertModule(DicomModuleType.Patient, false); DicomModule module = dicomDataset.FindModule(DicomModuleType.Patient); Debug.Assert(module != null); bool found = false; for (int i = 0; i < dicomDataset.ModuleCount; i++) { module = dicomDataset.FindModuleByIndex(i); if (module.Type == DicomModuleType.Patient) { found = true; } } Debug.Assert(found); } DicomEngine.Shutdown(); }
using Leadtools.Dicom.Constants; using Leadtools; using Leadtools.Dicom; [TestMethod] public void DicomModuleSample() { //Make sure to initialize the DICOM engine, this needs to be done only once //In the whole application DicomEngine.Startup(); using (DicomDataSet dicomDataset = new DicomDataSet()) { dicomDataset.Initialize(DicomClassType.DXImageStoragePresentation, DicomDataSetInitializeType.ExplicitVRLittleEndian); dicomDataset.DeleteModule(DicomModuleType.Patient); dicomDataset.InsertModule(DicomModuleType.Patient, false); DicomModule module = dicomDataset.FindModule(DicomModuleType.Patient); Debug.Assert(module != null); bool found = false; for (int i = 0; i < dicomDataset.ModuleCount; i++) { module = dicomDataset.FindModuleByIndex(i); if (module.Type == DicomModuleType.Patient) { found = true; } } Debug.Assert(found); } DicomEngine.Shutdown(); }
using Leadtools; using Leadtools.Dicom; using Leadtools.Examples; public void DicomModuleSample() { //Make sure to initialize the DICOM engine, this needs to be done only once //In the whole application DicomEngine.Startup(); using (DicomDataSet dicomDataset = new DicomDataSet()) { dicomDataset.Initialize(DicomClassType.DXImageStoragePresentation, DicomDataSetInitializeType.ExplicitVRLittleEndian); dicomDataset.DeleteModule(DicomModuleType.Patient); dicomDataset.InsertModule(DicomModuleType.Patient, false); DicomModule module = dicomDataset.FindModule(DicomModuleType.Patient); Debug.Assert(module != null); bool found = false; for (int i = 0; i < dicomDataset.ModuleCount; i++) { module = dicomDataset.FindModuleByIndex(i); if (module.Type == DicomModuleType.Patient) { found = true; } } Debug.Assert(found); } DicomEngine.Shutdown(); }
Imports Leadtools Imports Leadtools.Dicom Public Sub DicomModuleSample() 'Make sure to initialize the DICOM engine, this needs to be done only once 'In the whole application DicomEngine.Startup() Using dicomDataset As DicomDataSet = New DicomDataSet() dicomDataset.Initialize(DicomClassType.DXImageStoragePresentation, DicomDataSetInitializeType.ExplicitVRLittleEndian) dicomDataset.DeleteModule(DicomModuleType.Patient) dicomDataset.InsertModule(DicomModuleType.Patient, False) Dim [module] As DicomModule = dicomDataset.FindModule(DicomModuleType.Patient) Debug.Assert(Not [module] Is Nothing) Dim found As Boolean = False Dim i As Integer = 0 Do While i < dicomDataset.ModuleCount [module] = dicomDataset.FindModuleByIndex(i) If [module].Type = DicomModuleType.Patient Then found = True End If i += 1 Loop Debug.Assert(found) End Using DicomEngine.Shutdown() End Sub