diff --git a/CHANGELOG.md b/CHANGELOG.md index 44412a5d..78b8f88b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.2.1] - 2016-04-26 + +- Fixed a bug in the nlsam script where .nii would be memmaped and crash with an invalid dimension broadcast. Thansk to Jelle Veraart for reporting. + ## [0.2] - 2016-04-19 - stabilization script is now clipping values to zero (Bai et al. 2014) as used in the paper. @@ -7,7 +11,7 @@ The previous release was using the Koay et al. 2009 approach, which could produc - More doc to the readme. - Added link to the synthetic and in vivo data used in the experiments. -- Linux binaries now needs glibc >= 2.13 (Debian 7 and newer) instead of glibc >= 2.21 (Ubuntu 15.04 and newer). + - Removed the source archive and wheel files, as one can grab the source archive from github instead. ## [0.1] - 2016-03-22 diff --git a/scripts/nlsam b/scripts/nlsam index 134bfb2e..1bc68f12 100755 --- a/scripts/nlsam +++ b/scripts/nlsam @@ -88,7 +88,7 @@ def main(): print("Now denoising " + os.path.realpath(args.input)) vol = nib.load(args.input) - data = vol.get_data() + data = np.array(vol.get_data()) vol.uncache() affine = vol.get_affine() @@ -96,6 +96,7 @@ def main(): greedy_subsampler = True implausible_signal_boost = True + b0_thresh = 10 n_iter = args.iterations original_dtype = data.dtype @@ -127,29 +128,8 @@ def main(): if data.shape[:-1] != mask.shape: raise ValueError('data shape is {}, but mask shape {} is different!'.format(data.shape, mask.shape)) - - - crop=False - if crop: - print("cropping data and mask") - ca = 51#20#80#23 - cb = 56#170#170#150#86#27#data.shape[1] - # [90:, 88:96, 40:] [90:140, 90:160, 38:46] - # isbi : [:,22:28, :] - #mask_data=np.ones_like(data[...,0],dtype=np.bool) - data = data[:, ca:cb]#[40:129,40:129,...]#[90:150, :165, ...] #88:96, 40:] - original_shape = data.shape[:-1] + (original_shape[-1],) - # data_orig = data_orig[:, ca:cb]#[40:129,40:129,...]#[90:150, :165, ...]#88:96, 40:] - # mask_noise = mask_noise[:, ca:cb]#[40:129,40:129,...]#[90:150, :165, ...]#88:96, 40:] - mask = mask[:, ca:cb]#[40:129,40:129,...]#[90:150, :165, ...]#88:96, 40:] - # gold_standard = gold_standard[:, ca:cb]#[40:129,40:129,...]#[90:150, :165, ...]#88:96, 40:] - sigma = sigma[:, ca:cb] - - - bvals, bvecs = read_bvals_bvecs(args.bvals, args.bvecs) - b0_thresh = 10 b0_loc = tuple(np.where(bvals <= b0_thresh)[0]) num_b0s = len(b0_loc)