Skip to content

Commit

Permalink
Rename package to ImageFiltering. Closes #1.
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Sep 13, 2016
1 parent 535a135 commit 029da07
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 48 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ notifications:
# uncomment the following lines to override the default test script
#script:
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# - julia -e 'Pkg.clone(pwd()); Pkg.build("ImagesFiltering"); Pkg.test("ImagesFiltering"; coverage=true)'
# - julia -e 'Pkg.clone(pwd()); Pkg.build("ImageFiltering"); Pkg.test("ImageFiltering"; coverage=true)'
after_success:
# push coverage results to Coveralls
- julia -e 'cd(Pkg.dir("ImagesFiltering")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
- julia -e 'cd(Pkg.dir("ImageFiltering")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# push coverage results to Codecov
- julia -e 'cd(Pkg.dir("ImagesFiltering")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
- julia -e 'cd(Pkg.dir("ImageFiltering")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The ImagesFiltering.jl package is licensed under the MIT "Expat" License:
The ImageFiltering.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2016: Tim Holy.
>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ImagesFiltering
# ImageFiltering

[![Build Status](https://travis-ci.org/JuliaImages/ImagesFiltering.jl.svg?branch=master)](https://travis-ci.org/JuliaImages/ImagesFiltering.jl)
[![Build Status](https://travis-ci.org/JuliaImages/ImageFiltering.jl.svg?branch=master)](https://travis-ci.org/JuliaImages/ImageFiltering.jl)

[![Coverage Status](https://coveralls.io/repos/JuliaImages/ImagesFiltering.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/JuliaImages/ImagesFiltering.jl?branch=master)
[![Coverage Status](https://coveralls.io/repos/JuliaImages/ImageFiltering.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/JuliaImages/ImageFiltering.jl?branch=master)

[![codecov.io](http://codecov.io/github/JuliaImages/ImagesFiltering.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaImages/ImagesFiltering.jl?branch=master)
[![codecov.io](http://codecov.io/github/JuliaImages/ImageFiltering.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaImages/ImageFiltering.jl?branch=master)
3 changes: 2 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
julia 0.5-
Colors
ColorVectorSpace
ImagesCore
ImageCore
OffsetArrays
CatIndices
StaticArrays
MappedArrays
FFTViews
ComputationalResources
DataStructures
TiledIteration
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "versioninfo();
Pkg.clone(pwd(), \"ImagesFiltering\"); Pkg.build(\"ImagesFiltering\")"
Pkg.clone(pwd(), \"ImageFiltering\"); Pkg.build(\"ImageFiltering\")"

test_script:
- C:\projects\julia\bin\julia -e "Pkg.test(\"ImagesFiltering\")"
- C:\projects\julia\bin\julia -e "Pkg.test(\"ImageFiltering\")"
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Documenter, ImagesFiltering
using Documenter, ImageFiltering

makedocs(modules = [ImagesFiltering, Kernel, KernelFactors],
makedocs(modules = [ImageFiltering, Kernel, KernelFactors],
format = Documenter.Formats.HTML,
sitename = "ImagesFiltering",
sitename = "ImageFiltering",
pages = ["index.md", "Function reference" => "function_reference.md"])

deploydocs(repo = "github.com/JuliaImages/ImagesFiltering.jl.git")
deploydocs(repo = "github.com/JuliaImages/ImageFiltering.jl.git")
# deps = Deps.pip("mkdocs", "python-markdown-math"),
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ processing. The core function is `imfilter`, and common kernels
Let's start with a simple example of linear filtering:

```julia
julia> using ImagesFiltering, TestImages
julia> using ImageFiltering, TestImages

julia> img = testimage("mandrill");

Expand All @@ -29,7 +29,7 @@ The most commonly used function for filtering is [`imfilter`](@ref).

```@meta
DocTestSetup = quote
using Colors, ImagesFiltering, TestImages
using Colors, ImageFiltering, TestImages
img = testimage("mandrill")
end
```
Expand Down Expand Up @@ -118,7 +118,7 @@ OffsetArrays.OffsetArray{Float64,1,Array{Float64,1}} with indices -1:1:
0.333333

julia> kernf = kernelfactors((kern1, kern1))
(ImagesFiltering.KernelFactors.ReshapedOneD{Float64,2,0,OffsetArrays.OffsetArray{Float64,1,Array{Float64,1}}}([0.333333,0.333333,0.333333]),ImagesFiltering.KernelFactors.ReshapedOneD{Float64,2,1,OffsetArrays.OffsetArray{Float64,1,Array{Float64,1}}}([0.333333,0.333333,0.333333]))
(ImageFiltering.KernelFactors.ReshapedOneD{Float64,2,0,OffsetArrays.OffsetArray{Float64,1,Array{Float64,1}}}([0.333333,0.333333,0.333333]),ImageFiltering.KernelFactors.ReshapedOneD{Float64,2,1,OffsetArrays.OffsetArray{Float64,1,Array{Float64,1}}}([0.333333,0.333333,0.333333]))

julia> kernp = broadcast(*, kernf...)
OffsetArrays.OffsetArray{Float64,2,Array{Float64,2}} with indices -1:1×-1:1:
Expand Down
4 changes: 2 additions & 2 deletions src/ImagesFiltering.jl → src/ImageFiltering.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module ImagesFiltering
module ImageFiltering

using Colors, FixedPointNumbers, ImagesCore, MappedArrays, FFTViews, OffsetArrays, StaticArrays, ComputationalResources, TiledIteration
using Colors, FixedPointNumbers, ImageCore, MappedArrays, FFTViews, OffsetArrays, StaticArrays, ComputationalResources, TiledIteration
using ColorVectorSpace # for filtering RGB arrays
using Base: Indices, tail, fill_to_length, @pure, depwarn

Expand Down
8 changes: 4 additions & 4 deletions src/imfilter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,16 @@ function filtfft{C<:Colorant}(A::AbstractArray{C}, krn)
colorview(base_colorant_type(C){eltype(Avf)}, Avf)
end
channelview_dims{C<:Colorant,N}(A::AbstractArray{C,N}) = channelview(A), ntuple(d->d+1, Val{N})
if ImagesCore.squeeze1
channelview_dims{C<:ImagesCore.Color1,N}(A::AbstractArray{C,N}) = channelview(A), ntuple(identity, Val{N})
if ImageCore.squeeze1
channelview_dims{C<:ImageCore.Color1,N}(A::AbstractArray{C,N}) = channelview(A), ntuple(identity, Val{N})
end

function kreshape{C<:Colorant}(::Type{C}, krn::FFTView)
kern = parent(krn)
kernrs = FFTView(reshape(kern, 1, size(kern)...))
end
if ImagesCore.squeeze1
kreshape{C<:ImagesCore.Color1}(::Type{C}, krn::FFTView) = krn
if ImageCore.squeeze1
kreshape{C<:ImageCore.Color1}(::Type{C}, krn::FFTView) = krn
end

### Triggs-Sdika (modified Young-van Vliet) recursive filtering
Expand Down
4 changes: 2 additions & 2 deletions src/kernel.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Kernel

using StaticArrays, OffsetArrays
using ..ImagesFiltering: centered, KernelFactors
import ..ImagesFiltering: _reshape
using ..ImageFiltering: centered, KernelFactors
import ..ImageFiltering: _reshape

function product2d(kf)
k1, k2 = kf
Expand Down
4 changes: 2 additions & 2 deletions src/kernelfactors.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module KernelFactors

using StaticArrays, OffsetArrays
using ..ImagesFiltering: centered, dummyind
import ..ImagesFiltering: _reshape, _vec, nextendeddims
using ..ImageFiltering: centered, dummyind
import ..ImageFiltering: _reshape, _vec, nextendeddims
using Base: tail, Indices, @pure, checkbounds_indices, throw_boundserror

abstract IIRFilter{T}
Expand Down
2 changes: 1 addition & 1 deletion test/2d.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, ImagesCore, OffsetArrays, Colors, FFTViews, ColorVectorSpace, ComputationalResources
using ImageFiltering, ImageCore, OffsetArrays, Colors, FFTViews, ColorVectorSpace, ComputationalResources
using Base.Test

@testset "FIR/FFT" begin
Expand Down
6 changes: 3 additions & 3 deletions test/basic.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using ImagesFiltering, OffsetArrays, Base.Test
using ImageFiltering, OffsetArrays, Base.Test

@testset "basic" begin
@test eltype(KernelFactors.IIRGaussian(3)) == Float64
@test eltype(KernelFactors.IIRGaussian(Float32, 3)) == Float32
kern = KernelFactors.IIRGaussian([1,2.0f0])
@test isa(kern, Tuple{KernelFactors.ReshapedOneD,KernelFactors.ReshapedOneD})
@test isa(ImagesFiltering.filter_algorithm([1],[1],kern), Algorithm.IIR)
@test isa(ImagesFiltering.filter_algorithm([1],[1],(kern...,Kernel.Laplacian())), Algorithm.Mixed)
@test isa(ImageFiltering.filter_algorithm([1],[1],kern), Algorithm.IIR)
@test isa(ImageFiltering.filter_algorithm([1],[1],(kern...,Kernel.Laplacian())), Algorithm.Mixed)

@test KernelFactors.kernelfactors(([0,3], [1,7])) == (reshape([0,3], 1:2, 0:0), reshape([1,7], 0:0, 1:2))
@test KernelFactors.kernelfactors(([0,3], [1,7]')) == (reshape([0,3], 2, 1), reshape([1,7], 1, 2))
Expand Down
8 changes: 4 additions & 4 deletions test/border.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, OffsetArrays, Colors
using ImageFiltering, OffsetArrays, Colors
using Base.Test

@testset "Border" begin
Expand Down Expand Up @@ -149,7 +149,7 @@ using Base.Test

a = reshape(1:15, 3, 5)
targetinds = (OffsetArray([1,1,2,3,3], 0:4), OffsetArray([1:5;], 1:5))
ret = @test_throws ArgumentError ImagesFiltering.padindices(rand(3,5), Pad(:replicate,(1,)))
ret = @test_throws ArgumentError ImageFiltering.padindices(rand(3,5), Pad(:replicate,(1,)))
@test contains(ret.value.msg, "lacks the proper padding sizes")
end

Expand Down Expand Up @@ -177,8 +177,8 @@ using Base.Test

@testset "misc" begin
a0 = reshape([1]) # 0-dimensional
@test ImagesFiltering.accumulate_padding((), a0) == ()
@test ImagesFiltering.accumulate_padding((0:1, -1:1), a0) == (0:1, -1:1)
@test ImageFiltering.accumulate_padding((), a0) == ()
@test ImageFiltering.accumulate_padding((0:1, -1:1), a0) == (0:1, -1:1)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/cascade.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, ImagesCore, OffsetArrays
using ImageFiltering, ImageCore, OffsetArrays
using Base.Test

@testset "cascade" begin
Expand Down
2 changes: 1 addition & 1 deletion test/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, ImagesCore, Colors, FixedPointNumbers, OffsetArrays, Base.Test
using ImageFiltering, ImageCore, Colors, FixedPointNumbers, OffsetArrays, Base.Test

isapprox_const(A::AbstractArray, n::Number) = isapprox(A, fill(n, size(A)))

Expand Down
2 changes: 1 addition & 1 deletion test/gradient.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, Colors, ColorVectorSpace
using ImageFiltering, Colors, ColorVectorSpace
using Base.Test

@testset "gradient" begin
Expand Down
4 changes: 2 additions & 2 deletions test/nd.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, OffsetArrays
using ImageFiltering, OffsetArrays
using Base.Test

@testset "1d" begin
Expand All @@ -17,7 +17,7 @@ using Base.Test
@test size(casc) == size(img)
# copy! kernels, presence/order doesn't matter
kc = centered([1])
@test ImagesFiltering.iscopy(kc)
@test ImageFiltering.iscopy(kc)
@test_approx_eq imfilter(img, (k1,)) [1.25,2.0,3.0,4.0,5.0,6.0,7.0,7.75]
@test_approx_eq imfilter(img, (kc, k1)) [1.25,2.0,3.0,4.0,5.0,6.0,7.0,7.75]
@test_approx_eq imfilter(img, (k1, kc)) [1.25,2.0,3.0,4.0,5.0,6.0,7.0,7.75]
Expand Down
2 changes: 1 addition & 1 deletion test/rank.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, Base.Test
using ImageFiltering, Base.Test

@testset "extrema_filter" begin
function groundtruth(f, A, window::Tuple)
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using ImagesFiltering, Base.Test
using ImageFiltering, Base.Test

aif = detect_ambiguities(ImagesFiltering, Kernel, KernelFactors, Base)
aif = detect_ambiguities(ImageFiltering, Kernel, KernelFactors, Base)
# Because StaticArrays has ambiguities with Base, we have to "subtract" these
asa = detect_ambiguities(StaticArrays, Base)
@test isempty(setdiff(aif, asa))
Expand Down
6 changes: 3 additions & 3 deletions test/specialty.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, ImagesCore, OffsetArrays, Colors
using ImageFiltering, ImageCore, OffsetArrays, Colors
using Base.Test

@testset "specialty" begin
Expand Down Expand Up @@ -195,10 +195,10 @@ using Base.Test
imgf2 = imfilter(img, kernel2)
@test cor(vec(imgf1), vec(imgf2)) > 0.8
# Ensure that edge-trimming under successive stages of filtering works correctly
ImagesFiltering.fillbuf_nan[] = true
ImageFiltering.fillbuf_nan[] = true
kernel3 = (Kernel.Laplacian(), KernelFactors.IIRGaussian(σs)...)
@test !any(isnan, imfilter(img, kernel3))
ImagesFiltering.fillbuf_nan[] = false
ImageFiltering.fillbuf_nan[] = false
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/triggs.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImagesFiltering, Colors, ComputationalResources
using ImageFiltering, Colors, ComputationalResources
using Base.Test

@testset "TriggsSdika" begin
Expand Down

0 comments on commit 029da07

Please sign in to comment.