ROMEO

Documentation for ROMEO.

ROMEO.calculateweightsMethod
calculateweights(wrapped; weights=:romeo, kwargs...)

Calculates weights for all edges. size(weights) == [3, size(wrapped)...]

Optional keyword arguments:

  • weights: Options are [:romeo] | :romeo2 | :romeo3 | :bestpath.
  • mag: Additional mag weights are used.
  • mask: Unwrapping is only performed inside the mask.
  • phase2: A second reference phase image (possibly with different echo time). It is used for calculating the phasecoherence weight.
  • TEs: The echo times of the phase and the phase2 images as a tuple (eg. (5, 10) or [5, 10]).
source
ROMEO.unwrapFunction
unwrap(wrapped::AbstractArray; keyargs...)

ROMEO unwrapping for 3D and 4D data.

Optional keyword arguments:

  • TEs: Required for 4D data. The echo times for multi-echo data. In the case of single-echo application with phase and the phase2 as a tuple (eg. (5, 10) or [5, 10]).
  • weights: Options are [:romeo] | :romeo2 | :romeo3 | :bestpath.
  • mag: The magnitude is used to improve the unwrapping-path.
  • mask: Unwrapping is only performed inside the mask.
  • phase2: A second reference phase image (possibly with different echo time). It is used for calculating the phasecoherence weight. This is automatically done for 4D multi-echo input and therefore not required.
  • correctglobal=false: If true corrects global n2π offsets.
  • individual=false: If true perform individual unwrapping of echos. Type ?unwrap_individual for more information
  • template=1: echo that is spatially unwrapped (if individual is false)
  • maxseeds=1: higher values allow more seperate regions
  • merge_regions=false: spatially merge neighboring regions after unwrapping
  • correct_regions=false: bring each regions median closest to 0 by adding n2π
  • wrap_addition=0: [0;π], allows 'linear unwrapping', neighbors can have more (π+wrap_addition) phase difference
  • temporal_uncertain_unwrapping=0.5: Useful for veins. It uses spatial unwrapping on voxels that have high uncertainty values after temporal unwrapping. A higher quality threshold re-unwraps more voxels spatially.

Examples

julia> using MriResearchTools
julia> phase = readphase("phase_3echo.nii")
julia> unwrapped = unwrap(phase; TEs=[1,2,3])
julia> savenii(unwrapped, "unwrapped.nii"; header=header(phase))
source
ROMEO.unwrap!Function
unwrap(wrapped::AbstractArray; keyargs...)

ROMEO unwrapping for 3D and 4D data.

Optional keyword arguments:

  • TEs: Required for 4D data. The echo times for multi-echo data. In the case of single-echo application with phase and the phase2 as a tuple (eg. (5, 10) or [5, 10]).
  • weights: Options are [:romeo] | :romeo2 | :romeo3 | :bestpath.
  • mag: The magnitude is used to improve the unwrapping-path.
  • mask: Unwrapping is only performed inside the mask.
  • phase2: A second reference phase image (possibly with different echo time). It is used for calculating the phasecoherence weight. This is automatically done for 4D multi-echo input and therefore not required.
  • correctglobal=false: If true corrects global n2π offsets.
  • individual=false: If true perform individual unwrapping of echos. Type ?unwrap_individual for more information
  • template=1: echo that is spatially unwrapped (if individual is false)
  • maxseeds=1: higher values allow more seperate regions
  • merge_regions=false: spatially merge neighboring regions after unwrapping
  • correct_regions=false: bring each regions median closest to 0 by adding n2π
  • wrap_addition=0: [0;π], allows 'linear unwrapping', neighbors can have more (π+wrap_addition) phase difference
  • temporal_uncertain_unwrapping=0.5: Useful for veins. It uses spatial unwrapping on voxels that have high uncertainty values after temporal unwrapping. A higher quality threshold re-unwraps more voxels spatially.

Examples

julia> using MriResearchTools
julia> phase = readphase("phase_3echo.nii")
julia> unwrapped = unwrap(phase; TEs=[1,2,3])
julia> savenii(unwrapped, "unwrapped.nii"; header=header(phase))
source
ROMEO.unwrap_individualFunction
unwrap_individual(wrapped::AbstractArray{T,4}; TEs, keyargs...) where T

Performs individual unwrapping of the echoes instead of temporal unwrapping. Still uses multi-echo information to improve the quality map. This function is identical to unwrap with the flag individual=true. The syntax is identical to unwrap, but doesn't support the temporal_uncertain_unwrapping and template options:

source
ROMEO.unwrap_individual!Function
unwrap_individual(wrapped::AbstractArray{T,4}; TEs, keyargs...) where T

Performs individual unwrapping of the echoes instead of temporal unwrapping. Still uses multi-echo information to improve the quality map. This function is identical to unwrap with the flag individual=true. The syntax is identical to unwrap, but doesn't support the temporal_uncertain_unwrapping and template options:

source
ROMEO.voxelqualityMethod
voxelquality(phase::AbstractArray; keyargs...)

Calculates a quality for each voxel. The voxel quality can be used to create a mask. The quality range is [0;1]

Examples

julia> qmap = voxelquality(phase_3echo; TEs=[1,2,3]);
julia> mask = robustmask(qmap);

Takes the same inputs as romeo/unwrap:

See also unwrap

source