Enables or disables the pre-processing of image data when a function that gets a bitmap from a Pixel Data element is called.
#include "Ltdic.h"
L_VOID LDicomDS::SetKeepPixelDataIntactFlag(bSet)
Flag the indicates whether to enable or disable the pre-processing of image data when a function that gets a bitmap from a Pixel Data element is called. Possible values are:
Value | Meaning |
---|---|
TRUE | Do not pre-process the image data. |
FALSE | Pre-process the image data. |
None.
When a function that gets a bitmap from a data set is called, such as LDicomDS::GetImage or LDicomDS::GetImageList, LEADTOOLS may pre-process the image data in the bitmap handle for optimal display. Call the LDicomDS::GetKeepPixelDataIntactFlag function to determine whether LEADTOOLS will pre-process the image data. By default LEADTOOLS pre-processes the image data.
Calling the LDicomDS::SetKeepPixelDataIntactFlag function with bSet set to TRUE stops LEADTOOLS from pre-processing the image data in the bitmap handle.
NOTE: This may result in unexpected behavior when a LEADTOOLS display or image processing function is called for that bitmap handle.
Win32, x64
L_INT LDicomDS_SetKeepPixelDataIntactFlagExample()
{
L_INT nRet;
LDicomDS *pDS;
pDICOMELEMENT pElement;
BITMAPHANDLE Bitmap;
L_BOOL bKeepPixelDataUnchanged;
pDS = new LDicomDS(NULL);
nRet = pDS->LoadDS(MAKE_IMAGE_PATH(TEXT("image1.dcm")), 0);
if(nRet != DICOM_SUCCESS)
return nRet;
bKeepPixelDataUnchanged = pDS->GetKeepPixelDataIntactFlag();
if(bKeepPixelDataUnchanged == FALSE)
{
L_INT nRet = AfxMessageBox(TEXT("Would like to keep pixel data unchanged?"), MB_YESNO);
pDS->SetKeepPixelDataIntactFlag((nRet == IDYES));
}
pElement = pDS->FindFirstElement(NULL, TAG_PIXEL_DATA, FALSE);
if (pElement != NULL)
{
nRet = pDS->GetImage(pElement, &Bitmap, sizeof(BITMAPHANDLE), 0, 0, 0, NULL, NULL);
if(nRet != DICOM_SUCCESS)
return nRet;
L_FreeBitmap(&Bitmap);
}
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
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.