API
This page contains documentation of the public API of MRIReco. In the Julia REPL one can access this documentation by entering the help mode with ? and then writing the function for which the documentation should be shown.
Operators
Operators are implemented as subtypes of AbstractLinearOperator, which is defined in the package LinearOperators.jl. Such operators must provide a function implementing the product and a function implementing the product with the adjoint. Furthermore, the number of rows and columns of the operator must be specified.
MRIReco.encodingOps2d_simple — FunctionencodingOps2d_simple(acqData::AcquisitionData, shape::NTuple{2,Int64}
; slice=1
, correctionMap::Array{ComplexF64}=ComplexF64[]
, method::String="nfft")generates an Array of LinearOperators which describe 2d signal encoding of the individual contrasts in an MRI acquisition (for a given slice).
Arguments
acqData::AcquisitionData- AcquisitionData objectshape::NTuple{2,Int64}- size of image to be encoded/reconstructedslice=1- slice to be encoded/reconstructed- (
correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities
MRIReco.encodingOps3d_simple — FunctionencodingOps3d_simple(acqData::AcquisitionData, shape::NTuple{2,Int64}
; correctionMap::Array{ComplexF64}=ComplexF64[]
, method::String="nfft")generates an Array of LinearOperators which describe 3d signal encoding of the individual contrasts&coils in an MRI acquisition (for a given slice). Arguments are the same as in the 2d case, with the exception that shape is of type NTuple{3,Int64} and the considered slice is not specified.
MRIReco.encodingOps2d_parallel — FunctionencodingOps2d_parallel(acqData::AcquisitionData, shape::NTuple{2,Int64}
, senseMaps::Array{ComplexF64}
; slice=1
, correctionMap::Array{ComplexF64}=ComplexF64[]
, method::String="nfft")generates an Array of LinearOperators which describe 2d signal encoding of the individual contrasts in an MRI acquisition (for a given slice). The different coils are taken into account in terms of their sensitivities
Arguments
acqData::AcquisitionData- AcquisitionData objectshape::NTuple{2,Int64}- size of image to be encoded/reconstructedsenseMaps::Array{ComplexF64}- coil sensitivitiesslice=1- slice to be encoded/reconstructed- (
correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities
MRIReco.encodingOps3d_parallel — FunctionencodingOps3d_parallel(acqData::AcquisitionData, shape::NTuple{2,Int64}
, senseMaps::Array{ComplexF64}
; correctionMap::Array{ComplexF64}=ComplexF64[]
, method::String="nfft")generates an Array of LinearOperators which describe 3d signal encoding of the individual contrasts in an MRI acquisition (for a given slice). The different coils are taken into account in terms of their sensitivities Arguments are the same as in the 2d case, with the exception that shape is of type NTuple{3,Int64} and the considered slice is not specified.
MRIReco.encodingOp2d_multiEcho — FunctionencodingOp2d_multiEcho(acqData::AcquisitionData, shape::NTuple{2,Int64}
; slice::Int64=1
, correctionMap::Array{ComplexF64}=ComplexF64[]
, method::String="nfft")generates a LinearOperator which describe combined 2d signal encoding of all the contrasts in an MRI acquisition (for a given slice).
Arguments
acqData::AcquisitionData- AcquisitionData objectshape::NTuple{2,Int64}- size of image to be encoded/reconstructedslice=1- slice to be encoded/reconstructed- (
correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities
MRIReco.encodingOp3d_multiEcho — FunctionencodingOp3d_multiEcho(acqData::AcquisitionData, shape::NTuple{2,Int64}
; correctionMap::Array{ComplexF64}=ComplexF64[])generates a LinearOperator which describe combined 3d signal encoding of all the contrasts in an MRI acquisition (for a given slice). Arguments are the same as in the 2d case, with the exception that shape is of type NTuple{3,Int64} and the considered slice is not specified.
MRIReco.encodingOp2d_multiEcho_parallel — FunctionencodingOp2d_multiEcho_parallel(acqData::AcquisitionData, shape::NTuple{2,Int64}
, senseMaps::Array{ComplexF64}
; slice=1
, correctionMap::Array{ComplexF64}=ComplexF64[]
, method::String="nfft")generates a LinearOperator which describe combined 3d signal encoding of all the contrasts in an MRI acquisition (for a given slice). The different coils are taken into account in terms of their sensitivities
Arguments
acqData::AcquisitionData- AcquisitionData objectshape::NTuple{2,Int64}- size of image to be encoded/reconstructedsenseMaps::Array{ComplexF64}- coil sensitivitiesslice=1- slice to be encoded/reconstructed- (
correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities
MRIReco.encodingOp3d_multiEcho_parallel — FunctionencodingOp3d_multiEcho_parallel(acqData::AcquisitionData, shape::NTuple{2,Int64}
, senseMaps::Array{ComplexF64}
; correctionMap::Array{ComplexF64}=ComplexF64[]
, method::String="nfft")generates a LinearOperator which describe combined 3d signal encoding of all the contrasts in an MRI acquisition (for a given slice). The different coils are taken into account in terms of their sensitivities Arguments are the same as in the 2d case, with the exception that shape is of type NTuple{3,Int64} and the considered slice is not specified.
MRIReco.fourierEncodingOp2d — Functionreturn 2d Fourier encoding operator (either Explicit or NFFT)
opname: "explicit" or "fast"slice: slice to which the operator will be applied
echoImage : calculate signal evolution relative to the echo time
MRIReco.fourierEncodingOp3d — Functionreturn 3d Fourier encoding operator (either Explicit, FFT or NFFT) opname : "explicit", "fft" or "fast" echoImage : calculate signal evolution relative to the echo time
MRIReco.ExplicitOp — MethodExplicitOp(shape::NTuple{D,Int64}, tr::Trajectory, correctionmap::Array{ComplexF64,D}
; echoImage::Bool=false, kargs...) where Dgenerates a ExplicitOp which explicitely evaluates the MRI Fourier signal encoding operator.
Arguments:
shape::NTuple{D,Int64}- size of image to encode/reconstructtr::Trajectory- Trajectory with the kspace nodes to samplecorrectionmap::Array{ComplexF64,D}- fieldmap for the correction of off-resonance effectsechoImage::Bool=false- if true sampling times will only be considered relative to the echo time this results in complex valued image even for real-valued input.kargs- additional keyword arguments
Missing docstring for RegularizedLeastSquares.FFTOp(T::Type, shape::Tuple, shift=true). Check Documenter's build log for details.
MRIReco.NFFTOp — MethodNFFTOp(shape::Tuple, tr::Trajectory; nodes=nothing, kargs...)generates a NFFTOp which evaluates the MRI Fourier signal encoding operator using the NFFT.
Arguments:
shape::NTuple{D,Int64}- size of image to encode/reconstructtr::Trajectory- Trajectory with the kspace nodes to sample- (
nodes=nothing) - Array containg the trajectory nodes (redundant) - (
kargs) - additional keyword arguments
MRIReco.FieldmapNFFTOp — MethodFieldmapNFFTOp(shape::NTuple{D,Int64}, tr::Trajectory,
correctionmap::Array{ComplexF64,D};
method::String="nfft",
echoImage::Bool=true,
alpha::Float64=1.75,
m::Float64=3.0,
K=20,
kargs...) where Dgenerates a FieldmapNFFTOp which evaluates the MRI Fourier signal encoding operator, including B0-inhomogeneities using time-segmented NFFTs.
Arguments:
shape::NTuple{D,Int64}- size of image to encode/reconstructtr::Trajectory- Trajectory with the kspace nodes to samplecorrectionmap::Array{ComplexF64,D}- fieldmap for the correction of off-resonance effects- (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities - (
echoImage::Bool=false) - if true sampling times will only be considered relative to the echo time this results in complex valued image even for real-valued input. - (
alpha::Float64=1.75) - oversampling factor for interpolation - (
m::Float64=3.0) - truncation size of interpolation kernel - (
K=20) - number of translates for LeastSquares approaches (not NFFT-approach) to time-segmentation - (
kargs) - additional keyword arguments
MRIReco.SamplingOp — FunctionSamplingOp(pattern::Array{Int}, shape::Tuple)buildsa LinearOperator which only returns the vector elements at positions indicated by pattern.
Arguents
pattern::Array{Int}- indices to sampleshape::Tuple- size of the array to sample
MRIReco.SensitivityOp — FunctionSensitivityOp(sensMaps::Matrix{ComplexF64}, numEchoes::Int=1)builds a LinearOperator which performs multiplication of a given image with the coil sensitivities specified in sensMaps
Arguments
sensMaps::Matrix{ComplexF64}- sensitivity maps ( 1. dim -> voxels, 2. dim-> coils)numEchoes- number of contrasts to which the opetaor will be applied
SensitivityOp(sensMaps::Array{T,4}, numEchoes::Int=1) where Tbuilds a LinearOperator which performs multiplication of a given image with the coil sensitivities specified in sensMaps
Arguments
sensMaps::Array{T,4}- sensitivity maps ( 1.-3. dim -> voxels, 4. dim-> coils)numEchoes- number of contrasts to which the opetaor will be applied
MRIReco.SparseOp — FunctionSparseOp(name::AbstractString, shape::NTuple{N,Int64}; kargs...) where Ngenerates the sparsifying transform (<: AbstractLinearOperator) given its name.
Arguments
name::AbstractString- name of the sparsifying transformshape::NTuple{N,Int64}- size of the Array to be transformed- (
kargs) - additional keyword arguments
Missing docstring for MRIReco.RegularizedLeastSquares.WeightingOp. Check Documenter's build log for details.
Datatypes
MRIReco.AcquisitionData — Typestruct describing MRI acquisition data.
Fields
sequenceInfo::Dict{Symbol,Any}- additional information on the pulse sequencetraj::Vector{Trajectory}- trajectories for each echo/contrastkdata::Array{Matrix{ComplexF64},3}- each matrix contains data for one trajectory (1. dim k-space nodes, 2. dim coils) the outer dims describe: 1. dim echoes, 2. dim slices, 3. dim repetitionssubsampleIndices::Vector{Array{Int64}}- indices sampled for each echo/contrastencodingSize::Vector{Int64}- size of the underlying image matrixfov::Vector{Float64}- field of view in m
MRIReco.AcquisitionData — MethodAcquisitionData(tr::T,kdata::Array{Matrix{ComplexF64},3}; seqInfo=Dict{Symbol,Any}()
, idx=nothing, encodingSize=Int64[0,0,0], fov=Float64[0,0,0]
, kargs...) where T <: Union{Trajectory,Vector{Trajectory}}constructor for AcquisitionData
Arguments
tr <: Union{Trajectory,Vector{Trajectory}}- trajectorieskdata::Array{Matrix{ComplexF64},3}- k-space data
the other fields of AcquisitionData can be passed as keyword arguments.
MRIReco.trajectory — Functiontrajectory(acqData::AcquisitionData,i::Int64=1)returns the i-th trajectory contained in acqData.
MRIReco.numContrasts — MethodnumContrasts(acqData::AcquisitionData)returns the number of contrasts/echoes in acqData
MRIReco.numChannels — FunctionnumChannels(acqData::AcquisitionData)returns the number of channels/coils in acqData
numChannels(f::RawAcquisitionData)returns the number of channels in a RawAcquisitionData object.
MRIReco.numSlices — FunctionnumSlices(tr::Trajectory) returns the number of slices of a trajectory
numSlices(acqData::AcquisitionData)returns the number of slices in acqData
MRIReco.numRepititions — FunctionnumRepititions(acqData::AcquisitionData)returns the number of repetitions in acqData
MRIReco.kData — FunctionkData(acqData::AcquisitionData, echo::Int64=1, coil::Int64=1, slice::Int64=1;rep::Int64=1)returns the k-space contained in acqData for given echo, coil, slice and rep(etition).
MRIReco.multiEchoData — FunctionmultiEchoData(acqData::AcquisitionData, coil::Int64, slice::Int64;rep::Int64=1)returns the k-space contained in acqData for all echoes and given coil, slice and rep(etition).
MRIReco.multiCoilData — FunctionmultiCoilData(acqData::AcquisitionData, echo::Int64, slice::Int64;rep::Int64=1)returns the k-space contained in acqData for all coils and given echo, slice and rep(etition).
MRIReco.multiCoilMultiEchoData — FunctionmultiCoilMultiEchoData(acqData::AcquisitionData, echo::Int64, slice::Int64;rep::Int64=1)returns the k-space contained in acqData for all coils, echoes and given slice and rep(etition).
MRIReco.profileData — FunctionprofileData(acqData::AcquisitionData, echo::Int64, slice::Int64, rep::Int, prof_tr::Int)returns the profile-data prof_tr contained in acqData for given echo, coil, slice and rep(etition).
MRIReco.samplingDensity — FunctionsamplingDensity(acqData::AcquisitionData,shape::Tuple)returns the sampling density for all trajectories contained in acqData.
MRIReco.changeEncodingSize2D — FunctionchangeEncodingSize2D(acqData::AcquisitionData,newEncodingSize::Vector{Int64})changes the encoding size of 2d encoded acqData to newEncodingSize. Returns a new AcquisitionData object.
MRIReco.convert3dTo2d — Functionconvert3dTo2d(acqData::AcquisitionData)convert the 3d encoded AcquisitionData acqData to the equivalent 2d AcquisitionData.
MRIReco.RawAcquisitionData — TypeRawAcquisitionData object.
Fields
params::Dict{String, Any}- Dict containing the information of the XML header in ISMRMRDprofiles::Vector{Profile}- Vector containing all the profiles of the acquisition
MRIReco.trajectory — Methodtrajectory(f::RawAcquisitionData; slice::Int=1, contrast::Int=1)
returns the Trajectory for given slice and contrast of a RawAcquisitionData object.
MRIReco.rawdata — Methodrawdata(f::RawAcquisitionData)returns the rawdata contained RawAcquisitionData object. The output is an Array{Matrix{ComplexF64},3}, which can be stored in a AcquisitionData object.
MRIReco.AcquisitionData — MethodAcquisitionData(f::RawAcquisitionData)converts RawAcquisitionData into the equivalent AcquisitionData object.
MRIReco.RawAcquisitionData — TypeRawAcquisitionData(f::ISMRMRDFile, dataset="dataset")reads the ISMRMRDFile f and stores the result in a RawAcquisitionDataObject
MRIReco.AcquisitionData — TypeAcquisitionData(f::ISMRMRDFile, dataset="dataset")reads the ISMRMRDFile f and stores the result in an AcquisitionDataObject
Trajectories
MRIReco.Trajectory — Typestruct describing a trajectory
Fields
name::String- name of the trajectorynodes::Matrix{Float64}- sampling locations in k-space. (1.dim <-> dimensions of k-space, 2. dim <-> sampling points)times::Vector{Float64}- sampling times in sTE::Float64- echo time in sAQ::Float64` - readout duration in s (per profile)numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profilenumSlices::Int64- number of slices (for 3d trajectories)cartesian::Bool- true if sampling points lie on a cartesian gridcircular::Bool- true if kspace is covered in a circular domain
MRIReco.trajectory — Methodtrajectory(trajName::AbstractString, numProfiles::Int, numSamplingPerProfile::Int; numSlices::Int64=1, TE::Float64=0.0, AQ::Float64=1.e-3, kargs...)is a factory method to construct a trajectory from its name
Arguments
name::String- name of the trajectorynumProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
numSlices::Int64=1) - number of slices (for 3d trajectories) - (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) kargs...- addional keyword arguments
Base.string — Methodstring(tr::Trajectory) returns the name of a trajectory
MRIReco.echoTime — MethodechoTime(tr::Trajectory) returns the echo time of a trajectory
MRIReco.acqTimePerProfile — MethodacqTimePerProfile(tr::Trajectory) returns the acquisition time per profile of a trajectory
MRIReco.numProfiles — Methodstring(tr::Trajectory) returns the name of a trajectory
MRIReco.numSamplingPerProfile — MethodnumSamplingPerProfile(tr::Trajectory) returns the number of samples per profile of a trajectory
MRIReco.numSlices — MethodnumSlices(tr::Trajectory) returns the number of slices of a trajectory
MRIReco.isCircular — MethodisCircular(tr::Trajectory) returns whether the trajectory has circular k-space coverage
MRIReco.isCartesian — MethodisCartesian(tr::Trajectory) returns whether the trajectory nodes lie on a cartesian grid
MRIReco.dims — Methoddims(tr::Trajectory) returns the number of dimensions of a trajectory
MRIReco.kspaceNodes — MethodkspaceNodes(tr::Trajectory) returns the kspace sampling points of a trajectory
MRIReco.readoutTimes — MethodreadoutTimes(tr::Trajectory) returns the readoutTimes for the sampling points of a trajectory
MRIReco.CartesianTrajectory — FunctionCartesianTrajectory(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, kmin=(-0.5,-0.5)
, kmax=(0.5,0.5)
, kargs...)returns a 2d cartesian trajectory.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
kmin=(-0.5,-0.5)) - minimum values of the covered k-space (for partial Fourier imaging) - (
kmax=(-0.5,-0.5)) - maximum values of the covered k-space (for partial Fourier imaging)
MRIReco.EPITrajectory — FunctionEPITrajectory(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, EPI_factor::Int64=1
, profileOffset= :equispaced
, kargs...)returns a 2d cartesian trajectory.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
EPI_factor::Int64=1) - EPI factor, e.g. how many profiles to acquire per shot - (
profileOffset= :equispaced) - equispaced or random ordering of the shots
MRIReco.OneLine2dTrajectory — FunctionOneLine2dTrajectory(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, angle::Float64=0.0
, kargs...)returns a trajectory consisting of one arbitrarily rotated profile.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
angle::Float64=0.0) - angle of the profile (with respect to the x-axis) in radians
MRIReco.RadialTrajectory — FunctionRadialTrajectory(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, angleOffset= :equispaced
, kargs...)returns a 2d radial trajectory.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
angleOffset= :equispaced) - spacing of profile angles (:equispacedsampling,:goldenangle sampling or:randomsampling)
MRIReco.SpiralTrajectory — FunctionSpiralTrajectory(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, windings::Real= 6.25
, angleOffset= :equispaced
, kargs...)returns a 2d spiral trajectory.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
windings::Real= 6.25) - number of windings of the spiral profiles - (
angleOffset= :equispaced) - spacing of profile angles (:equispacedsampling,:goldenangle sampling or:randomsampling)
MRIReco.SpiralTrajectoryVarDens — FunctionSpiralTrajectoryVarDens(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, windings::Real= 6.25
, alpha=2.0
, angleOffset= :equispaced
, kargs...)returns a 2d spiral trajectory with variable density
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
windings::Real= 6.25) - number of windings of the spiral profiles - (
alpha=2.0) - exponent describing the evolution of the magnitude of the sampling points along the profiles - (
angleOffset= :equispaced) - spacing of profile angles (:equispacedsampling,:goldenangle sampling or:randomsampling)
MRIReco.CartesianTrajectory3D — FunctionCartesianTrajectory3D(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, numSlices=1
, kargs...)returns a 3d cartesian trajectory.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
numSlices=1) - number of slices
MRIReco.KooshballTrajectory — FunctionKooshballTrajectory(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, kargs...)returns a 3d kooshball trajectory.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile)
MRIReco.StackOfStarsTrajectory — FunctionStackOfStarsTrajectory(numProfiles, numSamplingPerProfile
; TE::Float64=0.0
, AQ::Float64=1.e-3
, numSlices=1
, angleOffset= :equispaced
, kargs...)returns a 2d radial trajectory.
Arguments
numProfiles::Int64- number of profilesnumSamplingPerProfile::Int64- number of sampling points per profile- (
TE::Float64=0.0) - echo time in s - (
AQ::Float64=1.e-3) - readout duration in s (per profile) - (
numSlices=1) - number of slices - (
angleOffset= :equispaced) - spacing of profile angles (:equispacedsampling,:goldenangle sampling or:randomsampling)
Sequences
MRIReco.MESequence — TypeGeneral Multi-Echo sequence with variable flip angles and TR.
The phase of the excitation pulse has a phase of -90° in order to fulfill CPMG conditions.
For simplicity instantaneous pulses are assumed.
echoes apperat at times Techo, 2*Techo,..., numContrasts*T_echo after the excitation pulse
Fields
excitationAngle::Float64- flip angle of the excitation pulserefocusingAngles :: Vector{Float64}- flip angles of the refocusing pulsesT_rf::Vector{Float64}- times of the refocusing pulses relative to the excitation pulseT_echo:: Vector{Float64}- echo times relative to the excitation pulse
MRIReco.numContrasts — MethodnumContrasts(seq::MESequence)returns the number of echoes of an ME Sequence
MRIReco.echoTimes — MethodechoTimes(seq::MESequence)returns the echo times of an ME Sequence
MRIReco.flipAngles — MethodflipAngles(seq::MESequence)returns the refocusing flip angles of an ME Sequence
MRIReco.echoAmplitudes — FunctionechoAmplitudes(seq::MESequence, R1::Float64, R2::Float64, numStates=nothing)calculates echo amplitudes for a given MESequence and given relaxation Rates R1, R2. Calculations are performed using the extended phase graph method. For simplicity instantaneous pulses are assumed. If numStates=nothing all dephasing states will be taken into account
Arguments
seq::MESequence- pulse sequenceR1::Float64- R1 value to use (1/T1)R2::Float64- R2 value to use (1/T2)numStates=nothing- number of dephasing states to consider
MRIReco.epgAmplitudes — FunctionepgAmplitudes(seq::MESequence, R1::Float64, R2::Float64, numStates=nothing)calculates EPG amplitudes after each pulse of a given MESequence with the given relaxation Rates R1, R2. Calculations are performed using the extended phase graph method. For simplicity instantaneous pulses are assumed. If numStates=nothing all dephasing states will be taken into account
Arguments
seq::MESequence- pulse sequenceR1::Float64- R1 value to use (1/T1)R2::Float64- R2 value to use (1/T2)numStates=nothing- number of dephasing states to consider
MRIReco.epgRotation — FunctionepgRotation(alpha::Float64, F::Vector{T}, Z::Vector{T}; statesConsidered=nothing, phi::Float64=0.0)applies Bloch-rotation (<=> RF pulse) to a set of EPG states.
Arguments
alpha::Float64- flip angle of the RF pulseF::Vector{T}- transverse dephasing statsZ::Vector{T}- longitudinal dephasing statsstatesConsidered=nothing- number of dephasing states to consider (nothing means all states are taken into account)phi::Float64=0.0- phase of the RF pulse
MRIReco.epgRelaxation — FunctionepgRelaxation( R1::Float64, R2::Float64, t::Float64, F::Vector{T}, Z::Vector{T}) where Tapplies relaxation matrices to a set of EPG states.
Arguments
R1::Float64- R1R2::Float64- R2t::Float64- length of time interval in sF::Vector{T}- transverse dephasing statsZ::Vector{T}- longitudinal dephasing stats
MRIReco.epgDephasing — FunctionepgDephasing(F::Vector{T}, n=1) where T = circshift(F[:],n)shifts the transverse dephasing states F corresponding to n dephasing-cycles.
MRIReco.rfRotation — FunctionrfRotation(alpha, phi=0.)returns the rotation matrix for a pulse with flip angle alpha and phase phi.
Sampling
MRIReco.sample — Functionsample(shape::NTuple{N,Int64}, redFac::Float64, patFunc::String; kargs...)generates a Vector{Int64} of indices to sample an Array of of size shape with a reduction factor redFac.
Arguments
shape::NTuple{N,Int64}- size of the Array to be sampledredFac::Float64- subsampling factorpatFunc::String- name of the sampling function ("random, "regular", "lines", "poisson" or "vdPoisson")
MRIReco.sample_kspace — Methodsample_kspace(data::AbstractArray, redFac::Float64, patFunc::String; kargs...)subsamples the Array data with a reduction factor redFac and returns both the subsampled Array (as a vector) and the sampled indices (as a vector)
Arguments
data::AbstractArray- array to be sampledredFac::Float64- subsampling factorpatFunc::String- name of the sampling function ("random, "regular", "lines", "poisson" or "vdPoisson")kargs...- addional keyword arguments
MRIReco.sample_kspace — Methodsample_kspace(acqData::AcquisitionData,redFac::Float64,
patFunc::AbstractString; rand=true, profiles=true,
seed = 1234, kargs...)subsamples the data in acqData with reduction factor redFac and returns a new AcquisitionData object.
Arguments
acqData::AcquisitionDatay- AcquisitionData to be sampledredFac::Float64- subsampling factorpatFunc::String- name of the sampling function ("random, "regular", "lines", "poisson" or "vdPoisson")- (
rand=true) - use different patterns for the different contrasts - (
profiles=true) - sample complete profiles - (
seed=1234) - seed for the random number generator kargs...- addional keyword arguments
MRIReco.sample_regular — Methodsample_regular(shape::Tuple{Int64,Int64},redFac::Float64;kargs...)generates a regular sampling pattern for an Array of size shape with a subsampling factor redFac.
Arguments
shape::NTuple{N,Int64}- size of the Array to be sampledredFac::Float64- subsampling factor
MRIReco.sample_random — Methodsample_random(shape::Tuple{Int64,Int64},redFac::Float64;calsize::Int64=0,kargs...)generates a random sampling pattern for an Array of size shape with a subsampling factor redFac.
Arguments
shape::NTuple{N,Int64}- size of the Array to be sampledredFac::Float64- subsampling factor- (
calsize::Int64=0) - size of the fully sampled calibration area
MRIReco.sample_poissondisk — Methodsample_poissondisk(shape::Tuple{Int64,Int64},redFac::Float64;calsize::Int64=0, seed::Int64=1234,kargs...)generates a Poisson disk sampling pattern for an Array of size shape with a subsampling factor redFac.
Arguments
shape::NTuple{2,Int64}- size of the Array to be sampledredFac::Float64- subsampling factor- (
calsize::Int64=0) - size of the fully sampled calibration area - (
seed=1234) - seed for the random number generator
MRIReco.sample_vdpoisson — Methodsample_vdpoisson(shape::Tuple{Int64,Int64},redFac::Float64; seed::Int64=1234,kargs...)generates a variable density Poisson disk sampling pattern for an Array of size shape with a subsampling factor redFac.
Arguments
shape::NTuple{2,Int64}- size of the Array to be sampledredFac::Float64- subsampling factor- (
seed=1234) - seed for the random number generator
MRIReco.sample_lines — Methodsample_lines(shape::Tuple{Int64,Int64},redFac::Float64;sampleFunc="random",kargs...)generates a pattern to sample complete lines of an Array of size shape with a subsampling factor redFac.
Arguments
shape::NTuple{N,Int64}- size of the Array to be sampledredFac::Float64- subsampling factorsampleFunc="random"- name of the sampling function ("random, "regular", "lines", "poisson" or "vdPoisson")kargs...- addional keyword arguments
MRIReco.calculateIncoherence — FunctioncalculateIncoherence(acqData::AcquisitionData, recoParams::Dict, slice=1)calculates the incoherence of the sampling pattern contained in acqData
Arguments
acqData::AcquisitionData- AcquisitionData containing the sampling patternrecoParams::Dict- Dict containing reconstruction parameters- (
slice=1) - slice for which to calculate the incoherence
Simulation
MRIReco.simulation — Methodsimulation(image::Array{T,3}, simParams::Dict) where T<:Union{ComplexF64,Float64}Simulate MRI raw data from given image data. All simulation parameters are passed to the function in the form of a dictionary.
MRIReco.simulation — Methodsimulation(image::Array{T,3}, simParams::Dict, filename::String) where T<:Union{ComplexF64,Float64}Performs the same simulation as simulation(image, simParams) and saves the result in a file with name filename
MRIReco.simulation — Methodsimulation(image::Array{T,2}, simParams::Dict) where T<:Union{ComplexF64,Float64}Simulate MRI raw data from given image data. All simulation parameters are passed to the function in the form of a dictionary.
MRIReco.simulation — Functionsimulation(tr::Trajectory, image::Array{ComplexF64}, correctionMap = []; opName="fast"
, senseMaps=[], verbose=true, kargs...)Transforms a given image to k-space Domain. Dispatches whether the trajectory is 2d or 3d The Fourier integrals can be evaluated exactly or using NFFT Returns the demodulated signal.
...
Arguments
tr::Trajectory- three-dimensional Trajectoryimage::Array{ComplexF64,3}- image to be transformed- (
correctionMap=[]) - sum of the field offresonance (imaginary) map and relaxation map (real) - (`opName="fast") - name of operator to use ("explicit" or "fast")
- (
sensmaps=[]) - array of coil sensitivities - (
verbose=true) - prints the progress if true kargs...- addional keyword arguments
...
MRIReco.simulation — Methodsimulation(seq::AbstractSequence, tr::Vector{Trajectory}, image::Array{ComplexF64,3}
; opName="fast", r1map=[], r2map=[], fmap=[], senseMaps=[]
, verbose=true, kargs...)Simulate k-space data for all echoes of a pulse sequence. The echo intensities are simulated using the EPG formalism The Fourier integrals can be evaluated exactly or using NFFT
...
Arguments
seq::AbstractSequence- pulse sequencetr::Vector{Trajectory}- trajectories for all contrastsimage::Array{ComplexF64,3}- image to be transformed- (
r1map=[]) - R1 map of the object (real) - (
r2map=[]) - R2 map of the object (real) / (R2* for GRE sequences) - (
fmap=[]) - fieldmap (real) - (`opName="fast") - name of operator to use ("explicit" or "fast")
- (
sensmaps=[]) - array of coil sensitivities - (
verbose=true) - prints the progress if true kargs...- addional keyword arguments
...
MRIReco.addNoise — FunctionAdds average white gaussian noise to the signal x
Arguments
x::Vector- signal vector- 'snr::Float64' - target SNR
MRIReco.addNoise — Methodreturn AcquisitionData with white gaussian noise
Arguments
acqData::AcquisitionData- AcquisitionData- 'snr::Float64' - target SNR
MRIReco.addNoise! — Methodadd white gaussian noise to AcquisitionData with (in-place)
Arguments
acqData::AcquisitionData- AcquisitionData- 'snr::Float64' - target SNR
MRIReco.birdcageSensitivity — FunctionbirdcageSensitivity(N::Int64, ncoils::Int64, relative_radius::Float64)Computes the sensitivity maps for each coils that are arranged in a birdcage manner.
MRIReco.quadraticFieldmap — FunctionquadraticFieldmap(Nx::Int64, Ny::Int64, maxOffresonance::Float64=125.0)Computes a parabolic fieldmap.
Reconstruction
MRIReco.reconstruction — Methodreconstruction(acqData::AcquisitionData, recoParams::Dict)takes an AcquisitionData object and a parameter dictionary and calculates an image from the given raw data.
Reconstruction types are specified by the symbol :reco. Valid reconstruction names are:
- :direct - direct Fourier reconstruction
- :standard - iterative reconstruction for all contrasts, coils & slices independently
- :multiEcho - iterative joint reconstruction of all echo images
- :multiCoil - SENSE-type iterative reconstruction
- :multiCoilMultiEcho - SENSE-type iterative reconstruction of all echo images
MRIReco.reconstruction — Methodreconstruction(acqData::AcquisitionData, recoParams::Dict,filename::String; force=false)performs the same image reconstrucion as reconstruction(acqData::AcquisitionData, recoParams::Dict) and saves the image in a file with name filename. If force=false, the reconstructed image is loaded from the the file filename if the latter is present.
MRIReco.setupIterativeReco — FunctionsetupIterativeReco(acqData::AcquisitionData, recoParams::Dict)builds relevant parameters and operators from the entries in recoParams
relevant parameters
reconSize::NTuple{2,Int64}- size of image to reconstructweights::Vector{Vector{ComplexF64}}- sampling density of the trajectories in acqDatasparseTrafo::AbstractLinearOperator- sparsifying transformationreg::Regularization- Regularization to be usednormalize::Bool- adjust regularization parameter according to the size of k-space datasolvername::String- name of the solver to usesenseMaps::Array{ComplexF64}- coil sensitivitiescorrectionMap::Array{ComplexF64}- fieldmap for the correction of off-resonance effectsmethod::String="nfft"- method to use for time-segmentation when correctio field inhomogeneities
sparseTrafo and reg can also be speficied using their names in form of a string.
MRIReco.reconstruction_direct_2d — Functionreconstruction_direct_2d(acqData::AcquisitionData, reconSize::NTuple{2,Int64}, weights::Vector{Vector{ComplexF64}}, correctionMap::Array{ComplexF64}=ComplexF64[])Performs a direct Fourier-based image reconstruction of 2d encoded AcquisitionData
input: acqData::AcquisitionData - AcquisitionData object reconSize::NTuple{2,Int64} - size of image to reconstruct weights::Vector{Vector{ComplexF64}} - sampling density of the trajectories in acqData (correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects
MRIReco.reconstruction_direct_3d — Functionreconstruction_direct_3d(acqData::AcquisitionData, reconSize::NTuple{3,Int64}, weights::Vector{Vector{ComplexF64}}, correctionMap::Array{ComplexF64}=ComplexF64[])Performs a direct Fourier-based image reconstruction of 3d encoded AcquisitionData
input: acqData::AcquisitionData - AcquisitionData object reconSize::NTuple{3,Int64} - size of image to reconstruct weights::Vector{Vector{ComplexF64}} - sampling density of the trajectories in acqData (correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects
MRIReco.reconstruction_simple — FunctionPerforms iterative image reconstruction independently for the data of all coils, contrasts and slices
Arguments
acqData::AcquisitionData- AcquisitionData objectreconSize::NTuple{2,Int64}- size of image to reconstructreg::Regularization- Regularization to be usedsparseTrafo::AbstractLinearOperator- sparsifying transformationweights::Vector{Vector{ComplexF64}}- sampling density of the trajectories in acqDatasolvername::String- name of the solver to use- (
correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities - (
normalize::Bool=false) - adjust regularization parameter according to the size of k-space data - (
params::Dict{Symbol,Any}) - Dict with additional parameters
MRIReco.reconstruction_multiEcho — FunctionPerforms a iterative image reconstruction jointly for all contrasts. Different slices and coil images are reconstructed independently.
Arguments
acqData::AcquisitionData- AcquisitionData objectreconSize::NTuple{2,Int64}- size of image to reconstructreg::Regularization- Regularization to be usedsparseTrafo::AbstractLinearOperator- sparsifying transformationweights::Vector{Vector{ComplexF64}}- sampling density of the trajectories in acqDatasolvername::String- name of the solver to use- (
correctionMap::Array{ComplexF64})- fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities - (
normalize::Bool=false) - adjust regularization parameter according to the size of k-space data - (
params::Dict{Symbol,Any}) - Dict with additional parameters
MRIReco.reconstruction_multiCoil — FunctionPerforms a SENSE-type iterative image reconstruction. Different slices and contrasts images are reconstructed independently.
Arguments
acqData::AcquisitionData- AcquisitionData objectreconSize::NTuple{2,Int64}- size of image to reconstructreg::Regularization- Regularization to be usedsparseTrafo::AbstractLinearOperator- sparsifying transformationweights::Vector{Vector{ComplexF64}}- sampling density of the trajectories in acqDatasolvername::String- name of the solver to usesenseMaps::Array{ComplexF64}- coil sensitivities- (
correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities - (
normalize::Bool=false) - adjust regularization parameter according to the size of k-space data - (
params::Dict{Symbol,Any}) - Dict with additional parameters
MRIReco.reconstruction_multiCoilMultiEcho — FunctionPerforms a SENSE-type iterative image reconstruction which reconstructs all contrasts jointly. Different slices are reconstructed independently.
Arguments
acqData::AcquisitionData- AcquisitionData objectreconSize::NTuple{2,Int64}- size of image to reconstructreg::Regularization- Regularization to be usedsparseTrafo::AbstractLinearOperator- sparsifying transformationweights::Vector{Vector{ComplexF64}}- sampling density of the trajectories in acqDatasolvername::String- name of the solver to usesenseMaps::Array{ComplexF64}- coil sensitivities- (
correctionMap::Array{ComplexF64}) - fieldmap for the correction of off-resonance effects - (
method::String="nfft") - method to use for time-segmentation when correctio field inhomogeneities - (
normalize::Bool=false) - adjust regularization parameter according to the size of k-space data - (
params::Dict{Symbol,Any}) - Dict with additional parameters
MRIReco.espirit — Function`maps = espirit(acqData::AcquisitionData, ksize::NTuple{2,Int64}, ncalib::Int64
; eigThresh_1::Float64=0.02, eigThresh_2::Float64=0.95)`obtains coil sensitivities from a calibration area using ESPIRiT adapted from the MATLAB code by Uecker et al. for the paper' M. Uecker, P. Lai, MJ Murphy, P. Virtue, M Elad, JM Pauly, SS Vasanawala and M Lustig, "ESPIRiT- an eigenvalue approach to autocalibrating parallel MRI: Where SENSE meets GRAPPA", Magn Reson Med, 2013
the matlab code can be found at: [http://people.eecs.berkeley.edu/~mlustig/Software.html]
Arguments
acqData::AcquisitionData- AcquisitionDataksize::NTuple{2,Int64}- size of the k-space matrixncalib::Int64- number of calibration points in each dimensioneigThresh_1::Float64=0.02- threshold for the singular values of the calibration matrix (relative to the largest value)eigThresh_2::Float64=0.95- threshold of the image space kernels (if no singular value >eigThresh_2exists) , the corresponding pixel has a sensitivity of 0.
Returns a 4D array.
maps = espirit(calibData::Array{ComplexF64,3}, imsize::NTuple{2,Int64}, ksize::NTuple{2,Int64} ; eigThresh_1::Float64=0.02, eigThresh_2::Float64=0.95) Returns a 3D array.
MRIReco.nrmsd — Functionnrmsd(I,Ireco)computes the normalized root mean squared error of the image Ireco with respect to the image I.