Skip to content

Commit

Permalink
Round to nearest integer
Browse files Browse the repository at this point in the history
  • Loading branch information
aditiiyer committed Nov 27, 2024
1 parent 593df3e commit fa4a764
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cerr/dataclasses/dose.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from cerr.dataclasses import scan as scn
from cerr.dataclasses import structure
from cerr.utils import uid
from cerr.utils.statistics import round
from cerr.utils.interp import finterp3
import nibabel as nib
import json
Expand Down Expand Up @@ -731,7 +732,7 @@ def sum(doseIndV, planC, fxCorrectDict={}):
maxExtentsV = np.array([np.max(maxExtentsM[:, 0]), np.min(maxExtentsM[:, 1]),
np.max(maxExtentsM[:, 2])])
outResV = np.array([np.min(resM[:,0]), np.max(resM[:,1]), np.min(resM[:,2])])
numPoints = ((maxExtentsV - minExtentsV)/outResV).astype(int) + 1
numPoints = round((maxExtentsV - minExtentsV)/outResV) + 1
xOutV = np.linspace(minExtentsV[0], maxExtentsV[0], num=numPoints[0], endpoint=True)
yOutV = np.linspace(minExtentsV[1], maxExtentsV[1], num=numPoints[1], endpoint=True)
zOutV = np.linspace(minExtentsV[2], maxExtentsV[2], num=numPoints[2], endpoint=True)
Expand Down

0 comments on commit fa4a764

Please sign in to comment.