API
In the following, you find the documentation of all exported functions of the MRFingerprintingRecon.jl package:
MRFingerprintingRecon.FFTNormalOpMRFingerprintingRecon.NFFTNormalOpMRFingerprintingRecon.calcCoilMapsMRFingerprintingRecon.calculateBackProjectionMRFingerprintingRecon.calculateGoldenMeansMRFingerprintingRecon.grog_calibMRFingerprintingRecon.grog_gridding!MRFingerprintingRecon.kooshballMRFingerprintingRecon.kooshballGAMRFingerprintingRecon.radial_grog!MRFingerprintingRecon.traj_2d_radial_goldenratioMRFingerprintingRecon.traj_cartesian
MRFingerprintingRecon.FFTNormalOp — MethodFFTNormalOp(img_shape, trj, U; cmaps)
FFTNormalOp(M, U; cmaps)
FFTNormalOp(Λ; cmaps)Create normal operator of FFT operator. Differentiate between functions exploiting a pre-calculated kernel basis Λ and the functions which calculate Λ based on a passed trajectory trj or mask M.
Arguments
img_shape::Tuple{Int}: Image dimensionstraj::Vector{Matrix{Float32}}: TrajectoryU::Matrix{ComplexF32}=(1,): Basis coefficients of subspacecmaps::Matrix{ComplexF32}: Coil sensitivitiesM::Vector{Matrix{Float32}}: MaskΛ::Array{Complex{T},3}: Toeplitz kernel basisnum_fft_threads::Int=round(Int, Threads.nthreads()/size(U, 2))or `round(Int, Threads.nthreads()/size(Λ, 1)): Number of Threads for FFT
MRFingerprintingRecon.NFFTNormalOp — MethodNFFTNormalOp(img_shape, trj, U; cmaps, verbose, num_fft_threads)
NFFTNormalOp(img_shape, Λ, kmask_indcs; cmaps)Create normal operator of NFFT operator. Differentiate between functions exploiting a pre-calculated Toeplitz kernel basis Λ and the function which calculates Λ based on a passed trajectory trj.
Arguments
img_shape::Tuple{Int}: Image dimensionstraj::AbstractVector{<:AbstractMatrix{T}}: TrajectoryU::AbstractMatrix{Tc}: Basis coefficients of subspacecmaps::AbstractVector{Matrix{ComplexF32}}=[ones(T, img_shape)]: Coil sensitivitiesΛ::Array{Complex{T},3}: Toeplitz kernel basiskmask_indcs::Vector{Int}: Sampling indices of Toeplitz maskverbose::Boolean=false: Verbose levelnum_fft_threads::Int=round(Int, Threads.nthreads()/size(U, 2))orround(Int, Threads.nthreads()/size(Λ, 1)): Number of threads for FFT
MRFingerprintingRecon.calcCoilMaps — MethodcalcCoilMaps(data, trj, img_shape; U, density_compensation, kernel_size, calib_size, eigThresh_1, eigThresh_2, nmaps, verbose)Estimate coil sensitivity maps using ESPIRiT [1].
Arguments
data::AbstractVector{<:AbstractMatrix{Complex{T}}}: Complex dataset either as AbstractVector of matrices or single matrix. The optional outer vector defines different time frames that are combined using the subspace defined inUtrj::AbstractVector{<:AbstractMatrix{T}}: Trajectory with samples corresponding to the dataset either as AbstractVector of matrices or single matrix.img_shape::NTuple{N,Int}: Shape of image
Keyword Arguments
U::Matrix= N==3 ? ones(size(data,1)) : I(1): Basis coefficients of subspace (only defined ifdataandtrjare vectors of matrices)density_compensation=:radial_3D: Values of:radial_3D,:radial_2D,:none, or of typeAbstractVector{<:AbstractVector}kernel_size=ntuple(_ -> 6, N): Kernel sizecalib_size=ntuple(_ -> 24, N): Size of calibration regioneigThresh_1=0.01: Threshold of first eigenvalueeigThresh_2=0.9: Threshold of second eigenvaluenmaps=1: Number of estimated mapsverbose::Boolean=false: Verbosity level
return
cmaps::::Vector{<:Array{Complex{T}}}: Coil sensitivities as Vector of arrays
References
[1] Uecker, M., Lai, P., Murphy, M.J., Virtue, P., Elad, M., Pauly, J.M., Vasanawala, S.S. and Lustig, M. (2014), ESPIRiT—an eigenvalue approach to autocalibrating parallel MRI: Where SENSE meets GRAPPA. Magn. Reson. Med., 71: 990-1001. https://doi.org/10.1002/mrm.24751
MRFingerprintingRecon.calculateBackProjection — MethodcalculateBackProjection(data, trj, img_shape; U, density_compensation, verbose)
calculateBackProjection(data, trj, cmaps::AbstractVector{<:AbstractArray{cT,N}}; U, density_compensation, verbose)
calculateBackProjection(data, trj, cmaps_img_shape; U, density_compensation, verbose)
calculateBackProjection(data, trj, cmaps; U)Calculate (filtered) backprojection
Arguments
data <: Union{AbstractVector{<:AbstractMatrix{cT}},AbstractMatrix{cT}}: Complex dataset either as AbstractVector of matrices or single matrix. The optional outer matrix defines different time frames that are reconstructed in the subspace defined in U.trj <: AbstractVector{<:AbstractMatrix{T}}: Trajectory with samples corresponding to the dataset. For a Cartesian reconstruction, useT <: Intand definetrj[it][idim,ik] ∈ (1, img_shape[idim]). IfT <: Float, the NFFT is used.
One of the following arguments needs to be supplied
img_shape::NTuple{N,Int}: Shape of image; in this case, the data is reconstructed coilwise.cmaps::::AbstractVector{<:AbstractArray{T}}: Coil sensitivities; in this case, the coils are added up to a single backprojection.
Optional Keyword Arguments
U::Matrix = I(length(data))or= I(1)`: Basis coefficients of subspace (only defined if data and trj have different timeframes)density_compensation = :none: Values of:radial_3D,:radial_2D,:none, or of typeAbstractVector{<:AbstractVector}verbose::Boolean = false: Verbosity level
MRFingerprintingRecon.calculateGoldenMeans — MethodcalculateGoldenMeans()Function to calculate 3D golden means [1].
References
[1] Chan, R.W., Ramsay, E.A., Cunningham, C.H. and Plewes, D.B. (2009), Temporal stability of adaptive 3D radial MRI using multidimensional golden means. Magn. Reson. Med., 61: 354-363. https://doi.org/10.1002/mrm.21837
MRFingerprintingRecon.grog_calib — Methodgrog_calib(data, trj, Nr)Perform GROG kernel calibration based on whole radial trajectory and passed data. Calibration follows the work on self-calibrating radial GROG (https://doi.org/10.1002/mrm.21565).
Arguments
data::AbstractVector{<:AbstractMatrix{cT}}: Complex dataset passed as AbstractVector of matricestrj::Vector{Matrix{Float32}}: Trajectory with samples corresponding to the dataset passed as AbstractVector of matrices with Float32 entriesNr::Int: Number of samples per read out
MRFingerprintingRecon.grog_gridding! — Methodgrog_gridding!(data, trj, lnG, Nr, img_shape)Perform gridding of data based on pre-calculated GROG kernel.
Arguments
data::AbstractVector{<:AbstractMatrix{cT}}: Complex dataset passed as AbstractVector of matricestrj::Vector{Matrix{Float32}}: Trajectory with samples corresponding to the dataset passed as AbstractVector of matrices with Float32 entrieslnG::Vector{Matrix{Float32}}: Natural logarithm of GROG kernel in all dimensionsNr::Int: Number of samples per read outimg_shape::Tuple{Int}: Image dimensions
Output
trj::Vector{Matrix{Int32}}: Cartesian trajectory with the elementstrj[it][idim,ik] ∈ (1, img_shape[idim])
Dimensions:
data: [timesteps][samples, spokes, coils, repetitions of sampling pattern]trj: [timesteps][dims, samples, repetitions]lnG: [dims][Ncoils, Ncoils]
MRFingerprintingRecon.kooshball — Methodkooshball(Nr, theta, phi; thetaRot, phiRot, delay)Function to calculate kooshball trajectory.
Arguments
Nr::Int: Number of read out samplestheta::Array{Float,2}: Array with dimensions:Ncyc, Ntdefining the anglesthetafor each cycle and timestep.phi::Array{Float,2}: Array with dimensions:Ncyc, Ntdefining the anglesphifor each cycle and timestep.thetaRot::Float= 0: Fixed rotation angle along thetaphiRot::Float= 0: Fixed rotation angle along phidelay::Tuple{Float, Float, Float}=(0, 0, 0): Gradient delays in (HF, AP, LR)
MRFingerprintingRecon.kooshballGA — MethodkooshballGA(Nr, Ncyc, Nt; thetaRot, phiRot, delay)Function to calculate golden means [1] based kooshball trajectory.
Arguments
Nr::Int: Number of read out samplesNcyc::Int: Number of cyclesNt::Int: Number of time steps in the trajectorythetaRot::Float= 0: Fixed rotation angle along thetaphiRot::Float= 0: Fixed rotation angle along phidelay::Tuple{Float, Float, Float}=(0, 0, 0): Gradient delays in (HF, AP, LR)
References
[1] Chan, R.W., Ramsay, E.A., Cunningham, C.H. and Plewes, D.B. (2009), Temporal stability of adaptive 3D radial MRI using multidimensional golden means. Magn. Reson. Med., 61: 354-363. https://doi.org/10.1002/mrm.21837
MRFingerprintingRecon.radial_grog! — Methodradial_grog!(data, trj, Nr, img_shape)Perform GROG kernel calibration and gridding [1] of data in-place. The trajectory is returned with integer values.
Arguments
data::AbstractVector{<:AbstractMatrix{cT}}: Complex dataset passed as AbstractVector of matricestrj::Vector{Matrix{Float32}}: Trajectory with samples corresponding to the dataset passed as AbstractVector of matrices with Float32 entriesNr::Int: Number of samples per read outimg_shape::Tuple{Int}: Image dimensions
Output
trj::Vector{Matrix{Int32}}: Cartesian trajectory with the elementstrj[it][idim,ik] ∈ (-img_shape[idim]/2, img_shape[idim]/2-1)
References
[1] Seiberlich, N., Breuer, F., Blaimer, M., Jakob, P. and Griswold, M. (2008), Self-calibrating GRAPPA operator gridding for radial and spiral trajectories. Magn. Reson. Med., 59: 930-935. https://doi.org/10.1002/mrm.21565
MRFingerprintingRecon.traj_2d_radial_goldenratio — Methodtraj_2d_radial_goldenratio(Nr, Ncyc, Nt; thetaRot, phiRot, delay, N)Function to calculate 2D golden ratio based trajectory [1]. By modifying N also tiny golden angles [2] are supported.
Arguments
Nr::Int: Number of read out samplesNcyc::Int: Number of cyclesNt::Int: Number of time steps in the trajectorythetaRot::Float= 0: Fixed rotation angle along thetaphiRot::Float= 0: Fixed rotation angle along phidelay::Tuple{Float, Float, Float}=(0, 0, 0): Gradient delays in (HF, AP, LR)N::Int= 1: Number of tiny golden angle
References
[1] Winkelmann S, Schaeffter T, Koehler T, Eggers H, Doessel O. An optimal radial profile order based on the Golden Ratio for time-resolved MRI. IEEE TMI 26:68–76 (2007) [2] Wundrak S, Paul J, Ulrici J, Hell E, Geibel MA, Bernhardt P, Rottbauer W, Rasche V. Golden ratio sparse MRI using tiny golden angles. Magn Reson Med 75:2372-2378 (2016)
MRFingerprintingRecon.traj_cartesian — Methodtraj_cartesian(T, Nx, Ny, Nz, Nt)Generate a 3D Cartesian trajectory. As input to functions using NFFTs, the trajectory can be defined as floats ∈ [-0.5, 0.5). For use with Cartesian FFTs, the trajectory consists of integers ∈ [1, N].
Arguments
Nx::Int: Number of readout samplesNy::Int: Number of phase encoding linesNz::Int: Number of phase encoding lines (third dimension)Nt::Int: Number of time steps in the trajectory
Optional Keyword Argument
T::Type=Int: Type of output trajectory. IfT <: Float, trajectory is defined ∈ (-0.5, 0.5). IfT <: Int, trajectory consists of values ∈ (1, N) instead.