From f5511abb66558f147a8c029b9f1d1f54fcfdfbcf Mon Sep 17 00:00:00 2001 From: aTrotier Date: Wed, 11 Dec 2024 14:05:49 +0100 Subject: [PATCH 1/2] floop along contrast in MultiCoil reco --- src/Reconstruction/IterativeReconstruction.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Reconstruction/IterativeReconstruction.jl b/src/Reconstruction/IterativeReconstruction.jl index 1903c964..ff5e4713 100644 --- a/src/Reconstruction/IterativeReconstruction.jl +++ b/src/Reconstruction/IterativeReconstruction.jl @@ -208,14 +208,13 @@ function reconstruction_multiCoil(acqData::AcquisitionData{T} # solve optimization problem Ireco = zeros(Complex{T}, prod(reconSize), numSl, numContr, numRep) let reg = reg # Fix @floop warning due to conditional/multiple assignment to reg - @floop executor(arrayType) for l = 1:numRep, k = 1:numSl + @floop executor(arrayType) for l = 1:numRep, k = 1:numSl, j = 1:numContr if encodingOps != nothing E = encodingOps[:,k] else E = encodingOps_parallel(acqData, reconSize, senseMapsUnCorr; slice=k, encParams...) end - for j = 1:numContr W = WeightingOp(Complex{T}; weights=weights[j], rep=numChan) kdata = arrayType((multiCoilData(acqData, j, k, rep=l))) .* repeat(weights[j], numChan) if !isnothing(L_inv) From 3d3d7354a586e21acebce9b3bc1d2882fc6c8d67 Mon Sep 17 00:00:00 2001 From: aTrotier Date: Wed, 11 Dec 2024 15:14:39 +0100 Subject: [PATCH 2/2] fix remaining end --- src/Reconstruction/IterativeReconstruction.jl | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Reconstruction/IterativeReconstruction.jl b/src/Reconstruction/IterativeReconstruction.jl index ff5e4713..ffb047d5 100644 --- a/src/Reconstruction/IterativeReconstruction.jl +++ b/src/Reconstruction/IterativeReconstruction.jl @@ -215,22 +215,21 @@ function reconstruction_multiCoil(acqData::AcquisitionData{T} E = encodingOps_parallel(acqData, reconSize, senseMapsUnCorr; slice=k, encParams...) end - W = WeightingOp(Complex{T}; weights=weights[j], rep=numChan) - kdata = arrayType((multiCoilData(acqData, j, k, rep=l))) .* repeat(weights[j], numChan) - if !isnothing(L_inv) - kdata = vec(reshape(kdata, :, numChan) * L_inv') - end + W = WeightingOp(Complex{T}; weights=weights[j], rep=numChan) + kdata = arrayType((multiCoilData(acqData, j, k, rep=l))) .* repeat(weights[j], numChan) + if !isnothing(L_inv) + kdata = vec(reshape(kdata, :, numChan) * L_inv') + end - EFull = ∘(W, E[j]) - EFullᴴEFull = normalOperator(EFull; normalOpParams(arrayType)...) - solv = createLinearSolver(solver, EFull; AHA=EFullᴴEFull, reg=reg, params...) - I = solve!(solv, kdata) + EFull = ∘(W, E[j]) + EFullᴴEFull = normalOperator(EFull; normalOpParams(arrayType)...) + solv = createLinearSolver(solver, EFull; AHA=EFullᴴEFull, reg=reg, params...) + I = solve!(solv, kdata) - if isCircular( trajectory(acqData, j) ) - circularShutter!(reshape(I, reconSize), 1.0) - end - Ireco[:,k,j,l] = Array(I) + if isCircular( trajectory(acqData, j) ) + circularShutter!(reshape(I, reconSize), 1.0) end + Ireco[:,k,j,l] = Array(I) end end Ireco_ = reshape(Ireco, volumeSize(reconSize, numSl)..., numContr, 1,numRep)