←Select platform

DeleteModule Method

Summary
Deletes a module from the Data Set.
Syntax
C#
Objective-C
C++
Java
public void DeleteModule( 
   DicomModuleType module 
) 
- (void)deleteModule:(LTDicomModuleType)module NS_SWIFT_NAME(deleteModule(_:)); 
public void deleteModule(DicomModuleType module) 
public: 
void DeleteModule(  
   DicomModuleType module 
)  

Parameters

module
The module to be deleted.

Remarks

You can remove all items from the Data Set using Reset.

Example

This example will initialize a DICOM Dataset and then insert and delete some of its modules.

C#
using Leadtools; 
using Leadtools.Dicom; 
 
 
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(); 
} 
Requirements

Target Platforms

Help Version 22.0.2022.4.4
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2022 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom Assembly