Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump compat on ImageMorphology and TiledIteration #1031

Merged
merged 2 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ImageFiltering = "0.7.1"
ImageIO = "0.3, 0.4, 0.5, 0.6"
ImageMagick = "1"
ImageMetadata = "0.9.7"
ImageMorphology = "0.3"
ImageMorphology = "0.4"
ImageQualityIndexes = "0.3"
ImageSegmentation = "1.7"
ImageShow = "0.3"
Expand All @@ -55,7 +55,7 @@ Reexport = "1.1"
StaticArrays = "0.8, 0.9, 0.10, 0.11, 0.12, 1.0"
StatsBase = "0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34"
Suppressor = "0.2"
TiledIteration = "0.2, 0.3, 0.4"
TiledIteration = "0.2, 0.3, 0.4, 0.5"
julia = "1.6"

[extras]
Expand Down
16 changes: 4 additions & 12 deletions test/legacy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
A[4,4,2] = 0.6
Ae = erode(A)
@test Ae == zeros(size(A))
Ad = dilate(A, 1:2)
Ad = dilate(A; dims=1:2)
Ar = [0.8 0.8 0.8 0;
0.8 0.8 0.8 0;
0.8 0.8 0.8 0;
Expand All @@ -194,7 +194,7 @@
0 0 0.6 0.6;
0 0 0.6 0.6]
@test Ad == cat(Ar, Ag, zeros(4,4), dims=3)
Ae = erode(Ad, 1:2)
Ae = erode(Ad; dims=1:2)
Ar = [0.8 0.8 0 0;
0.8 0.8 0 0;
0 0 0 0;
Expand All @@ -208,9 +208,9 @@
@test dilate(trues(3)) == trues(3)
# ImageMeta
@test arraydata(dilate(ImageMeta(A))) == dilate(A)
@test arraydata(dilate(ImageMeta(A), 1:2)) == dilate(A, 1:2)
@test arraydata(dilate(ImageMeta(A); dims=1:2)) == dilate(A; dims=1:2)
@test arraydata(erode(ImageMeta(A))) == erode(A)
@test arraydata(erode(ImageMeta(A), 1:2)) == erode(A, 1:2)
@test arraydata(erode(ImageMeta(A); dims=1:2)) == erode(A; dims=1:2)
end

@testset "Opening / closing" begin
Expand Down Expand Up @@ -277,10 +277,7 @@
true false true true]
lbltarget = [1 1 0 2;
1 0 2 2]
lbltarget1 = [1 2 0 4;
1 0 3 4]
@test label_components(A) == lbltarget
@test label_components(A, [1]) == lbltarget1
connectivity = [false true false;
true false true;
false true false]
Expand All @@ -289,11 +286,6 @@
lbltarget2 = [1 1 0 1;
1 0 1 1]
@test label_components(A, connectivity) == lbltarget2
@test component_boxes(lbltarget) == Vector{Tuple}[[(1,2),(2,3)],[(1,1),(2,2)],[(1,3),(2,4)]]
@test component_lengths(lbltarget) == [2,3,3]
@test component_indices(lbltarget) == Array{Int64}[[4,5],[1,2,3],[6,7,8]]
@test component_subscripts(lbltarget) == Array{Tuple}[[(2,2),(1,3)],[(1,1),(2,1),(1,2)],[(2,3),(1,4),(2,4)]]
@test @inferred(component_centroids(lbltarget)) == Tuple[(1.5,2.5),(4/3,4/3),(5/3,11/3)]
end

end
Loading