Skip to content

Commit

Permalink
fix: argument parsing -> allow "qualitymask 0.5" as one argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbinian Eckstein committed Sep 9, 2024
1 parent 406a4da commit 2c7e116
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ROMEO"
uuid = "1ea8258b-a15d-4adb-ad20-01632f467a84"
authors = ["Korbinian Eckstein", "Barbara Dymerska"]
version = "1.1.2"
authors = ["Korbinian Eckstein", "Barbara Dymerska", "Simon Robinson"]
version = "1.1.3"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Expand Down
4 changes: 3 additions & 1 deletion ext/RomeoApp/caller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@ function set_mask!(data, settings)
template_echo = min(settings["template"], size(data["mag"], 4))
data["mask"] = robustmask(data["mag"][:,:,:,template_echo])
save(data["mask"], "mask", settings)
elseif settings["mask"][1] == "qualitymask"
elseif contains(settings["mask"][1], "qualitymask")
threshold = if length(settings["mask"]) > 1
parse(Float32, settings["mask"][2])
elseif length(split(settings["mask"][1])) > 1
parse(Float32, split(settings["mask"][1])[2])
else
0.1 # default threshold
end
Expand Down
10 changes: 10 additions & 0 deletions romeo.jl
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#!/usr/bin/env -S julia --color=yes --startup-file=no --threads=auto

## Usage

# Call with: `<path-to-file>/romeo.jl ARGS`
# On windows use: `julia --threads=auto <path-to-file>/romeo.jl ARGS`

# Example call:
# `./romeo.jl -p phase.nii.gz -m mag.nii.gz -t [0.025 0.05] -o output.nii.gz

import Pkg
Pkg.activate(@__DIR__)
try
Expand Down

2 comments on commit 2c7e116

@korbinian90
Copy link
Owner

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/114845

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.3 -m "<description of version>" 2c7e11678d329a6af46c8b8be9fe43cb8fdf9d07
git push origin v1.1.3

Please sign in to comment.