Skip to content

Commit

Permalink
Always overlap image slices (omit zero-overlap case)
Browse files Browse the repository at this point in the history
  • Loading branch information
msorelli committed May 14, 2024
1 parent d80f5eb commit be0f4a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions foa3d/slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ def compute_overlap_range(smooth_sigma, frangi_sigma, px_rsz_ratio, truncate=4):
if smooth_sigma is not None:
frangi_sigma = np.concatenate((smooth_sigma, frangi_sigma))

max_sigma = np.max(frangi_sigma)

ovlp = int(np.ceil(2 * truncate * max_sigma) // 2) if smooth_sigma is not None else 0
ovlp = int(np.ceil(2 * truncate * np.max(frangi_sigma)) // 2)

if px_rsz_ratio is not None:
rsz_ovlp = np.multiply(ovlp * np.ones((3,)), px_rsz_ratio).astype(int)
Expand Down

0 comments on commit be0f4a0

Please sign in to comment.