Adds a new item under the "Graphic Layer Sequence" (0070,0060) in the Graphic Layer Module".
#include "ltdic.h"
L_LTDIC_API L_UINT16 L_DicomCreateLayer(hDS, pGraphicLayer, pLayerIndex)
A DICOM handle.
Pointer to a Graphic Layer attributes structure, which holds the attributes of the layer to be created.
Pointer to a variable, which will be updated with the index of the newly created layer.
Value | Meaning |
---|---|
DICOM_SUCCESS | The function was successful. |
>0 | An error occurred. Refer to Return Codes. |
Before calling this function, initialize pDICOMGRAPHICLAYER->uStructSize to be sizeof(DICOMGRAPHICLAYER) and initialize all the structure members.
If for example there are already 2 items under the "Graphic Layer Sequence" (0070,0060) and we call this function, then the index of the new layer will be 2.
This function will fail and return DICOM_ERROR_PARAMETER if a layer with the same name as the new layer already exists in the dataset.
Win32, x64, Linux.
L_INT DicomCreateLayerExample(HDICOMDS hPresStateDS)
{
DICOMGRAPHICLAYER Layer;
L_TCHAR szText[256] = TEXT("\0");
L_INT16 RGBColors[3];
L_INT16 pGrayScle[1];
L_UINT uLayerIndex;
L_UINT16 nRet;
memset(&Layer, 0, sizeof(DICOMGRAPHICLAYER));
pGrayScle[0] = 32767;
RGBColors[0] = 255;
RGBColors[1] = 255;
RGBColors[2] = 255;
Layer.nLayerOrder = 1;
Layer.pszLayerDescription = TEXT("First Layer");
Layer.pszLayerName = TEXT("LAYER0");
Layer.puGrayscale = pGrayScle;
Layer.pRGBLayerColors = RGBColors;
Layer.uStructSize = sizeof(DICOMGRAPHICLAYER);
nRet = L_DicomCreateLayer( hPresStateDS,
&Layer,
&uLayerIndex);
if (nRet == DICOM_SUCCESS)
{
wsprintf(szText, TEXT("Index of the new layer is: %u "), uLayerIndex);
MessageBox( NULL,
szText,
TEXT("Note"),
MB_OK);
}
return nRet;
}
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.