#include "Ltdic.h"
L_UINT16 LDicomDS::GetInfoImage(pElement, pInfo, nIndex)
Retrieves information about the specified image.
Pointer to a DICOMELEMENT structure within the Data Set.
Pointer to a DICOMIMAGE structure that contains the information about the specified image.
Index value that indicates the position of the image. This is a zero-based index. For example, if nIndex is 0, information about the first image in the Pixel Data Element will be retrieved.
Value | Meaning |
---|---|
0 | SUCCESS |
>0 | An error occurred. Refer to Return Codes. |
Most DICOM files will only have one Data Element of type TAG_PIXEL_DATA. Therefore, in most instances you can set pElement to NULL, since the function will automatically retrieve information about the image at the specified index within the only Pixel Data Element in the file. If pElement is not NULL, it must point to the Pixel Data Element itself.
If the DICOM file is CLASS_BASIC_DIRECTORY, the file may contain more than one Pixel Data Element. In this case you must specify in pElement the Pixel Data Element from which to get the image information.
Required DLLs and Libraries
Win32, x64
This example returns the information about an image.
L_INT LDicomDS_GetInfoImageExample()
{
L_INT nRet;
LDicomDS *pDS;
pDICOMELEMENT pElement;
DICOMIMAGE Info;
pDS = new LDicomDS(NULL);
nRet = pDS->LoadDS(MAKE_IMAGE_PATH(TEXT("image1.dcm")), 0);
if(nRet != DICOM_SUCCESS)
return nRet;
pElement = pDS->FindFirstElement(NULL, TAG_PIXEL_DATA, FALSE);
if (pElement != NULL)
{
nRet = pDS->GetInfoImage(pElement, &Info, 0);
if(nRet != DICOM_SUCCESS)
return nRet;
}
delete pDS;
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