ROMEO
Documentation for ROMEO.
ROMEO.calculateweightsROMEO.unwrapROMEO.unwrap!ROMEO.unwrap_individualROMEO.unwrap_individual!ROMEO.voxelquality
ROMEO.calculateweights — Methodcalculateweights(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]).
ROMEO.unwrap — Functionunwrap(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: Iftruecorrects global n2π offsets.individual=false: Iftrueperform individual unwrapping of echos. Type?unwrap_individualfor more informationtemplate=1: echo that is spatially unwrapped (ifindividualisfalse)maxseeds=1: higher values allow more seperate regionsmerge_regions=false: spatially merge neighboring regions after unwrappingcorrect_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 differencetemporal_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))ROMEO.unwrap! — Functionunwrap(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: Iftruecorrects global n2π offsets.individual=false: Iftrueperform individual unwrapping of echos. Type?unwrap_individualfor more informationtemplate=1: echo that is spatially unwrapped (ifindividualisfalse)maxseeds=1: higher values allow more seperate regionsmerge_regions=false: spatially merge neighboring regions after unwrappingcorrect_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 differencetemporal_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))ROMEO.unwrap_individual — Functionunwrap_individual(wrapped::AbstractArray{T,4}; TEs, keyargs...) where TPerforms 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:
ROMEO.unwrap_individual! — Functionunwrap_individual(wrapped::AbstractArray{T,4}; TEs, keyargs...) where TPerforms 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:
ROMEO.voxelquality — Methodvoxelquality(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