New user. Can't get dicompyler to open patient data.

189 views
Skip to first unread message

--Rafe

unread,
Mar 20, 2012, 3:07:07 PM3/20/12
to dicompyler
Hello. I apologize in advance if this problem has been answered
elsewhere. I'm a new user of this program and a fairly new python user
also.

I'm working on a thesis project looking at dose distributions to
various structures and came across this program. It looks great but I
can't get it to work.

I downloaded dicompyler and ran main.py but got the following errors
upon trying to load patient data. (I tried a patient I downloaded and
the testdata from the website):

** (python:26775): CRITICAL **: murrine_style_draw_flat_box: assertion
`width >= -1' failed
ERROR: Unhandled exception: Traceback (most recent call last):
File "main.py", line 685, in Run
run_old(*args, **kwargs)
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/dicompyler-0.4.1_1-
py2.7.egg/dicompyler/dicomgui.py", line 698, in GetPatientData
if (np.any(np.array(np.round(iop0 - iop1),
File "/usr/lib/pymodules/python2.7/numpy/core/fromnumeric.py", line
2263, in round_
return round(decimals, out)
AttributeError: rint


I'm running Ubuntu 11.10 (64-bit)
Python 2.7.2+
wxPython 2.8.11.0
PIL 1.17

pydicom 0.9.7
NumPy 1.5.1
matplotlib 1.01

Thank you very much for any help

Rafe



Adit Panchal

unread,
Mar 20, 2012, 3:15:45 PM3/20/12
to dicom...@googlegroups.com
Hello Rafe,

Currently dicompyler does not work with pydicom 0.9.7 due to the way
Decimal data is handled. The workaround right now is to use pydicom
0.9.6.

FYI, I have gotten a patch working with pydicom 0.9.7, but it is
rather slow due to the conversion of decimals to floats.

You may also want to run dicompyler via the dicompyler_app.py script
as that is now the preferred way of running dicompyler.

Hope that helps,

Adit

--Rafe

unread,
Mar 20, 2012, 4:57:21 PM3/20/12
to dicompyler
Adit,

Thank you for the quick response.
Using pydicom 0.9.6 allows me to now load patient data.

I am unable to find the dicompyler_app.py script in my installation.
Do I need to preform another step in order to generate the script?

Thank you,
Rafe

Adit Panchal

unread,
Mar 20, 2012, 5:56:01 PM3/20/12
to dicom...@googlegroups.com
Hi Rafe,

I forgot to mention - if you are running from source or a tgz, then it
is dicompyler_app.py in the extracted folder. Otherwise, there should
be a command added to your path called dicompyler if you have
installed from the Python package.

I think main.py will still continue to work when installed via the
package, since the script expects the package to be installed.

Adit

Darcy Mason

unread,
Mar 20, 2012, 6:36:00 PM3/20/12
to dicompyler
On Mar 20, 3:15 pm, Adit Panchal <apanc...@bastula.org> wrote:
>
> Currently dicompyler does not work with pydicom 0.9.7 due to the way
> Decimal data is handled. The workaround right now is to use pydicom
> 0.9.6.
>
> FYI, I have gotten a patch working with pydicom 0.9.7, but it is
> rather slow due to the conversion of decimals to floats.
>

Adit,

The change in pydicom to using Decimal is quite new, and if there's
anything I can change in pydicom to help smooth this out, I'd be happy
to do it. There is a major overhaul going on for the move to python 3
compatibility anyway, so now is a good time. I didn't think much about
speed in that DS change; I thought that DS types were mainly used in
dicom elements that would have little impact. Actually I'm curious --
what kind of math operations are causing the slowdown?

I have one idea where the float could be stored in addition to the
Decimal, but it's probably worth doing some time profiling to come up
with the best solution.

If you have any ideas on how it could work better, let me know.

Darcy
Reply all
Reply to author
Forward
0 new messages