bastula / dicompyler

Extensible radiation therapy research platform and viewer for DICOM and DICOM RT
http://www.dicompyler.com
263 stars 99 forks source link

Python3 fixes for structure volume calculation #108

Closed StephenTerry closed 6 years ago

StephenTerry commented 6 years ago

When the CalculateVolume function in dvhdata.py was called, there was a call to the itervalues() method which changed to values() in Python 3. Additionally, the dictionary for each contour slice now has the key 'data' instead of the previous 'contourData' key.

bastula commented 6 years ago

I am in agreement with the contourData changes. I think for itervalues, we could use six to ensure that it still works with Python 2.7.

But maybe the bigger picture is moving this module or at least it's functions to dicompyler-core?

StephenTerry commented 6 years ago

Sounds good. I'm creating a new pull request using six. I'm agnostic on the dicompyler-core issue.