What steps will reproduce the problem?
1. Import a RT Plan set with images, structures, plan, and dose /w differential
DVHs
What is the expected output? What do you see instead?
The processing progresses until 100%, where it stops.
The following traceback is given:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "main.py", line 280, in LoadPatientDataThread
dvh['min'] = dvhdoses.get_dvh_min(dvh['data'], ptdata['rxdose'])
File "/Projects/python/dicompyler/dvhdoses.py", line 27, in get_dvh_min
mindose = 100*mindose/doseref
UnboundLocalError: local variable 'mindose' referenced before assignment
Please use labels and text to provide additional information.
Basically, the mindose cannot be calculated, because the function assumes it is
receiving a cDVH array. The proper fix is to convert the dDVH to to a cDVH then
allow the calculation to proceed.
The easiest workaround is to change line 322 in dicomparser.py to:
if self.HasDVHs():
Original issue reported on code.google.com by bastula on 7 Oct 2010 at 1:49
Original issue reported on code.google.com by
bastula
on 7 Oct 2010 at 1:49