Skip to content

Commit

Permalink
reduce memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson committed Aug 4, 2020
1 parent 4a13835 commit 76382f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions brainreg/backend/niftyreg/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def run_niftyreg(
paths.downsampled_brain_standard_space,
)

del atlas
del reference
del target_brain

deformation_image = imio.load_any(niftyreg_paths.deformation_field)
imio.to_tiff(deformation_image[..., 0, 0], paths.deformation_field_0)
imio.to_tiff(deformation_image[..., 0, 1], paths.deformation_field_1)
Expand Down

0 comments on commit 76382f2

Please sign in to comment.