Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C++ Class Library Help

LDicomDS::FindSignature

Show in webframe

#include "ltdic.h"

pDICOMELEMENT LDicomDS::FindSignature(pszSignatureUID)

const L_TCHAR* pszSignatureUID;

/* character string containing the Digital Signature UID */

Returns a pointer to the Digital Signatures Sequence Item that corresponds to the Digital Signature which has the specified Digital Signature UID, if found in the Data Set.

Parameter

Description

pszSignatureUID

Character string that contains the Digital Signature UID of the Digital Signature for which to search.

Returns

!NULL

Pointer to the DICOMELEMENT structure that specifies the Digital Signatures Sequence Item which corresponds to the Digital Signature with the specified Digital Signature UID.

NULL

No Digital Signature with the specified Digital Signature UID was found in the Data Set.

Comments

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. Use this function to search the whole Data Set for a Digital Signature by its Digital Signature UID.

Once a pointer to the Digital Signatures Sequence Item is obtained, the following functions can be used to verify, delete, or get information about the Digital Signature:

LDicomDS::VerifySignature

LDicomDS::DeleteSignature

LDicomDS::GetSignatureUID

LDicomDS::GetSignatureDateTime

LDicomDS::GetSignedElementsCount

LDicomDS::GetSignedElement

LDicomDS::GetMacTransferSyntax

LDicomDS::GetMacAlgorithm

LDicomDS::SaveCertificate

You can also use the LDicomDS::GetSignaturesCount and LDicomDS::GetSignature functions to enumerate the Digital Signatures in the main Data Set or in an Item of a Sequence of Items.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

LDicomDS::GetSignaturesCount, LDicomDS::GetSignature, LDicomDS::VerifySignature, LDicomDS::DeleteSignature, LDicomDS::GetSignatureUID, LDicomDS::GetSignatureDateTime, LDicomDS::GetSignedElementsCount, LDicomDS::GetSignedElement, LDicomDS::GetMacTransferSyntax, LDicomDS::GetMacAlgorithm, LDicomDS::SaveCertificate, LDicomDS::CreateSignature, Class Members

Topics:

Working with Digital Signatures

 

How to Disable the Automatic Loading of the default DICOM IOD Table

Example

L_INT LDicomDS_FindSignatureExample(LDicomDS& DataSet, const L_TCHAR*  pszSignatureUID) 
{
   // Search the whole Data Set for the Digital Signature with the
   // specified Digital Signature UID
   pDICOMELEMENT pSignatureItem = DataSet.FindSignature(pszSignatureUID); 
   if (pSignatureItem) 
   {
      L_TCHAR* pszMsg = TEXT("The Digital Signature was found.\n Press Yes to examine it or No to delete it."); 
      switch (::MessageBox(NULL, pszMsg, TEXT("Sample"), MB_YESNOCANCEL)) 
      {
      case IDYES: 
         // Refer to the example of LDicomDS::VerifySignature for the
         // function ExamineSignature
         ExamineSignature(DataSet, pSignatureItem); 
         break; 
      case IDNO: 
         // Delete the Digital Signature
         DataSet.DeleteSignature(pSignatureItem); 
         break; 
      }
   }
   else
   {
      ::MessageBox(NULL, 
                   TEXT("The Digital Signature was not found."), 
                   TEXT("Sample"),
                   MB_OK); 
   }
   return DICOM_SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.