JuliaImages / ImageFiltering.jl

Julia implementations of multidimensional array convolution and nonlinear stencil operations
Other
99 stars 49 forks source link

Generalize `NA` to take `na` predicate as argument (not just `isnan`) #172

Closed yha closed 4 years ago

yha commented 4 years ago

Useful for filtering SVector or GeometryTypes.Point arrays with NA(x->any(isnan,x)). May be also useful to do NA(ismissing) in the future, but imfilter with missings doesn't work yet for other reasons.

I removed the line out[nanflag] .= nan(T), which may be breaking (changes the behavior of plain NA()). I'm not sure why it was there; seems to me like a bug.

timholy commented 4 years ago

Let's re-run this now on top of #174.

codecov[bot] commented 4 years ago

Codecov Report

Merging #172 into master will decrease coverage by 0.75%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   91.65%   90.90%   -0.76%     
==========================================
  Files           9        9              
  Lines        1222     1231       +9     
==========================================
- Hits         1120     1119       -1     
- Misses        102      112      +10     
Impacted Files Coverage Δ
src/border.jl 94.90% <100.00%> (-0.61%) :arrow_down:
src/imfilter.jl 90.40% <100.00%> (-0.41%) :arrow_down:
src/ImageFiltering.jl 76.19% <0.00%> (-3.81%) :arrow_down:
src/mapwindow.jl 85.09% <0.00%> (-2.10%) :arrow_down:
src/borderarray.jl 89.70% <0.00%> (-1.34%) :arrow_down:
src/kernel.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aada1d2...d9c06e5. Read the comment docs.