SetNumberOfSamplesPerChannel method (IDicomWaveformGroup Interface)

VB.NET example

C# example

Visual Basic example

Visual C++ 6.0 example

 

Syntax

short SetNumberOfSamplesPerChannel(long lNumberOfSamples);

Overview

Refer to Working with DICOM Waveforms.

Remarks

The SetNumberOfSamplesPerChannel method allocates space for the samples of each channel in the waveform group. The number of samples per channel can be obtained from the NumberOfSamplesPerChannel property or from the NumberOfSamples property (lDicomWaveformChannel).

All channels within a multiplex group have the same number of samples.

Call this method, to allocate the necessary space for the samples of each channel, before calling the SetChannelSamples method to set the values of the samples.

If this method is called after setting the samples for one or more channels in the waveform group, then the method will expand or shrink the arrays that hold the samples for each of the channels accordingly. For example, if this method is called with lNumberOfSamples set to 150 and then the SetChannelSamples method is called with 150 samples for a channel and then SetNumberOfSamplesPerChannel is called again with lNumberOfSamples set to 125, then the SetNumberOfSamplesPerChannel method will shrink the array that holds the samples for the channel to be 125 samples long and will discard all the samples that no longer fit in the array.

See Also

Elements:

Reset method, LoadAudio method, SaveAudio method, Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property

Topics:

DICOM Waveform Groups: Manipulating Channels