LEADTOOLS Support
Medical
Medical SDK Examples
HOW TO : Retrieve each module in a DICOM file along with element values
#1
Posted
:
Wednesday, June 28, 2017 10:21:46 AM(UTC)
Groups: Registered
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:
Code:
//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";
Console.WriteLine(s);
//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";
Console.WriteLine(output);
}
}
Nick Villalobos
Developer Support Engineer
LEAD Technologies, Inc.
#2
Posted
:
Thursday, March 26, 2020 3:54:38 PM(UTC)
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
Luke Duvall
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
Medical
Medical SDK Examples
HOW TO : Retrieve each module in a DICOM file along with element values
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.