#include "ltdic.h"
L_UINT16 LDicomDS::GetDefaultJ2KOptions(pOptions, nSize)
Gets the default JPEG 2000 compression options.
Pointer to a structure to be updated with the default JPEG 2000 compression options.
Size of the structure pointed to by pOptions.
Value | Meaning |
---|---|
0 | SUCCESS |
>0 | An error occurred. Refer to Return Codes. |
Required DLLs and Libraries
Win32, x64
This example inserts an image in a Data Set Using the JPEG 2000 compression with default compression options.
L_INT LDicomDS_GetDefaultJ2KOptionsExample(LDicomDS *pDS ,pBITMAPHANDLE pBitmap)
{
L_INT nRet;
if(pDS && pBitmap)
{
pDICOMELEMENT pElement;
FILEJ2KOPTIONS J2KOptions;
// Get the default JPEG 2000 compression options.
nRet = pDS->GetDefaultJ2KOptions(&J2KOptions, sizeof(FILEJ2KOPTIONS));
if(nRet != DICOM_SUCCESS)
return nRet;
// Set the new compression options.
nRet = pDS->SetJ2KOptions(&J2KOptions);
if(nRet != DICOM_SUCCESS)
return nRet;
pElement = pDS->FindFirstElement(NULL, TAG_PIXEL_DATA, FALSE);
if (pElement != NULL)
{
nRet = pDS->InsertImage( pElement,
pBitmap,
1,
IMAGE_COMPRESSION_J2K_LOSSY,
IMAGE_PHOTOMETRIC_MONOCHROME2,
0,
25,
DICOM_SETIMAGE_AUTO_SET_VOI_LUT,
NULL,
NULL);
if(nRet != DICOM_SUCCESS)
return nRet;
}
}
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