From a32cc2cd6637b96b34e37bbf40292ab55452b36e Mon Sep 17 00:00:00 2001 From: Korbinian Eckstein Date: Tue, 12 Apr 2022 13:35:03 +0200 Subject: [PATCH] update romeo version --- Project.toml | 4 ++-- src/mcpc3ds.jl | 2 ++ src/romeofunctions.jl | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 5486318..1670ac8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MriResearchTools" uuid = "557dad86-b9bd-4533-8525-1a39684d020f" authors = ["Korbinian Eckstein"] -version = "0.6.3" +version = "0.7.0" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" @@ -20,5 +20,5 @@ Interpolations = "0.12 - 0.13" NIfTI = "0.4 - 0.5" PaddedViews = "0.5" Requires = "1" -ROMEO = "0.2.5" +ROMEO = "0.3" julia = "1.5" diff --git a/src/mcpc3ds.jl b/src/mcpc3ds.jl index c78d265..eacbec9 100644 --- a/src/mcpc3ds.jl +++ b/src/mcpc3ds.jl @@ -65,6 +65,8 @@ function combinewithPO(compl, po) return combined ./ sqrt.(abs.(combined)) end +## Bipolar correction +# see https://doi.org/10.34726/hss.2021.43447, page 53, 3.1.3 Bipolar Corrections function bipolar_correction!(image; TEs, σ, mask) fG = artefact(image, TEs) fG .= gaussiansmooth3d_phase(fG, σ; mask) diff --git a/src/romeofunctions.jl b/src/romeofunctions.jl index e9a3db5..6e3253d 100644 --- a/src/romeofunctions.jl +++ b/src/romeofunctions.jl @@ -14,11 +14,11 @@ julia> mask = mask_from_voxelquality(qmap); See also [`romeovoxelquality`](@ref), [`romeo`](@ref), [`robustmask`](@ref) """ -function mask_from_voxelquality(qmap::AbstractArray, threshold=0.5) +function mask_from_voxelquality(qmap::AbstractArray, threshold=0.2, th2=0.8) qmap_bin = qmap .> threshold # NaN defaults to false (0) max_hole_size = length(qmap) / 20 qmap_bin = .!imfill(.!qmap_bin, (1, max_hole_size)) # fills all holes up to max_hole_size (uses 6 connectivity as default) - return gaussiansmooth3d(qmap_bin, (1,1,1)) .> 0.8 # hardcoded final threshold + return gaussiansmooth3d(qmap_bin, (1,1,1)) .> th2 end function ROMEO.calculateweights(phase::AbstractArray{T,4}; TEs, template=2, p2ref=1, keyargs...) where T