Gets a waveform group.
#include "Ltdic.h"
L_LTDIC_API L_UINT16 L_DicomGetWaveformGroup(hDS, uIndex, hDICOMWaveFormGroup)
A DICOM handle.
Zero-based index of the group to be retrieved. As an example, if there are three waveform groups, use an index of 2 to retrieve the third group.
A DICOM waveform group handle
Value | Meaning |
---|---|
DICOM_SUCCESS | The function was successful. |
> 0 | An error occurred. Refer to Return Codes. |
In DICOM, a waveform consists of one or more multiplex groups, each encoded into an item in the "Waveform Sequence" (5400,0100). Use this function to extract the specified multiplex group.
This function populates the waveform group referenced by hDICOMWaveFormGroup with the multiplex group attributes and for each channel in the group, adds a new channel by calling L_DicomWaveGrpAddChannel.
This function fails and returns DICOM_ERROR_NULL_PTR if hDICOMWaveFormGroup is NULL.
This is the main function for extracting waveforms from a DICOM dataset. Once this function returns and hDICOMWaveFormGroup is initialized, you can call the L_DicomWaveGrpxxx and the L_DicomChannelxxx functions, providing you comprehensive DICOM waveform support.
Win32, x64, Linux.
#define WAVEFORM_FILE MAKE_IMAGE_PATH(TEXT("Waveform.dcm"))
L_VOID DicomGetWaveFormGroupExample(L_VOID)
{
L_UINT uRet = DICOM_SUCCESS;
HDICOMDS hDS = NULL;
HDICOMWAVEFORMGROUP hDICOMWaveFormGroup = L_DicomWaveGrpCreate();
hDS = L_DicomCreateDS(NULL);
uRet = L_DicomLoadDS(hDS, WAVEFORM_FILE, 0);
if(uRet != DICOM_SUCCESS)
{
MessageBox(NULL, TEXT("Load Failed"), TEXT(""), MB_ICONSTOP);
return ;
}
// Do we have any waveform groups at all
L_UINT32 uCount = L_DicomGetWaveformGroupCount(hDS);
if (uCount == 0)
{
MessageBox(NULL, TEXT("The DICOM file you are trying to load doesn't include any waveforms. "), TEXT(""), MB_ICONSTOP );
return;
}
// There is at least one waveform group in this DS, the first waveform group will be loaded
uRet = L_DicomGetWaveformGroup(hDS, 0, hDICOMWaveFormGroup);
if (uRet != DICOM_SUCCESS)
{
MessageBox(NULL, TEXT("Failed to load the first waveform group from the dataset."),TEXT(""),MB_ICONSTOP );
}
// Do something with the waveform
// ...
// ...
// ...
// Cleanup
L_DicomWaveGrpFree(hDICOMWaveFormGroup);
L_DicomFreeDS(hDS);
}
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