JuliaArrays / PaddedViews.jl

Add virtual padding to the edges of an array
Other
49 stars 9 forks source link

Repeat, Mirror, Reflect, etc #5

Open SimonDanisch opened 7 years ago

SimonDanisch commented 7 years ago

This doesn't seem to support the classic padding styles by repeating values already inside the array. Is support planned, or not in the scope of this package? Am I missing any package doing this already?

Evizero commented 7 years ago

There are extrapolation in Interpolations.jl for these kind of schemes. After all this kind of "padding" needs to reason about space. PaddedViews are quite ignorant of that, which make them simple.

Evizero commented 7 years ago

Could be useful additions though, the indices computation for those schemes are reasonably simple

SimonDanisch commented 7 years ago

ha funny... I was searching this in order to work with Interpolations! Guess I should have read the docs more carefully! But I do see this rather as a padding and not extrapolation ;)

Evizero commented 7 years ago

But I do see this rather as a padding and not extrapolation ;)

Until you query A[3.52, 3.3] in a 3x3 array :)

timholy commented 7 years ago

ImageFiltering also has some more sophisticated padding. This is really just a quick crutch for visualization (http://juliaimages.github.io/latest/indexing.html), although it could become more than that. I'm not opposed to doing more with it, but since ImageFiltering already does this (in a different way, not as a "view") I think we would have to think carefully about how we would want to implement this.

timholy commented 5 years ago

https://github.com/JuliaImages/ImageFiltering.jl/pull/99

RoyiAvital commented 4 years ago

Does ImageFiltering also use if per access of pixel?

RoyiAvital commented 2 years ago

Periodic / Circular view can be brought from CircularArrays.jl.