←Select platform

ModuleCount Property

Summary
Gets the number of modules in the entire Data Set.
Syntax
C#
Objective-C
C++/CLI
Java
public int ModuleCount { get; } 
@property (nonatomic, assign, readonly) NSUInteger moduleCount; 
public int getModuleCount() 
public: 
property int ModuleCount { 
   int get(); 
} 

Property Value

The number of modules in the entire Data Set.

Remarks

The following methods will also help you navigate the Data Set as either a tree or a list: GetFirstElement

GetLastElement

GetPreviousElement

GetNextElement

If you evaluate the Data Set as a tree, you can also use the following methods to navigate the tree:

GetRootElement

GetParentElement

GetChildElement

Example
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 23.0.2024.8.20
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.