OK, I’m pretty sure that’s the issue… You’ll note the default window for your data set is 9×9×9, as stated in the -debug output of dwidenoise:
dwidenoise: [INFO] select default patch size 9 x 9 x 9.
To verify, I’ve created an artificial dataset consisting of 5 slices of 4 concatenations of one of my existing datasets:
$ mrinfo dwi_x4_5slices.mif
************************************************
Image name: "dwi_x4_5slices.mif"
************************************************
Dimensions: 96 x 96 x 5 x 452
Voxel size: 2.5 x 2.5 x 2.5 x ?
Data strides: [ -1 -3 -4 2 ]
...
If I try to process this with dwidenoise, I get precisely the same fault as you do:
$ dwidenoise dwi_x4_5slices.mif out.mif
dwidenoise: [100%] preloading data for "dwi_x4_5slices.mif"
dwidenoise: [ 20%] running MP-PCA denoising...
dwidenoise: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access
But it completes fine if I explicitly set the extent to 5 (the maximum supported by your data):
$ dwidenoise dwi_x4_5slices.mif out.mif -extent 5
dwidenoise: [100%] preloading data for "dwi_x4_5slices.mif"
dwidenoise: [100%] running MP-PCA denoising
For completeness, it also runs fine if I specify a non-isotropic patch size, as long as it fits within your 5 slices, e.g.:
$ dwidenoise dwi_x4_5slices.mif out.mif -extent 9,9,5
dwidenoise: [100%] preloading data for "dwi_x4_5slices.mif"
dwidenoise: [100%] running MP-PCA denoising
So I reckon that solves that mystery. I guess we should add a few checks to detect this for the next release, @dchristiaens?