- signatureUID
- Character string that contains the Digital Signature UID of the Digital Signature for which to search.
Visual Basic (Declaration) | |
---|---|
Public Function FindSignature( _ ByVal signatureUID As String _ ) As DicomElement |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As DicomDataSet Dim signatureUID As String Dim value As DicomElement value = instance.FindSignature(signatureUID) |
C# | |
---|---|
public DicomElement FindSignature( string signatureUID ) |
C++/CLI | |
---|---|
public: DicomElement^ FindSignature( String^ signatureUID ) |
Parameters
- signatureUID
- Character string that contains the Digital Signature UID of the Digital Signature for which to search.
Return Value
The Digital Signatures Sequence Item that corresponds to the Digital Signature with the specified Digital Signature UID, or a null reference (Nothing in Visual Basic) if no such Digital Signature was found in the Data Set.This example will locate (find) a digital signature inside a DICOM dataset by searching for its UID.
Visual Basic | Copy Code |
---|---|
Public Sub FindSignature() Dim dicomFileName As String = LeadtoolsExamples.Common.ImagesPath.Path + "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 |
C# | Copy Code |
---|---|
public void FindSignature() { string dicomFileName = LeadtoolsExamples.Common.ImagesPath.Path + "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(); } |
SilverlightCSharp | Copy Code |
---|---|
SilverlightVB | Copy Code |
---|---|
Once the Digital Signatures Sequence Item is obtained, the following methods can be used to verify, delete, or get information about the Digital Signature:
Leadtools.Dicom.DicomDataSet.VerifySignature
Leadtools.Dicom.DicomDataSet.DeleteSignature
Leadtools.Dicom.DicomDataSet.GetSignatureUID
Leadtools.Dicom.DicomDataSet.GetSignatureDateTime
Leadtools.Dicom.DicomDataSet.GetSignedElement
Leadtools.Dicom.DicomDataSet.GetMacTransferSyntax
Call the GetSignaturesCount and Leadtools.Dicom.DicomDataSet.GetSignature methods to enumerate the Digital Signatures in the main Data Set or in an item of a Sequence of Items.
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)
Reference
DicomDataSet ClassDicomDataSet Members
GetSignaturesCount Method
GetSignature Method
VerifySignature Method
DeleteSignature Method
GetSignatureUID Method
GetSignatureDateTime Method
GetSignedElementsCount Method
GetSignedElement Method
GetMacTransferSyntax Method
GetMacAlgorithm Method
SaveCertificate Method
CreateSignature Method