pnlbwh / dMRIharmonization

Multi-site dMRI harmonization
Other
44 stars 14 forks source link

Optimize spm_bspline execution to avert memory error #37

Closed tashrifbillah closed 4 years ago

tashrifbillah commented 4 years ago

Optimize spm_bspline execution to avert memory error:

https://github.com/pnlbwh/dMRIharmonization/blob/spm-bspline/lib/resampling.py#L31

check_call([os.path.join(FILEDIR,'spm_bspline_exec', 'bspline')+' '+inPrefix], shell= True)

Idea (as I did for TBSS):

 cmd=(' ').join(['tbss_skeleton',
              '-i', imgPath,
              '-p', args.SKEL_THRESH, args.skeletonMaskDst, args.SEARCH_RULE_MASK,
              imgPath, modImgSkel,
              '-s', args.skeletonMask])

# use Popen() so we can wait()
p = Popen(cmd, shell=True)
p.wait()
tashrifbillah commented 4 years ago

Fixed by https://github.com/pnlbwh/dMRIharmonization/commit/993d66c28f21fcd8d1e90b206b90423f0b015f62