Skip to content

Commit

Permalink
move from LightGraphs to Graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnychen94 committed Nov 5, 2021
1 parent 1781b4b commit dee5dab
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ version = "1.6.0"
Clustering = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
ImageMorphology = "787d08f9-d448-5407-9aad-5290dd7ab264"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5"
RegionTrees = "dee08c22-ab7f-5625-9660-a9af2021b33f"
Expand All @@ -22,13 +22,13 @@ Clustering = "0.10, 0.11, 0.12, 0.13, 0.14"
DataStructures = "0.17.11, 0.18"
Distances = "0.8, 0.9.2, 0.10"
Documenter = "0.24, 0.25"
Graphs = "1.4.1"
ImageCore = "0.9"
ImageFiltering = "0.6, 0.7"
ImageMorphology = "0.2.6"
LightGraphs = "1.1"
MetaGraphs = "0.6.6"
MetaGraphs = "0.7"
RegionTrees = "0.2, 0.3"
SimpleWeightedGraphs = "1"
SimpleWeightedGraphs = "1.2"
StaticArrays = "0.9, 0.10, 0.11, 0.12, 1.0"
julia = "1"

Expand Down
8 changes: 7 additions & 1 deletion src/ImageSegmentation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ module ImageSegmentation

import Base: show

# To keep the symbols in the namespace maintainble, we try to be explicit on symbols
# importing here, especially for external symbols developed outside of JuliaImages
using LinearAlgebra, Statistics
using DataStructures, StaticArrays, ImageCore, ImageFiltering, ImageMorphology, LightGraphs, SimpleWeightedGraphs, RegionTrees, Distances, StaticArrays, Clustering, MetaGraphs
using DataStructures, StaticArrays, ImageCore, ImageFiltering, ImageMorphology, RegionTrees, Distances, StaticArrays, Clustering
using Graphs: Edge, AbstractEdge, nv, neighbors, vertices
using Graphs: add_vertices!, add_edge!
using MetaGraphs: MetaGraph
using SimpleWeightedGraphs: SimpleWeightedGraph
using ImageCore.ColorVectorSpace: MathTypes
import Clustering: kmeans, fuzzy_cmeans

Expand Down
2 changes: 1 addition & 1 deletion src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function prune_segments(s::SegmentedImage, is_rem::Function, diff_fn::Function)

G, vert_map = region_adjacency_graph(s, (i,j)->1)
u = IntDisjointSets(nv(G))
for v in LightGraphs.vertices(G)
for v in vertices(G)
if is_rem(s.segment_labels[v])
neigh = neighbors(G, v)
minc = first(neigh)
Expand Down
4 changes: 3 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using ImageSegmentation, ImageCore, ImageFiltering, Test, SimpleWeightedGraphs, LightGraphs, StaticArrays, DataStructures
using ImageSegmentation, ImageCore, ImageFiltering, Test, StaticArrays, DataStructures
using RegionTrees: isleaf, Cell, split!
using Graphs
using MetaGraphs: MetaGraph, clear_props!, get_prop, has_prop, set_prop!, props, vertices
using SimpleWeightedGraphs

using Documenter
Base.VERSION >= v"1.6" && doctest(ImageSegmentation, manual = false)
Expand Down

0 comments on commit dee5dab

Please sign in to comment.