Extracting a Wave Stream From a Data Set Example for VB.NET
Function GetWaveFileFromDataSet(ByRef objDataSet As LTDICLib.LEADDicomDS, ByRef sResultingWaveFilename As String) As Boolean
GetWaveFileFromDataSet = False
'Do
we have any waveforms in the Data Set?
If objDataSet.GetWaveformGroupCount()
< 1 Then
Exit
Function
End If
Dim objAudioWaveformGroup As New LTDICLib.DicomWaveformGroup
objAudioWaveformGroup.EnableMethodErrors = False
' Extract the first waveform group
If objDataSet.GetWaveformGroup(0, objAudioWaveformGroup) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If
' Extract the wave stream from the waveform group and save it to disk
If objAudioWaveformGroup.SaveAudio(sResultingWaveFilename) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If
GetWaveFileFromDataSet = True
End Function