#include "Ltdic.h"
L_UINT16 LDicomWaveformGroup::SaveAudio(pszFilename, uFlags = 0)
Creates an audio (wave) file from the channels in the waveform group.
Name of the audio file to be created.
Reserved for future use. Pass 0.
Value | Meaning |
---|---|
0 | The function was successful. |
> 0 | An error occurred. Refer to Return Codes. |
This function is very useful for extracting audio (wave) data from a DICOM object of type "Basic Voice Audio" (1.2.840.10008.5.1.4.1.1.9.4.1), which is typically used for report dictation.
The resulting wave file has the following characteristics:
LDicomWaveformGroup::GetNumberOfChannels
to get the number of channels in a multiplex group.LDicomWaveformGroup::GetSamplingFrequency
to get this value.LDicomWaveformGroup::GetSampleInterpretation
.Required DLLs and Libraries
Win32, x64
This sample shows how to extract a wave stream from a dataset.
L_INT LDicomWaveformGroup_SaveAudioExample(LDicomDS &InputDS, L_TCHAR * pszInputWaveFileName, L_TCHAR * pszResultingWaveFileName)
{
L_INT nRet;
LDicomWaveformGroup AudioWaveformGroup;
// Do we have any waveforms in the dataset?
if(InputDS.GetWaveformGroupCount() <1)
{
return -1;
}
// Load an audio file into the waveform group.
nRet = AudioWaveformGroup.LoadAudio(pszInputWaveFileName,0);
if(nRet != DICOM_SUCCESS)
return nRet;
// Extract the wave stream from the waveform group and save it to disk
nRet = AudioWaveformGroup.SaveAudio(pszResultingWaveFileName,0);
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