Closed tibuch closed 4 years ago
A test covering this issue is also required.
I have found the same issue independently by comparing the number of patches expected to the number of patches calculated by N2V, when the image size is exactly divisible by the patch size. This issue looks to me like it's to do with range(start, stop, step), not including 'stop'.
I think it could be fixed by replacing:
for z in range(0, data.shape[1] - shape[0], shape[0]):
by
for z in range(0, data.shape[1] - shape[0] + 1, shape[0]):
(same for all dimensions)
Fixed new version released v0.1.11
It is not possible to create patches which have the same size as the input data.
It looks like the error is somewhere in here. Probably a +1 or >= is missing.