Giter Club home page Giter Club logo

romeo's Introduction

ROMEO Unwrapping

Unwrapping of 3D and 4D datasets. Coil combination of 5D datasets.

ROMEO

Get ROMEO

Ordered from simple to more involved approaches.

Download link for mritools as plain text: https://github.com/korbinian90/CompileMRI.jl/releases
Note: It might not work on every Linux distribution due to shared library incompatibilities (#16)
If a compiled MacOS version is required, see Known-issues/MacOS, but the suggested way is Option 2

Option 2: Julia command line usage (every OS)

Identical usage to the standalone version with better compatibility.

  1. Install julia
  2. Run romeo.jl command line script

Option 3: Run in Neurodesk (every OS)

Neurodesk is an analysis environment for reproducible neuroimaging running in a docker container. It comes with a range of useful tools preinstalled, including ROMEO. (https://neurodesk.github.io/)

Option 4: Use the julia package ROMEO.jl (every OS)

All the flexibility, but requires handling phase offsets and B0 calculation yourself (see MriResearchTools.jl)

Option 5: Compile ROMEO (every OS)

Follow the steps in https://github.com/korbinian90/CompileMRI.jl

Publication

ROMEO: Dymerska, B., Eckstein, K., Bachrata, B., Siow, B., Trattnig, S., Shmueli, K., Robinson, S.D., 2020. Phase Unwrapping with a Rapid Opensource Minimum Spanning TreE AlgOrithm (ROMEO). Magnetic Resonance in Medicine. https://doi.org/10.1002/mrm.28563

MCPC-3D-S Coil Combination: Eckstein, K., Dymerska, B., Bachrata, B., Bogner, W., Poljanc, K., Trattnig, S., Robinson, S.D., 2018. Computationally Efficient Combination of Multi-channel Phase Data From Multi-echo Acquisitions (ASPIRE). Magnetic Resonance in Medicine 79, 2996–3006. https://doi.org/10.1002/mrm.26963

Getting Started

Prerequisites

Phase (and optionally Magnitude) images in NIfTI fileformat.
For multi-echo/multi-timepoint data, 4D-NIfTI files are used with echoes/timepoints in the 4th dimension.
Individual 3D files can be merged into 4D files using fslmerge.
If 5D-NIfTI datasets with channels in the 5th dimension are given, coil combination is performed as first step.

Run ROMEO

ROMEO is a command line application. The binary is in the folder mritools/bin

Example usage for B0-mapping with a 5-echo scan with TE = [3,6,9,12,15] ms:
$ romeo ph.nii -m mag.ii -B -t 3:3:15 -o outputdir

Example usage for single-echo data:
$ romeo ph.nii -m mag.ii -k nomask -o outputdir

Example for multiple time points with identical echo time (fMRI):
$ romeo ph.nii -m mag.ii -k nomask -t epi -o outputdir

Example usage for a 3-echo scan with TE = [3,6,9] ms:
$ romeo ph.nii -m mag.ii -t [3,6,9] -o outputdir

Note that echo times are required for unwrapping multi-echo data.

Different Use Cases

Multi-Echo

If multi-echo data is available, supplying ROMEO with multi-echo information should improve the unwrapping accuracy. The same is true for magnitude information.

Coil Combination

Coil combination will be automatically performed for 5D datasets using MCPC-3D-S. The echoes have to be in the 4th dimension and the channels in the 5th dimension. For bipolar datasets use --phase-offset-correction bipolar as additional argument (bipolar correction requires >= 3 echoes).

Repeated Measurements (EPI)

4D data with an equal echo time for all volumes should be unwrapped as 4D for best accuracy and temporal stability. The echo times can be set to -t epi.

Setting the Template Echo

In certain cases, the phase of the first echo/time-point looks differently than the rest of the acquisition, which can occur due to flow compensation of only the first echo or not having reached the steady state in fMRI. This might cause template unwrapping to fail, as the first echo is chosen as the template by default.
With the optional argument --template 2, this can be changed to the second (or any other) echo/time-point.

Phase Offsets

If the multi-echo data contains large phase offsets (phase at echo time zero), default template unwrapping might fail. Setting the --individual-unwrapping flag is a solution, as it performs spatial unwrapping for each echo instead. The computed B0 map is not corrected for remaining phase offsets.

For proper handling, the phase offsest can be removed using MCPC-3D-S with the option --phase-offset-correction. This works for monopolar and bipolar data, already combined or uncombined channels. However, this requires "linear phase evolution". If the phase is already "corrupted" by other coil combination algorithms, it might not be possible to estimate and remove the phase offsets.

Disconnected Regions

For datasets with disconnected regions, the --max-seeds, --correct-regions and --merge-regions options might be of interest.

The option --max-seeds creates multiple regions, which are unwrapped independently. The detected regions are written to the output file regions.nii.

Fat and Water - Multi-Echo

For acquisitions, in which fat and water signals mix, the assumption of linear phase evolution might be broken. Both temporal unwrapping and MCPC-3D-S phase offset removal depend on linear phase evolution and might produce incorrect results, leading to multi-echo unwrapping problems and remaining phase offsets in the resulting B0 map.

Using the --individual-unwrapping flag might improve the unwrapping performance by disabling temporal unwrapping. Still, a calculated B0 map might contain unwanted phase offsets.

Common Pitfalls

Phase Input

The input data is automatically rescaled to [-π;π]. For example, the input data can be given from [0;4095], which is rescaled to the range [-π;π]. In case the data is already in radians, this can be deactivated using the flag --no-rescale. This might be necessary for phase difference data, where calculating the phase difference increases the range to [-2π;2π], but no rescaling to [-π;π] should occur.

Help on arguments:

$ ./bin/romeo

usage: <PROGRAM> [-p PHASE] [-m MAGNITUDE] [-o OUTPUT]
                 [-t ECHO-TIMES [ECHO-TIMES...]] [-k MASK [MASK...]]
                 [-u] [-e UNWRAP-ECHOES [UNWRAP-ECHOES...]]
                 [-w WEIGHTS] [-B]
                 [--phase-offset-correction [PHASE-OFFSET-CORRECTION]]
                                  [--phase-offset-smoothing-sigma-mm PHASE-OFFSET-SMOOTHING-SIGMA-MM [PHASE-OFFSET-SMOOTHING-SIGMA-MM...]]
                 [--write-phase-offsets] [-i] [--template TEMPLATE]
                 [-N] [--no-rescale] [--threshold THRESHOLD] [-v] [-g]
                 [-q] [-Q] [-s MAX-SEEDS] [--merge-regions]
                 [--correct-regions] [--wrap-addition WRAP-ADDITION]
                 [--temporal-uncertain-unwrapping] [--version] [-h]

optional arguments:
  -p, --phase PHASE     The phase image that should be unwrapped
  -m, --magnitude MAGNITUDE
                        The magnitude image (better unwrapping if
                        specified)
  -o, --output OUTPUT   The output path or filename (default:
                        "unwrapped.nii")
  -t, --echo-times ECHO-TIMES [ECHO-TIMES...]
                        The echo times required for temporal
                        unwrapping specified in array or range syntax
                        (eg. "[1.5,3.0]" or "3.5:3.5:14"). For
                        identical echo times, "-t epi" can be used
                        with the possibility to specify the echo time
                        as e.g. "-t epi 5.3" (for B0 calculation).
  -k, --mask MASK [MASK...]
                        nomask | qualitymask <threshold> | robustmask
                        | <mask_file>. <threshold>=0.1 for qualitymask
                        in [0;1] (default: ["robustmask"])
  -u, --mask-unwrapped  Apply the mask on the unwrapped result. If
                        mask is "nomask", sets it to "robustmask".
  -e, --unwrap-echoes UNWRAP-ECHOES [UNWRAP-ECHOES...]
                        Load only the specified echoes from disk
                        (default: [":"])
  -w, --weights WEIGHTS
                        romeo | romeo2 | romeo3 | romeo4 | romeo6 |
                        bestpath | <4d-weights-file> | <flags>.
                        <flags> are up to 6 bits to activate
                        individual weights (eg. "1010"). The weights
                        are (1)phasecoherence
                        (2)phasegradientcoherence (3)phaselinearity
                        (4)magcoherence (5)magweight (6)magweight2
                        (default: "romeo")
  -B, --compute-B0      Calculate combined B0 map in [Hz]. This
                        activates MCPC3Ds phase offset correction
                        (monopolar) for multi-echo data.
  --phase-offset-correction [PHASE-OFFSET-CORRECTION]
                        on | off | bipolar. Applies the MCPC3Ds method
                        to perform phase offset determination and
                        removal (for multi-echo). "bipolar" removes
                        eddy current artefacts (requires >= 3 echoes).
                        (default: "off", without arg: "on")
  --phase-offset-smoothing-sigma-mm PHASE-OFFSET-SMOOTHING-SIGMA-MM [PHASE-OFFSET-SMOOTHING-SIGMA-MM...]
                        default: [7,7,7] Only applied if
                        phase-offset-correction is activated. The
                        given sigma size is divided by the voxel size
                        from the nifti phase file to obtain a
                        smoothing size in voxels. A value of [0,0,0]
                        deactivates phase offset smoothing (not
                        recommended).
  --write-phase-offsets
                        Saves the estimated phase offsets to the
                        output folder
  -i, --individual-unwrapping
                        Unwraps the echoes individually (not
                        temporal). This might be necessary if there is
                        large movement (timeseries) or
                        phase-offset-correction is not applicable.
  --template TEMPLATE   Template echo that is spatially unwrapped and
                        used for temporal unwrapping (type: Int64,
                        default: 1)
  -N, --no-mmap         Deactivate memory mapping. Memory mapping
                        might cause problems on network storage
  --no-rescale          Deactivate rescaling of input images. By
                        default the input phase is rescaled to the
                        range [-π;π]. This option allows inputting
                        already unwrapped phase images without
                        manually wrapping them first.
  --threshold THRESHOLD
                        <maximum number of wraps>. Threshold the
                        unwrapped phase to the maximum number of wraps
                        and sets exceeding values to 0 (type: Float64,
                        default: Inf)
  -v, --verbose         verbose output messages
  -g, --correct-global  Phase is corrected to remove global n2π phase
                        offset. The median of phase values (inside
                        mask if given) is used to calculate the
                        correction term
  -q, --write-quality   Writes out the ROMEO quality map as a 3D image
                        with one value per voxel
  -Q, --write-quality-all
                        Writes out an individual quality map for each
                        of the ROMEO weights.
  -s, --max-seeds MAX-SEEDS
                        EXPERIMENTAL! Sets the maximum number of seeds
                        for unwrapping. Higher values allow more
                        seperated regions. (type: Int64, default: 1)
  --merge-regions       EXPERIMENTAL! Spatially merges neighboring
                        regions after unwrapping.
  --correct-regions     EXPERIMENTAL! Performed after merging. Brings
                        the median of each region closest to 0 (mod
                        2π).
  --wrap-addition WRAP-ADDITION
                        [0;π] EXPERIMENTAL! Usually the true phase
                        difference of neighboring voxels cannot exceed
                        π to be able to unwrap them. This setting
                        increases the limit and uses 'linear
                        unwrapping' of 3 voxels in a line. Neighbors
                        can have (π + wrap-addition) phase difference.
                        (type: Float64, default: 0.0)
  --temporal-uncertain-unwrapping
                        EXPERIMENTAL! Uses spatial unwrapping on
                        voxels that have high uncertainty values after
                        temporal unwrapping.
  --version             show version information and exit
  -h, --help            show this help message and exit

Related Repositories

The sourcecode is available under ROMEO.jl.
The binaries are a standalone compiled version of RomeoApp.jl. The compilation scripts and recent releases are in CompileMRI.jl.

Known issues

v1.4

  • single echo unwrapping with magnitude and default mask leads to ReadOnlyMemory error. Fixed in v1.4.1
  • binary data type for mask not supported. Fixed in v2.0.1

v2.0.1

  • input scaling issue (with INT16). Fixed in v2.0.2

v3.1

  • quality map output is corrupted. Fixed in v3.1.1

MacOS

To run romeo executables on MacOS, multiple files have to be flagged as save to execute. Additionally, the executable might only run on specific OS versions. You can try the newest MacOS executable, v3.2.2 and v3.1. This problem is still unsolved and no clear way how to improve the compatibility. Please look at the different ways to run it on MacOS above.

Issues when calling from MATLAB

  • libstdc++ error (libstdc++.so.6: version `GLIBCXX_3.4.29' not found)
  • Segmentation fault (error code 139)

Problem: ROMEO crashes with version conflicts of shared dependencies when called within MATLAB via unix() or system().
Reason: MATLAB runs other programs with a modified environment variable
Solution: clean LD_LIBRARY_PATH before execution and restore it afterwards
Example:

% remove matlab specific LD_LIBRARY_PATH
if isunix; paths = getenv('LD_LIBRARY_PATH'); setenv('LD_LIBRARY_PATH'); end
success = system(<romeo call>);
% restore paths
if isunix; setenv('LD_LIBRARY_PATH', paths); end

Feedback

Feature requests and bug reports are welcome!

romeo's People

Contributors

korbinian90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

romeo's Issues

Matlab example data files not included?

Just getting started with ROMEO and running it under Matlab. Appreciate that there is a way to do this!

Example_ROMEO_call.m calls for Phase.nii, Magnitude.nii, and Mask.nii? These are not included anywhere? Maybe they are not supposed to be included?

In any event, I will figure out how to take my data and turn it into these files.

Thanks for putting this together and making it available.

Romeo binary associated with virus

In case anybody experiences the same issue, when I unpacked the Windows binaries, the romeo.exe file was always missing. Reason was that my antivirus (Clam Sentinel) was mistaking it for a virus. White-list a folder and the file can be extracted there. Not much you can do about it, but at least the problem is known.

ROMEO run in matlab

Hi,
I am trying to run romeo for phase unwrapping via Matlab. I downloaded mritools V3.6.6. But when I run example_ROMEO_call.m file according my data, it gives an error:

Error using ROMEO
ROMEO unwrapping failed! Check input files for corruption in /N/project/dMRI1/CARE_CSI/ANALYSIS/QSM/temp/Tina/mritools_ubuntu/bin/romeo_tmp.

image

Could you please help me to fix it.

Thank you.

Does not support phase difference input?

Thanks for this handy tool.

If I use -p phase_diff.nii (only 2D matrix inside), it would complain. Although at the beginning the doc says need 4D nifti, later the doc says we can input phase difference data. Am I missing something here?

This might be necessary for phase difference data,

error when trying to use phase difference data.

ERROR: BoundsError: attempt to access Tuple{Int64, Int64} at index [3]
Stacktrace:
[1] getindex
@ .\tuple.jl:29 [inlined]
[2] getindex(t::Tuple, r::UnitRange{Int64})
@ Base .\range.jl:313
[3] load_data_and_resolve_args!(settings::Dict{String, Any})
@ RomeoApp C:\Users\runneradmin.julia\packages\RomeoApp\xDyvE\src\caller.jl:78
[4] unwrapping_main(args::Vector{String}; version::String)
@ RomeoApp C:\Users\runneradmin.julia\packages\RomeoApp\xDyvE\src\caller.jl:3
[5] julia_main(version::String)
@ RomeoApp C:\Users\runneradmin.julia\packages\RomeoApp\xDyvE\src\RomeoApp.jl:12
[6] romeo()
@ App D:\a\CompileMRI.jl\CompileMRI.jl\App\src\App.jl:9
[7] top-level scope
@ none:1

Problem with coil combination using the romeo binary

Thanks for this nice unwrapping tool.

I have a problem when I run the romeo binary with 5D magnitude and phase data (2-echo scans). The coil combination seems to be not working correctly as the combined magnitude images lose all contrast and are very noisy.

If I do a 2 step unwrapping, running the mcpc3ds binary first, the coil combined images look fine.
These are my command line inputs:
1 step:
bin/romeo -p phs.nii.gz -m mag.nii.gz --no-rescale -B -t [2.42,4.84] -o .
2 step:
bin/mcpc3ds -m mag.nii.gz -p phs.nii.gz -t [2.42,4.84] --no-phase-rescale -o .
bin/romeo -p combined_phase.nii -m combined_mag.nii --no-rescale -B -t [2.42,4.84] -o .

mag.nii.gz and phs.nii.gz are both 5D images [x,y,z,echo,coil].

I am using the standalone executables.

Applicability to data with large gaps between echo times

I'm not sure if you'd prefer users to open usage-related issues here or post them somewhere like NeuroStars, but I figured I'd try here first. I was interested in applying ROMEO to multi-echo fMRI data, which has relatively large gaps in echo times. I have four echoes with TEs of 11.8, 28.04, 44.28, and 60.52 ms. I tested out ROMEO on my data after scaling my phase data to radians, but the results look odd to me. I wonder if perhaps the spacing between the echo times is just too large?

Here's how I called ROMEO:

romeo -m /tmp/temp/bold_v0010.nii -t [11.8,28.04,44.28,60.52] -Bvq -o /tmp/ /tmp/temp/pha_v0010.nii

The resulting unwrapped echoes mostly look like the below:

I'd appreciate any help you could provide. I should note that I'm not exactly an expert on phase data, unwrapping, or distortion correction, though.

Unpublished version is the only one that works for my data

Hi,

Our group has been using ROMEO in an MS clinical study for QSM phase unwrapping and it usually works well. However, for a handful of subjects, all the currently downloadable versions leave some residual wraps in the total field map. Interestingly, I got another version ages ago from Barbara Dymerska (called ROMEO_20200130_compiled_win) which works perfectly even in these cases. We have contacted Barbara and she advised that "it looks like some voxel close to the sinuses acts as a tipping point: it may still have relatively high quality value in the quality map and in one case algorithm goes through this voxel slightly earlier than in the other case. The difference can be as small as just slightly different numerical approximation. But it’s worth checking if there is a slight difference in ROMEO weights between this version and the next one." She also suggested that we check the newest version with -k nomask as there was a bug in some of the earlier versions resulting in no mask being used even when -k robustmask was set. We have tried every masking option across a handful of versions without success. We could just continue using ROMEO_20200130_compiled_win, but some of the processing will have to be done on Linux (for other studies as well). Is there any way to figure out what that early version did differently and how we could set up the newest version in the same way?

Many thanks,
Anita

question about units

What units are the unwrapped phase in? I sent in phase images with values ranging from 0 to 4095.
Output values ranged from -169.820160 to 195.847427.
I'm guessing that the range is some multiple of pi radians, but I would appreciate some specificity.
Apologies in advance if the answer is in the documentation and I was too lazy to find it.

ReadOnlyMemoryError()

Thanks for sharing the Unwrapping software @korbinian90,

I would love to try it on my NeuroDebian installation on my 0.2mm FLASH data.
Unfortunately, I get the error below:
I used it like this: romeo -m manitude.nii -o outputname.nii phasedata.nii
can you point me to any documentation of romeo's usage?
Do you have example data that I could use to see if the installation worked correctly?

Thanks a lot.
Renzo

ERROR: ReadOnlyMemoryError() Stacktrace: [1] setindex! at ./array.jl:825 [inlined] [2] setindex! at ./subarray.jl:289 [inlined] [3] _setindex! at ./abstractarray.jl:1096 [inlined] [4] setindex! at ./abstractarray.jl:1073 [inlined] [5] macro expansion at ./broadcast.jl:910 [inlined] [6] macro expansion at ./simdloop.jl:77 [inlined] [7] copyto! at ./broadcast.jl:909 [inlined] [8] copyto! at ./broadcast.jl:864 [inlined] [9] materialize!(::SubArray{Int16,3,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true}, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{3},Nothing,typeof(*),Tuple{SubArray{Int16,3,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true},BitArray{3}}}) at ./broadcast.jl:823 [10] parsekwargs(::Base.Iterators.Pairs{Symbol,AbstractArray{T,3} where T,Tuple{Symbol,Symbol},NamedTuple{(:mag, :mask),Tuple{SubArray{Int16,3,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true},BitArray{3}}}}, ::Array{Float32,3}) at /home/korbinian90/.julia/dev/ROMEO/src/weights.jl:104 [11] calculateweights_romeo(::Array{Float32,3}, ::Int64, ::BitArray{1}, ::Type{UInt8}; kwargs::Base.Iterators.Pairs{Symbol,AbstractArray{T,3} where T,Tuple{Symbol,Symbol},NamedTuple{(:mag, :mask),Tuple{SubArray{Int16,3,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true},BitArray{3}}}}) at /home/korbinian90/.julia/dev/ROMEO/src/weights.jl:45 [12] calculateweights_romeo(::Array{Float32,3}, ::Symbol, ::Int64; kwargs::Base.Iterators.Pairs{Symbol,AbstractArray{T,3} where T,Tuple{Symbol,Symbol},NamedTuple{(:mag, :mask),Tuple{SubArray{Int16,3,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true},BitArray{3}}}}) at /home/korbinian90/.julia/dev/ROMEO/src/weights.jl:41 [13] calculateweights(::Array{Float32,3}, ::Symbol, ::Int64; kwargs::Base.Iterators.Pairs{Symbol,AbstractArray{T,3} where T,Tuple{Symbol,Symbol},NamedTuple{(:mag, :mask),Tuple{SubArray{Int16,3,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true},BitArray{3}}}}) at /home/korbinian90/.julia/dev/ROMEO/src/weights.jl:21 [14] unwrap!(::Array{Float32,3}; weights::Symbol, keyargs::Base.Iterators.Pairs{Symbol,AbstractArray{T,3} where T,Tuple{Symbol,Symbol},NamedTuple{(:mag, :mask),Tuple{SubArray{Int16,3,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true},BitArray{3}}}}) at /home/korbinian90/.julia/dev/ROMEO/src/unwrapping.jl:4 [15] unwrapping_main(::Array{String,1}) at /home/korbinian90/.julia/dev/RomeoApp/src/caller.jl:72 [16] julia_main() at /home/korbinian90/.julia/dev/RomeoApp/src/RomeoApp.jl:14 [17] julia_main() at ./none:29

AssertionError()

Hello @korbinian90,
First of all, I would like to acknowledge the amazing unwrapping tool you guys developed!

I was trying to use it in some single-echo fMRI data that I need to analyze. However, I appear to get an error when using it with a binary mask file. It works fine without a mask or with the "robustmask" option. Do you have any idea why does the error arise?

Thank you very much! Cheers.
Iñigo

Here is the code I used: romeo -m magnitude.nii -o unwrapped.nii -k mask_file.nii phase.nii
And here is the error I get:
ERROR: AssertionError: Unwrap-weights are all zero! Stacktrace: [1] unwrap!(::SubArray{Float32,3,Array{Float32,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Int64},true}; weights::Symbol, keyargs::Base.Iterators.Pairs{Symbol,AbstractArray,NTuple{4,Symbol},NamedTuple{(:TEs, :phase2, :mag, :mask),Tuple{Array{Int64,1},Array{Float32,3},Array{Int16,3},BitArray{3}}}}) at /home/korbinian90/.julia/dev/ROMEO/src/unwrapping.jl:5 [2] unwrap!(::Array{Float32,4}; TEs::UnitRange{Int64}, template::Int64, p2ref::Int64, keyargs::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:weights, :mag, :mask),Tuple{Symbol,SubArray{Int16,4,Array{Int16,4},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},UnitRange{Int64}},true},BitArray{3}}}}) at /home/korbinian90/.julia/dev/ROMEO/src/unwrapping.jl:55 [3] unwrapping_main(::Array{String,1}) at /home/korbinian90/.julia/dev/RomeoApp/src/caller.jl:76 [4] julia_main() at /home/korbinian90/.julia/dev/RomeoApp/src/RomeoApp.jl:14 [5] julia_main() at ./none:29

Phase Contrast Imaging

Hi Korbinian,
Moving the dialog here....the clear SWI portion of things is all resolved. I've moved the newer ROMEO & Laplacian unwrapping stuff here, so you can close the SWI part at your leisure. Right now your answer to the question below is still in the SWI part.

Encountering an error with a multi-echo data set

Dear Korbinian,

I am encountering an issue with running ROMEO on a multi-echo data set, as it throws the error:
"ERROR: AssertionError: Unwrap-weights are all zero!"

If I run ROMEO on individual echoes from this data set, it works fine, so this issue is limited to the multi-echo combination procedure.
I tested ROMEO on this data set using both the MRITools and Neurodesk implementations, obtaining the same error.
As a further test, I successfully ran ROMEO on a different multi-echo data set (in Neurodesk). Thus, this is not an installation issue but something specific to this one data set.

I would appreciate your input on this!

Thanks,
Emma

Version report

Just a little thing: the last few versions have all claimed to be v3.1.0
$ v3.1.4/bin/romeo --version
v3.1.0

Matlab run ROMEO error

Hello:
I plan to carry out phase unwrapping through ROMEO, but the following errors are reported during operation (my matlab version is R2020a, mritools windows is v4.0.2) :

_ROMEO command: "C:\Users\wang\Desktop\my_QSM_calc\mritools_windows-2019_4.0.2\matlab..\bin\romeo.exe" "-p" "C:\Users\wang\Desktop\my_QSM_calc\Head_QSM_193459\QSM_results\phase_unwapping\Phase.nii" "-o" "C:\Users\wang\Desktop\my_QSM_calc\Head_QSM_193459\QSM_results\phase_unwapping\Unwrapped.nii" "-B" "-m" "C:\Users\wang\Desktop\my_QSM_calc\Head_QSM_193459\QSM_results\phase_unwapping\Mag.nii" "-t" "[6.8 14 21.2 28.4 35.6]" "-k" "C:\Users\wang\Desktop\my_QSM_calc\Head_QSM_193459\QSM_results\phase_unwapping\Mask.nii" --verbose -q
fatal: error thrown and no exception handler available.
InitError(mod=:GPUCompiler, error=ErrorException("type Nothing has no field major"))
ijl_errorf at C:/workdir/src\rtutils.c:77
ijl_has_no_field_error at C:/workdir/src\rtutils.c:137
getproperty at .\Base.jl:37
init at C:\Users\runneradmin.julia\packages\GPUCompiler\2mJjc\src\GPUCompiler.jl:64
jfptr___init___99249.clone_1 at C:\Users\wang\Desktop\my_QSM_calc\mritools_windows-2019_4.0.2\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1880 [inlined]
jl_module_run_initializer at C:/workdir/src\toplevel.c:75
_finish_julia_init at C:/workdir/src\init.c:855
ijl_init_with_image at C:/workdir/src\jlapi.c:66 [inlined]
ijl_init_with_image at C:/workdir/src\jlapi.c:55 [inlined]
ijl_init at C:/workdir/src\jlapi.c:82
.text at C:\Users\wang\Desktop\my_QSM_calc\mritools_windows-2019_4.0.2\bin\romeo.exe (unknown line)
__tmainCRTStartup at C:\Users\wang\Desktop\my_QSM_calc\mritools_windows-2019_4.0.2\bin\romeo.exe (unknown line)
.l_start at C:\Users\wang\Desktop\my_QSM_calc\mritools_windows-2019_4.0.2\bin\romeo.exe (unknown line)
BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
错误使用 ROMEO (line 89)
Something went wrong!
Please also try if ROMEO works via the command line.
Otherwise, please report the issue on https://github.com/korbinian90/ROMEO/issues

出错 Format_conversion (line 123)
[unwrapped, B0] = ROMEO(Phase_nii.img, parameters);_

I run romeo.exe on the command line to get the same error, what should I do next, thank you.

Name of the shared library

In the "Issues when calling from MATLAB" section, it says the library name should be "libstc++.so".
That library doesn't exist, but "libstdc++.so" exists and loading that library solved the problem.
Thank you for making the program available.

Build crashes with "wrong argument formatting! too many arguments"

I've followed the build instructions in the related repo. After a fairly long build process, what I presume is a test is run:

./romeo/bin/romeo /some/path/to/romeo/julia-packages/dev/CompileMRI/test/data/small/Phase.nii -o /tmp/jl_OnIrwFyvaj -t 1:3 -k nomask

This results in

wrong argument formatting!
too many arguments

Causing the build (test?) process to abort.

The issue is that there is no -p flag placed before the filename

Push to Docker Hub

This stems from #3 (comment). It would be helpful (especially for OSX usage) to add a Dockerfile and push automatically to Docker Hub (https://hub.docker.com). Singularity users can also build from Docker Hub images, so that would help them as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.