Hi,
I'm developing a dicom file creator putting our ecg database data.
I have problems with WaveformData tag, I have a Sint16 array but I have seen that only putAndInsertUint16Array or putAndInsertUint8Array methods are available for this tag.
Converting Sint16 array to Uint16 I can create a Dicom Waveform File, and open it in a dicom viewer but I can't get the expected values.
I can't use putAndInsertUint16Array because is only applicable to the VRs: SS, xs (US or SS) and WaveformData is OB or OW.
I need to send a signed signal and I don't know what I'm doing wrong, how can I handle this?
Thanks in advance
Natalie
Signed Waveform
Moderator: Moderator Team
Re: Signed Waveform
Hello again,
I think I have solved it working with Uint8 arrays and putAndInsertUint8Array. Sorry if it seemed a stupid question.
Regards
I think I have solved it working with Uint8 arrays and putAndInsertUint8Array. Sorry if it seemed a stupid question.
Regards
Re: Signed Waveform
hi, seems i am a stupider one. I have the same question and i am not familiar with C++. I can not uderstand why Uint8 arrays could solve the problem.nmoraes wrote:Hello again,
I think I have solved it working with Uint8 arrays and putAndInsertUint8Array. Sorry if it seemed a stupid question.
Regards
since the tag WaveformBitsAllocated(5400,1004) in my program is set to be 16. i use putAndIsertUnit16Array, but the result seems wrong.
Could anyone tell me how to solve it?(in details will be better ) .
Thanks in advance.
-
- Posts: 61
- Joined: Wed, 2010-05-19, 09:27
- Location: Taipei, Taiwan
Re: Signed Waveform
Hi, when you use Uint8 arrays then the default VR of WaveformData is OB. That is why using Uint8 will work. If the value of WaveformBitsAllocated(5400,1004) is 16, then the VR of WaveformData shall be set as OW. Then you can use putAndIsertUnit16Array that the result would be correct.Mark Wang wrote:nmoraes wrote: since the tag WaveformBitsAllocated(5400,1004) in my program is set to be 16. i use putAndIsertUnit16Array, but the result seems wrong.
Could anyone tell me how to solve it?(in details will be better ) .
Thanks in advance.
Re: Signed Waveform
I have another question. when i use putAndInsertUint8Array (Item_1->putAndInsertUint8Array(DCM_WaveformData,(Uint8 *)databyte, NUMBER_OF_SAMPLES_DUOBLE)), and the WaveformBitsAllocated(5400,1004) is set to be 8. But it does not work as i wish, the VR of WaveformData is OW, not OB.Chung-Yueh Lien wrote:Hi, when you use Uint8 arrays then the default VR of WaveformData is OB. That is why using Uint8 will work. If the value of WaveformBitsAllocated(5400,1004) is 16, then the VR of WaveformData shall be set as OW. Then you can use putAndIsertUnit16Array that the result would be correct.Mark Wang wrote:nmoraes wrote: since the tag WaveformBitsAllocated(5400,1004) in my program is set to be 16. i use putAndIsertUnit16Array, but the result seems wrong.
Could anyone tell me how to solve it?(in details will be better ) .
Thanks in advance.
the databyte in my program is defined here(byte *databyte = new byte[NUMBER_OF_SAMPLES_DUOBLE].
Does there anyone know how to solve this?
Thanks in advance.
-
- Posts: 61
- Joined: Wed, 2010-05-19, 09:27
- Location: Taipei, Taiwan
Re: Signed Waveform
The attribute WaveformData has the VR which may be OB or OW, so you have to specify which one you want to use. In case, you can create a new data element and insert it into Item_1 for verifying your codes, such as:Mark Wang wrote: I have another question. when i use putAndInsertUint8Array (Item_1->putAndInsertUint8Array(DCM_WaveformData,(Uint8 *)databyte, NUMBER_OF_SAMPLES_DUOBLE)), and the WaveformBitsAllocated(5400,1004) is set to be 8. But it does not work as i wish, the VR of WaveformData is OW, not OB.
the databyte in my program is defined here(byte *databyte = new byte[NUMBER_OF_SAMPLES_DUOBLE].
Does there anyone know how to solve this?
Thanks in advance.
Code: Select all
DcmElement *newelement;
newDicomElement(newelement, DCM_WaveformData);
newelement->createUint8Array(NUMBER_OF_SAMPLES_DUOBLE, databyte);
Item_1->insert(element);
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest