Skip to content

Commit

Permalink
Fix interpolation on compression
Browse files Browse the repository at this point in the history
  • Loading branch information
malago86 committed Feb 10, 2022
1 parent 7d2ba0c commit 41fec74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Victre/Pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,10 @@ def compress_phantom(self, thickness=None):
if thickness is None:
# thickness = int(self.arguments_generation["compressionThickness"])
interp = interpolate.interp1d(
Constants.DENSITY_RANGES["breastHeight"], Constants.DENSITY_RANGES["compressionThickness"])
thickness = int(float(interp(
Constants.DENSITY_RANGES["breastHeight"],
Constants.DENSITY_RANGES["compressionThickness"],
fill_value="extrapolate")
thickness = np.round(float(interp(
self.arguments_mcgpu["number_voxels"][2] * self.arguments_mcgpu["voxel_size"][2] * 10)), 2)

command = "cd {:s} && ./Victre/compression/build/breastCompressMain -s {:d} -t {:f} -d {:s}/{:d}".format(
Expand Down

0 comments on commit 41fec74

Please sign in to comment.