Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/mapwindow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ export mapwindow, mapwindow!
border = "replicate",
indices = default_imginds(img, window, border), callmode=:copy!)

Apply `f` to sliding windows of `img``, with window size or axes specified by window. For
Apply `f` to sliding windows of `img`, with window size or axes specified by window. For
example, `mapwindow(median!, img, window)` returns an Array of values similar to `img`
(median-filtered, of course), whereas `mapwindow(extrema, img, window)` returns an Array of
(min, max) tuples over a window of size window centered on each point of `img`.
(min, max) tuples over a window of size `window` centered on each point of `img`.

The function `f` receives a buffer `buf`` for the window of data surrounding the current point.
The function `f` receives a buffer `buf` for the window of data surrounding the current point.

If `window`` is specified as a Dims-tuple (tuple-of-integers), then all the integers must be
If `window` is specified as a Dims-tuple (tuple-of-integers), then all the integers must be
odd and the window is centered around the current image point.

For example, if `window = (3,3)`, then `f` will receive an Array `buf``
corresponding to offsets (-1:1, -1:1) from the `imgf[i, j]`` for which this is
currently being computed. Alternatively, window can be a tuple of
For example, if `window = (3,3)`, then `f` will receive an Array `buf`
corresponding to offsets `(-1:1, -1:1)` from the `imgf[i, j]` for which this is
currently being computed. Alternatively, `window` can be a tuple of
`AbstractUnitRange`s, in which case the specified ranges are used for `buf`; this
allows you to use asymmetric windows if needed.

Expand Down
Loading