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

476 feat morph fill #478

Merged
merged 6 commits into from
Nov 8, 2024
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
54 changes: 27 additions & 27 deletions src/IceFloeTracker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ include("branch.jl")
include("special_strels.jl")
include("tilingutils.jl")
include("histogram_equalization.jl")
include("morph_fill.jl")
include("imcomplement.jl")


const sk_measure = PyNULL()
const sk_exposure = PyNULL()
const getlatlon = PyNULL()
Expand Down Expand Up @@ -154,34 +154,34 @@ julia> IceFloeTracker.MorphSE.dilate(a, se)
```
"""
module MorphSE
using ImageCore
using ColorTypes
using LoopVectorization
using OffsetArrays
using TiledIteration: EdgeIterator
using DataStructures
include("morphSE/StructuringElements.jl")
using .StructuringElements
include("morphSE/extreme_filter.jl")
include("morphSE/utils.jl")
include("morphSE/dilate.jl")
include("morphSE/erode.jl")
include("morphSE/opening.jl")
include("morphSE/closing.jl")
include("morphSE/bothat.jl")
include("morphSE/mreconstruct.jl")
include("morphSE/fill_holes.jl")
using ImageCore
using ColorTypes
using LoopVectorization
using OffsetArrays
using TiledIteration: EdgeIterator
using DataStructures
include("morphSE/StructuringElements.jl")
using .StructuringElements
include("morphSE/extreme_filter.jl")
include("morphSE/utils.jl")
include("morphSE/dilate.jl")
include("morphSE/erode.jl")
include("morphSE/opening.jl")
include("morphSE/closing.jl")
include("morphSE/bothat.jl")
include("morphSE/mreconstruct.jl")
include("morphSE/fill_holes.jl")
end

module Register
include("Register/CenterIndexedArrays.jl-0.2.0/CenterIndexedArrays.jl")
include("Register/RegisterCore.jl-0.2.4/src/RegisterCore.jl")
include("Register/RegisterMismatchCommon.jl-master/RegisterMismatchCommon.jl")
include("Register/RegisterUtilities.jl-master/RegisterUtilities.jl")
include("Register/RFFT.jl-master/RFFT.jl")
include("Register/RegisterDeformation.jl-0.4.4/RegisterDeformation.jl")
include("Register/QuadDIRECT.jl-master/QuadDIRECT.jl")
include("Register/RegisterQD.jl-0.3.1/RegisterQD.jl")
include("Register/RegisterMismatch.jl-0.4.0/RegisterMismatch.jl")
include("Register/CenterIndexedArrays.jl-0.2.0/CenterIndexedArrays.jl")
include("Register/RegisterCore.jl-0.2.4/src/RegisterCore.jl")
include("Register/RegisterMismatchCommon.jl-master/RegisterMismatchCommon.jl")
include("Register/RegisterUtilities.jl-master/RegisterUtilities.jl")
include("Register/RFFT.jl-master/RFFT.jl")
include("Register/RegisterDeformation.jl-0.4.4/RegisterDeformation.jl")
include("Register/QuadDIRECT.jl-master/QuadDIRECT.jl")
include("Register/RegisterQD.jl-0.3.1/RegisterQD.jl")
include("Register/RegisterMismatch.jl-0.4.0/RegisterMismatch.jl")
end
end
5 changes: 3 additions & 2 deletions src/bridge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ function _bridge_operator_lut(
return _operator_lut(I, img, nhood, lutbridge)
end

function _bridge_filter(img::T, operator::Function)::T where {T<:AbstractArray{Bool}}
# TODO: see about implemting _filter using parallelization
function _filter(img::T, operator::Function)::T where {T<:AbstractArray{Bool}}
out = zeros(Bool, size(img))
R = CartesianIndices(img)
I_first, I_last = first(R), last(R)
Expand Down Expand Up @@ -79,5 +80,5 @@ julia> bridge(bw)
```
"""
function bridge(bw::T)::T where {T<:AbstractArray{Bool}}
return _bridge_filter(bw, _bridge_operator_lut)
return _filter(bw, _bridge_operator_lut)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that we already had tests set up for bridge(), this looks like just swapping in the new function name.

end
Loading
Loading