google-code-export / pydicom

Automatically exported from code.google.com/p/pydicom
0 stars 0 forks source link

ECG - WaveformData #105

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Open ecg dicom file
2.Read WaveformData tag (inside Waveforms tag)

What is the expected output? What do you see instead?
It should be reading it as a (very long) string representing the ecg exams, 
however, for some files, it reads as a list of strings. I tried merging the 
list of string, but them the data is incorrect (as if it read wrongly part of 
it).
I tried in Matlab and it works fine, I am able to read the ecg wave

This website has some ecg dicom files, I teste with the 3 first ones, and all 
of them gave this incorrect output:
http://www.excel-medical.com/waveforms/Waveform.htm

What version of the product are you using?
I am using version 0.9.5

Original issue reported on code.google.com by andrehal...@lpds.ufsc.br on 3 Sep 2011 at 12:37

GoogleCodeExporter commented 9 years ago
Actually, the first image (12 lead ECG) does work, however, the subsequent ones 
don't

Original comment by andrehal...@lpds.ufsc.br on 3 Sep 2011 at 12:45

GoogleCodeExporter commented 9 years ago
Thanks for the detailed issue and example files. I've downloaded two of the 
files and started looking into it.

Original comment by darcymason@gmail.com on 8 Sep 2011 at 1:14

GoogleCodeExporter commented 9 years ago
So... I found a workaround, but it is still an issue.
PyDicom is interpreting the byte array from the dicom file as a string. 
However, everytime there is a "backslash" character it splits the string in 2. 
The final solution would be to make PyDicom understand that these "backslash" 
are just characters, not a new string command.

The workaround I did was to rejoin all the strings inserting "backslash" 
between them.

Original comment by andrehal...@lpds.ufsc.br on 8 Sep 2011 at 9:26

GoogleCodeExporter commented 9 years ago
I can't seem to reproduce this problem. I've tried five of the files and for 
me, ds.Waveforms[0].WaveformData is always a string (not split). Tried it on 
Mac with python 2.7 64-bit, and on Windows with python 2.6, 32-bit, both with 
pydicom 0.9.5 and the latest repository code.

The backslash character is supposed to split items for certain VRs, and not for 
others, so the kind of problem is something that could easily happen. Is there 
any kind of processing you are doing that might be triggering this?

Original comment by darcymason@gmail.com on 12 Sep 2011 at 2:02