Skip to content
Draft
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
4 changes: 0 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ julia = "1.6"

[extensions]
RomeoApp = ["MriResearchTools", "ArgParse"]

[weakdeps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
MriResearchTools = "557dad86-b9bd-4533-8525-1a39684d020f"
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,27 @@ A compiled command line tool is available under [ROMEO](https://github.com/korbi

### Usage - command line

#### Option 1: Install as Julia Pkg App (Recommended for Julia 1.9+)

```bash
julia -e 'using Pkg; Pkg.add("ROMEO", app=true)'
```

After installation, you can run ROMEO directly from the command line (make sure `~/.julia/bin` is in your PATH):

```bash
$ romeo phase.nii -m mag.nii -t [2.1,4.2,6.3] -o results
```

See [App Installation Guide](docs/app_installation.md) for more details.

#### Option 2: Using romeo.jl Script

Install Julia 1.9 or newer (https://julialang.org)
Copy the file [romeo.jl](https://github.com/korbinian90/ROMEO.jl/blob/master/romeo.jl) from this repository to a convenient location. An alias for `romeo` as `julia <path-to-file>/romeo.jl` might be useful.

```bash
$ julia <path-to-file>/romeo.jl phase.nii -m mag.nii -t [2.1,4.2,6.3] -o results
$ julia <path-to-file>/romeo.jl phase.nii -m mag.nii -t [2.1,4.2,6.3] -o results
```

On the first run, the dependencies will be installed automatically.
Expand Down
13 changes: 13 additions & 0 deletions bin/romeo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env julia

# ROMEO command line entry point
# This script is the entry point for the ROMEO Pkg app

# Load the extension dependencies first to trigger extension loading
import MriResearchTools
import ArgParse

# Now load ROMEO which will load the RomeoApp extension
using ROMEO

exit(unwrapping_main(ARGS))
63 changes: 63 additions & 0 deletions docs/app_installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Installing ROMEO as a Julia App

ROMEO can be installed as a Julia Pkg app, which provides convenient command-line access to the `unwrapping_main` function.

## Installation

### Using Julia 1.9 or later:

```julia
using Pkg
Pkg.add("ROMEO", app=true)
```

Or from the Pkg REPL (press `]` in Julia):

```
pkg> app add ROMEO
```

This will install the `romeo` command-line tool to `~/.julia/bin/romeo`. Make sure `~/.julia/bin` is in your system PATH for easy access.

## Usage

After installation, you can run ROMEO from the command line:

```bash
romeo --help
romeo --phase phase.nii.gz --magnitude mag.nii.gz --output unwrapped.nii.gz
```

## Updating

To update the app:

```julia
using Pkg
Pkg.update("ROMEO")
```

Or:

```
pkg> app update ROMEO
```

## Uninstallation

To remove the app:

```julia
using Pkg
Pkg.rm("ROMEO", app=true)
```

Or:

```
pkg> app rm ROMEO
```

## Alternative: Direct Script Usage

If you prefer not to use the app installation, you can still use the provided `romeo.jl` script as described in the main README.