Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ julia = "1.9"
GPUArrays = "11"
KernelAbstractions = "0.9"
JLArrays = "0.2"
NFFT = "0.13"
AbstractNFFTs = "0.9"
LinearOperators = "2"
RadonKA = "0.6"
Wavelets = "0.9, 0.10"
Reexport = "1.0"
FFTW = "1.0"

[weakdeps]
AbstractNFFTs = "7f219486-4aa7-41d6-80a7-e08ef20ceed7"
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
NFFT = "efe261a4-0d2b-5849-be55-fc731d526b0d"
Expand All @@ -43,7 +44,7 @@ RadonKA = "86de8297-835b-47df-b249-c04e8db91db5"
test = ["Test", "FFTW", "Wavelets", "NFFT", "JLArrays", "RadonKA"]

[extensions]
LinearOperatorNFFTExt = ["NFFT", "FFTW"]
LinearOperatorNFFTExt = ["AbstractNFFTs", "FFTW"]
LinearOperatorFFTWExt = "FFTW"
LinearOperatorWaveletExt = "Wavelets"
LinearOperatorGPUArraysExt = "GPUArrays"
Expand Down
2 changes: 1 addition & 1 deletion ext/LinearOperatorNFFTExt/LinearOperatorNFFTExt.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module LinearOperatorNFFTExt

using LinearOperatorCollection, NFFT, NFFT.AbstractNFFTs, FFTW, FFTW.AbstractFFTs
using LinearOperatorCollection, AbstractNFFTs, FFTW, FFTW.AbstractFFTs

include("NFFTOp.jl")

Expand Down
6 changes: 3 additions & 3 deletions ext/LinearOperatorNFFTExt/NFFTOp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ generates a `NFFTOpImpl` which evaluates the MRI Fourier signal encoding operato
* `shape::NTuple{D,Int64}` - size of image to encode/reconstruct
* `tr` - Either a `Trajectory` object, or a `ND x Nsamples` matrix for an ND-dimenensional (e.g. 2D or 3D) NFFT with `Nsamples` k-space samples
* (`nodes=nothing`) - Array containg the trajectory nodes (redundant)
* (`kargs`) - additional keyword arguments
* (`kargs`) - additional keyword arguments for the NFFT plan
"""
function LinearOperatorCollection.NFFTOp(::Type{T};
shape::Tuple, nodes::AbstractMatrix{U}, toeplitz=false, oversamplingFactor=1.25,
Expand Down Expand Up @@ -41,8 +41,8 @@ LinearOperators.storage_type(op::NFFTOpImpl) = typeof(op.Mv5)
function NFFTOpImpl(shape::Tuple, tr::AbstractMatrix{T}; toeplitz=false, oversamplingFactor=1.25, kernelSize=3, S = Vector{Complex{T}}, kargs...) where {T}

baseArrayType = Base.typename(S).wrapper # https://github.com/JuliaLang/julia/issues/35543
plan = plan_nfft(baseArrayType, tr, shape, m=kernelSize, σ=oversamplingFactor, precompute=NFFT.TENSOR,
fftflags=FFTW.ESTIMATE, blocking=true)
plan = plan_nfft(baseArrayType, tr, shape, m=kernelSize, σ=oversamplingFactor,
fftflags=FFTW.ESTIMATE, blocking=true, kargs...)

return NFFTOpImpl{eltype(S), S, typeof(plan)}(size(tr,2), prod(shape), false, false
, (res,x) -> produ!(res,plan,x)
Expand Down
Loading