Skip to content

Commit 267fdd0

Browse files
committed
Add comment
1 parent 590cdfb commit 267fdd0

File tree

1 file changed

+2
-1
lines changed
  • src/torchio/transforms/preprocessing/spatial

1 file changed

+2
-1
lines changed

src/torchio/transforms/preprocessing/spatial/resample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ def _get_sigmas(downsampling_factor: np.ndarray, spacing: np.ndarray) -> np.ndar
410410
spacing: Array with the spacing of the input image in mm.
411411
"""
412412
k = downsampling_factor
413-
variance = (k**2 - 1**2) * (2 * np.sqrt(2 * np.log(2))) ** (-2)
413+
# Equation from top of page 678 of proceedings (4/9 in the PDF)
414+
variance = (k**2 - 1) * (2 * np.sqrt(2 * np.log(2))) ** (-2)
414415
sigma = spacing * np.sqrt(variance)
415416
return sigma

0 commit comments

Comments
 (0)