From e15c72e15d96c79170406dea6955444136204a8d Mon Sep 17 00:00:00 2001 From: cpaniaguam Date: Wed, 6 Nov 2024 22:31:32 -0500 Subject: [PATCH] chore: remove imcomplement from reconstruction module --- src/reconstruction.jl | 8 -------- test/test-reconstruction-workflows.jl | 7 ------- 2 files changed, 15 deletions(-) diff --git a/src/reconstruction.jl b/src/reconstruction.jl index 40a833ef..fca2824f 100644 --- a/src/reconstruction.jl +++ b/src/reconstruction.jl @@ -1,11 +1,3 @@ -function imcomplement(img::Matrix{T}) where {T<:Union{Unsigned,Int}} - return 255 .- img -end - -function imcomplement(img::Matrix{Gray{Float64}}) - return 1 .- img -end - function reconstruct(img, se, type, invert::Bool=true) if type == "dilation" morphed = IceFloeTracker.MorphSE.dilate(img, se) diff --git a/test/test-reconstruction-workflows.jl b/test/test-reconstruction-workflows.jl index 1d80a120..44cc037d 100644 --- a/test/test-reconstruction-workflows.jl +++ b/test/test-reconstruction-workflows.jl @@ -19,13 +19,6 @@ function run_tests(test_cases, func, se) end @testset "reconstruct" begin - @testset "imcomplement" begin - @test imcomplement(coins) == 255 .- coins - - coins_gray = Gray.(coins ./ 255) - @test imcomplement(coins_gray) == 1 .- coins_gray - end - @testset "open_by_reconstruction" begin test_cases = [(coins, 7552396), (coins_gray, 29617.239215686277)] run_tests(test_cases, (img, se) -> _reconstruct(img, se, "erosion"), se_disk1)