#include "ltdic.h"
pDICOMELEMENT LDicomDS::GetSignature(pItem, uIndex)
Returns a pointer to the Digital Signatures Sequence Item that corresponds to the Digital Signature at the specified index.
Pointer to a DICOMELEMENT structure that specifies 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.
The index of the required Digital Signature. This should be a number from 0 to LDicomDS::GetSignaturesCount(pItem) minus 1.
Value | Meaning |
---|---|
!NULL | Pointer to the DICOMELEMENT structure that specifies the Digital Signatures Sequence Item which corresponds to the required Digital Signature. |
NULL | 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 function can be used to obtain a pointer to that Digital Signatures Sequence Item.
Along with this function, the function LDicomDS::GetSignaturesCount can be used to enumerate the Digital Signatures in the main Data Set or in an Item of a Sequence of Items. 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::GetSignatureDateTime
LDicomDS::GetSignedElementsCount
LDicomDS::GetMacTransferSyntax
You can also use the function LDicomDS::FindSignature to search the whole Data Set for a specific Digital Signature.
Required DLLs and Libraries
Win32, x64
L_INT LDicomDS_GetSignatureExample(LDicomDS& DataSet)
{
// We will enumerate the Digital Signatures in the main Data Set
L_UINT32 uSignaturesCount = DataSet.GetSignaturesCount(NULL);
if (uSignaturesCount == 0)
{
::MessageBox(NULL,
TEXT("No Digital Signatures in the main Data Set."),
TEXT("Sample"),
MB_OK);
return DICOM_SUCCESS;
}
L_TCHAR szMsg[128];
if (uSignaturesCount == 1)
{
lstrcpy(szMsg, TEXT("There is 1 Digital Signature in the main Data Set. Do you want to examine it?"));
}
else
{
wsprintf(szMsg,
TEXT("There are %lu Digital Signatures in the main Data Set. Do you want to examine them?"),
uSignaturesCount);
}
if (::MessageBox(NULL, szMsg, TEXT("Sample"), MB_YESNO) != IDYES)
{
return DICOM_SUCCESS;
}
for (L_UINT32 i = 0; i < uSignaturesCount; i++)
{
// Refer to the example of LDicomDS::VerifySignature for the
// function ExamineSignature
ExamineSignature(DataSet, DataSet.GetSignature(NULL, i));
}
return DICOM_SUCCESS;
}
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.