Online reconstruction of real-time MR images using spatiotemporally constrained reconstruction (online STCR)
Please download the fetal real-time raw k-space data and add to the main folder.
-
Download the Parallel Computing toolbox for MATLAB if not already available.
-
Clone the repository with the submodules
mirtandusc_dynamic_reconstructionby typing into your terminalgit clone --recurse-submodules https://github.com/usc-mrel/onlineSTCRThis will automatically add folders
mirtandusc_dynamic_reconstructionin your main path. -
Make sure to put the downloaded fetal real-time raw-kspace data in your main path.
-
Set the relevant parameters and flags inside
usc_dynamic_reconstruction/recon_online_stcr.mincluding
Narms_full: Number of TRs binned for full sampling to estimate coil sensitivityNarms_recon: Desired temporal resolution (distance between frames)Narms_window: Numbers of TRs binned in 1 frameNarms_initial: Number of TRs binned for initial framelambdaTFD: Temporal regularization parameterlambdatTV: Spatial regularization parametermu: Penalty parameterstep_size_x: Step size of shrinkage operatorNmaxiter: Number of iterations per frame. Tune this so that the time to reconstruct 1 frame is less than acquisition time.print_cost: Choose wheter to print the components of the cost function for each frame (will increase runtime)accelerate_flag: Choose whether to apply Nesterov acceleration in FISTAtoeplitz_flag: Choose whether to use Toeplitz trick to reduce gridding and inverse-gridding time. -
Then run
main.m
Retrospective online STCR reconstruction returns real-time MR image in x, of shape [Nx x Ny x Nframes].
If print_cost = true, the cost of the online STCR optimization problem of each frame will be printed after every iteration.
The code is tested with MATLAB 2021a on a server equipped with 4x NVIDIA A100 GPU (40GB memory for each).