Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, June 28, 2017 10:21:46 AM(UTC)
Nick Villalobos

Groups: Registered, Manager, Tech Support, Administrators
Posts: 119

Was thanked: 4 time(s) in 4 post(s)

Attached you will find a console application that loads in a Dicom file and prints out the module count, module name, each element within the module and more. This is very similar to the module list viewing from the Dicom Demo that can found here:

  • C:\LEADTOOLS 19\Examples\DotNet\CS\DicomDemo

The core to this project is simply a nested for loop that loops through one module at a time then will retrieve each element within that module. You can view that code below:


//Loop through each module in the dataset
for (int j = 0; j <= totalModules - 1; j++)
   module = dataSet.FindModuleByIndex(j);

   string s =
      $"Module Number: {j + 1}\n" +
      $"Module Type: {module.Type.ToString()}\n" +
      $"Module Element Count: {module.Elements.Length}\n\n";


   //Loop through each element within the module
   for (int i = 0; i <= module.Elements.Length - 1; i++)
      element = module.Elements[i];

      DicomTag tag = DicomTagTable.Instance.Find(element.Tag);

      output =
     $"Element Name: {tag.Name}\n" +
     $"Tag: {element.Tag} \n" +
     $"VR: {element.VR.ToString()}\n";


File Attachment(s):
Dicom_ReadModulesElements.zip (2,936kb) downloaded 305 time(s).
Nick Villalobos
Developer Support Engineer
LEAD Technologies, Inc.


Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, March 26, 2020 3:54:38 PM(UTC)
Luke Duvall

Groups: Registered, Tech Support, Administrators
Posts: 34

Update Project to LEADTOOLS Verison 20 using Visual Studio 2019

  • Dicom Demo can be found here: C:\LEADTOOLS 20\Examples\DotNet\CS\DicomDemo

File Attachment(s):
Dicom_ReadModulesElements.zip (219kb) downloaded 7 time(s).
Luke Duvall
Developer Support Engineer
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2021, Yet Another Forum.NET
This page was generated in 0.080 seconds.