spidersaint / dicompyler

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

Overestimate of volume due to off by one bug in dvhdata.py #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using v0.4a2

The following code in CalculateVolume (on line 103 of dvhdata.py) has an off by 
one bug since n will never be equal to len(sPlanes):

if ((n == 0) or (n == len(sPlanes))):
    ...

and should be replaced by 

if ((n == 0) or (n == len(sPlanes)-1)):
    ...

Original issue reported on code.google.com by randle.taylor on 7 Oct 2011 at 3:16

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 45dcbc5ce95a.

Original comment by bastula on 14 Oct 2011 at 8:08