public DicomElement GetSignature(
DicomElement item,
int index
)
public:
DicomElement^ GetSignature(
DicomElement^ item,
int index
)
item
The item in which the required Digital Signature is located. Set this parameter to null if the Digital Signature is located in the main Data Set.
index
The zero-based index of the required Digital Signature. This should be a number from 0 to GetSignaturesCount - 1.
The Digital Signatures Sequence Item that corresponds to the required Digital Signature, or a null reference (Nothing in VB) if the specified index is invalid.
For each Digital Signature in the main Data Set or in an item of a sequence of items, there should be a corresponding item under the Digital Signatures sequence (FFFA,FFFA) located in the main Data Set or in the item. This method can be used to obtain that Digital Signatures Sequence Item. Along with this method, call the GetSignaturesCount method to enumerate the Digital Signatures in the main Data Set or in an item of a sequence of items. Once the Digital Signatures Sequence Item is obtained, the following methods can be used to verify, delete, or get information about the Digital Signature:
Call the FindSignature method, to search the whole Data Set for a specific Digital Signature.
using Leadtools;
using Leadtools.Dicom;
public void EnumerateSignatures()
{
string dicomFileName = Path.Combine(LEAD_VARS.ImagesDir, "DICOM", "Signed.dcm");
//Make sure to initialize the DICOM engine, this needs to be done only once
//In the whole application
DicomEngine.Startup();
using (DicomDataSet dataset = new DicomDataSet())
{
//Load DICOM File
dataset.Load(dicomFileName, DicomDataSetLoadFlags.None);
// We will enumerate the Digital Signatures in the main Data Set
int signaturesCount = dataset.GetSignaturesCount(null);
if (signaturesCount == 0)
{
Console.WriteLine("No Digital Signatures in the main Data Set.");
return;
}
string msg;
if (signaturesCount == 1)
{
msg = "There is 1 Digital Signature in the main Data Set.Do you want to examine it?";
}
else
{
msg = String.Format("There are {0} Digital Signatures in the main Data Set. Do you want to examine them?", signaturesCount);
}
Console.WriteLine($"Sample: {msg}");
for (int i = 0; i < signaturesCount; i++)
{
ExamineSignature(dataset, dataset.GetSignature(null, i));
}
}
DicomEngine.Shutdown();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.