Returns the Digital Signatures Sequence Item that corresponds to the Digital Signature that has the specified Digital Signature UID, if found in the Data Set.
public Leadtools.Dicom.DicomElement FindSignature(
string signatureUID
)
Public Function FindSignature( _
ByVal signatureUID As String _
) As Leadtools.Dicom.DicomElement
public Leadtools.Dicom.DicomElement FindSignature(
string signatureUID
)
function Leadtools.Dicom.DicomDataSet.FindSignature(
signatureUID
)
public:
Leadtools.Dicom.DicomElement^ FindSignature(
String^ signatureUID
)
signatureUID
Character string that contains the Digital Signature UID of the Digital Signature for which to search.
The Digital Signatures Sequence Item that corresponds to the Digital Signature with the specified Digital Signature UID, or a null reference (Nothing in VB) if no such Digital Signature was found in the Data Set.
Each Digital Signature should be uniquely identified by a UID specified by the Digital Signature UID (0400,0100) under the corresponding Digital Signatures Sequence Item. Call this method to search the whole Data Set for a Digital Signature by its Digital Signature UID. 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 GetSignaturesCount and GetSignature methods to enumerate the Digital Signatures in the main Data Set or in an item of a Sequence of Items.
This example will locate (find) a digital signature inside a DICOM dataset by searching for its UID.
using Leadtools;
using Leadtools.Dicom;
public void FindSignature()
{
string dicomFileName = Path.Combine(LEAD_VARS.ImagesDir, "IMAGE3.dcm");
//Make sure to initialize the DICOM engine, this needs to be done only once
//In the whole application
DicomEngine.Startup();
using (DicomDataSet ds = new DicomDataSet())
{
//Load DICOM File
ds.Load(dicomFileName, DicomDataSetLoadFlags.None);
string signatureUID = "1.2.840.114257.0.130573664";
// Search the whole Data Set for the Digital Signature with the
// specified Digital Signature UID
DicomElement signatureItem = ds.FindSignature(signatureUID);
if (signatureItem != null)
{
ds.DeleteSignature(signatureItem);
MessageBox.Show("The Digital Signature was found and got deleted.", "Sample");
}
else
{
MessageBox.Show("The Digital Signature could not be found.", "Sample");
}
}
DicomEngine.Shutdown();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Imports Leadtools
Imports Leadtools.Dicom
Public Sub FindSignature()
Dim dicomFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "IMAGE3.dcm")
'Make sure to initialize the DICOM engine, this needs to be done only once
'In the whole application
DicomEngine.Startup()
Dim ds As DicomDataSet = New DicomDataSet()
Using (ds)
'Load DICOM File
ds.Load(dicomFileName, DicomDataSetLoadFlags.None)
Dim signatureUID As String = "1.2.840.114257.0.130573664"
' Search the whole Data Set for the Digital Signature with the
' specified Digital Signature UID
Dim signatureItem As DicomElement = ds.FindSignature(signatureUID)
If Not signatureItem Is Nothing Then
ds.DeleteSignature(signatureItem)
MessageBox.Show("The Digital Signature was found and got deleted.", "Sample")
Else
MessageBox.Show("The Digital Signature could not be found.", "Sample")
End If
End Using
DicomEngine.Shutdown()
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools;
using Leadtools.Dicom;
using Leadtools.Examples;
//public void FindSignature(Stream dicomStream)
//{
// //Make sure to initialize the DICOM engine, this needs to be done only once
// //In the whole application
// DicomEngine.Startup();
// using (DicomDataSet ds = new DicomDataSet())
// {
// //Load DICOM File
// ds.Load(dicomStream, DicomDataSetLoadFlags.None);
// string signatureUID = "1.2.840.114257.0.130573664";
// // Search the whole Data Set for the Digital Signature with the
// // specified Digital Signature UID
// DicomElement signatureItem = ds.FindSignature(signatureUID);
// if (signatureItem != null)
// {
// ds.DeleteSignature(signatureItem);
// Debug.WriteLine("The Digital Signature was found and got deleted.", "Sample");
// }
// else
// {
// Debug.WriteLine("The Digital Signature could not be found.", "Sample");
// }
// }
// DicomEngine.Shutdown();
//}
Imports Leadtools
Imports Leadtools.Dicom
'public void FindSignature(Stream dicomStream)
'{
' //Make sure to initialize the DICOM engine, this needs to be done only once
' //In the whole application
' DicomEngine.Startup();
' using (DicomDataSet ds = new DicomDataSet())
' {
' //Load DICOM File
' ds.Load(dicomStream, DicomDataSetLoadFlags.None);
' string signatureUID = "1.2.840.114257.0.130573664";
' // Search the whole Data Set for the Digital Signature with the
' // specified Digital Signature UID
' DicomElement signatureItem = ds.FindSignature(signatureUID);
' if (signatureItem != null)
' {
' ds.DeleteSignature(signatureItem);
' Debug.WriteLine("The Digital Signature was found and got deleted.", "Sample");
' }
' else
' {
' Debug.WriteLine("The Digital Signature could not be found.", "Sample");
' }
' }
' DicomEngine.Shutdown();
'}
Products |
Support |
Feedback: FindSignature Method - Leadtools.Dicom |
Introduction |
Help Version 19.0.2017.6.16
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
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.