diff --git a/Project.toml b/Project.toml index e77c7da..ea10188 100644 --- a/Project.toml +++ b/Project.toml @@ -33,7 +33,7 @@ DataFrames = "1.6" DataInterpolations = "4" Documenter = "0.27, 1" FileIO = "1" -Images = "0.25" +Images = "0.25, 0.26" MAT = "0.10" MRICoilSensitivities = "0.1" MRIFiles = "0.1" diff --git a/src/CoilSensMap.jl b/src/CoilSensMap.jl index 9d7cee4..dce0495 100644 --- a/src/CoilSensMap.jl +++ b/src/CoilSensMap.jl @@ -78,7 +78,7 @@ function findConnectedComponent!(mask_slice::Array{T,2}) where {T} # Find and keep only the largest connected component in the image components = label_components(mask_slice) measured_area = component_lengths(components) - measured_area = measured_area[2:end] #remove background component + measured_area = measured_area[findfirst(isequal(first(measured_area)), measured_area)+1 : end] #remove background component blob = findmax(measured_area)[2] cartes_index_blob = findall(x -> x!=blob, components) mask_slice[cartes_index_blob] .= 0