Skip to content

Commit aa36bf4

Browse files
author
Ivo Maatman
committed
Bugfix grog test
1 parent 79db61f commit aa36bf4

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/FFTNormalOp.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Differentiate between functions exploiting a pre-calculated kernel basis `Λ` an
2525
1. Tamir JI, et al. “T2 shuffling: Sharp, multicontrast, volumetric fast spin-echo imaging”. Magn Reson Med. 77.1 (2017), pp. 180–195. https://doi.org/10.1002/mrm.26102
2626
2. Assländer J, et al. “Low rank alternating direction method of multipliers reconstruction for MR fingerprinting”. Magn Reson Med 79.1 (2018), pp. 83–96. https://doi.org/10.1002/mrm.26639
2727
"""
28-
function FFTNormalOp(img_shape, trj::AbstractArray{<:Integer, 3}, U::AbstractArray{Tc,2}; cmaps=(1,), sample_mask=trues(size(trj)[2:end]), num_fft_threads=round(Int, Threads.nthreads()/size(U, 2))) where {Tc <: Union{<:AbstractFloat, Complex{<:AbstractFloat}}}
28+
function FFTNormalOp(img_shape, trj::AbstractArray{<:Integer, 3}, U; cmaps=(1,), sample_mask=trues(size(trj)[2:end]), num_fft_threads=round(Int, Threads.nthreads()/size(U, 2)))
2929
Λ = calculate_kernel_cartesian(img_shape, trj, U; sample_mask)
3030
return FFTNormalOp(Λ; cmaps, num_fft_threads)
3131
end
3232

3333
# Wrapper for 4D data arrays
34-
function FFTNormalOp(img_shape, trj::AbstractArray{<:Integer,4}, U::AbstractArray{Tc,2}; sample_mask=trues(size(trj)[2:end]), kwargs...) where {Tc <: Union{<:AbstractFloat, Complex{<:AbstractFloat}}}
34+
function FFTNormalOp(img_shape, trj::AbstractArray{<:Integer,4}, U; sample_mask=trues(size(trj)[2:end]), kwargs...)
3535
trj = reshape(trj, size(trj, 1), :, size(trj,4))
3636
sample_mask = reshape(sample_mask, :, size(sample_mask,3))
3737
return FFTNormalOp(img_shape, trj, U; sample_mask, kwargs...)
@@ -73,19 +73,19 @@ end
7373
## ##########################################################################
7474
# Internal use
7575
#############################################################################
76-
struct _FFTNormalOp{S,ΛType,T,N,E,F,G}
76+
struct _FFTNormalOp{S,E,F,G,H,I,J,K}
7777
shape::S
7878
Ncoeff::Int
7979
fftplan::E
8080
ifftplan::F
81-
Λ::ΛType
82-
kmask_indcs::Vector{Int}
83-
kL1::Array{Complex{T},N}
84-
kL2::Array{Complex{T},N}
85-
cmaps::G
81+
Λ::G
82+
kmask_indcs::H
83+
kL1::I
84+
kL2::J
85+
cmaps::K
8686
end
8787

88-
function calculate_kernel_cartesian(img_shape, trj, U; sample_mask=trues(size(trj)[2:end]), verbose=false)
88+
function calculate_kernel_cartesian(img_shape, trj::AbstractArray{<:Integer,3}, U; sample_mask=trues(size(trj)[2:end]), verbose=false)
8989
Ncoeff = size(U, 2)
9090
Λ = zeros(eltype(U), Ncoeff, Ncoeff, img_shape...)
9191

0 commit comments

Comments
 (0)