Skip to content

MRI: Nonlinear spatial encoding magnetic fields

Fa-Hsuan Lin edited this page Aug 20, 2023 · 6 revisions

Here are routines to reconstruct MR images using an iterative solver. The purpose is to reconstruct images based on data encoded by either spatially linear or nonlinear gradient fields, including PatLoc or O-space imaging.

Definitions

Note: Please refer to the page for the range for k-space coordinates and the strength of spatial encoding magnetic fields (gradients).

MRI reconstruction: MRI by nonlinear spatial encoding magnetic fields

PatLoc

This code simulated the MRI acquisition and reconstruction using a PatLoc spatial encoding magnetic (SEM) fields.

Data:

The SEM's were specified here.

        load('patloc_8ch.mat');
        b1_z=squeeze(b1_z(:,:,3,:));;

        ......

        for i=1:8
            bz_tmp=imresize(b1_z(:,:,i),matrix{1},'bilinear');
            Bz(:,:,i)=bz_tmp;
        end;
        bz=Bz;
        %patloc SEMs
        for i=1:8
            b(:,i)=reshape(bz(:,:,i),[size(bz,1)*size(bz,2),1]);
        end;
        [v,s,u]=svd(b,0);
        for g_idx=1:8
            gg=zeros(size(bz,1),size(bz,2));
            for i=1:8
                gg=gg+u(i,g_idx).*bz(:,:,i);
            end;
            G_general(:,:,g_idx)=reshape(fmri_scale(gg(:),ceil(n_freq/2)-1,-floor(n_freq/2),mask_circle(:)),[matrix{m_idx}(1) matrix{m_idx}(2)]);
        end;
        G_general=G_general(:,:,[4:5]);

Two sets of SEMs are shown here.

Here is the result of the reconstructed image over iterations. The center of the field of view has rather blurred reconstruction. This is because the SEMs around the center of the FOV are smooth and they don't have sufficiently independent information to reconstruct image voxels from the encoded data.

Specifying the acceleration rate to be 2x2 down-samples the k-space data along at two dimensions by 2.

R={
    [2 2],
    };

Here is the result of the reconstructed image over iterations.

We can also evaluate the efficiency of spatial encoding by calculating the 'local k-space', which is the plot of a k-space sampling at different image voxels.

            %local k-space calculation/plot
            localk=itdr4_core_ktraj_localk('n_freq',matrix{m_idx}(2),'n_phase',matrix{m_idx}(1),'flag_display',1,'K_general',K_general,'G_general',G_general);
            etc_plot_localk(localk);

The lack of spatial encoding around the FOV center is clearly illustrated by the limited coverage of the k-space for those image voxels.

The accelerated (2x2) acquisition leads to more sparse k-space coverage at image voxels around the FOV periphery.

O-space

This code simulated the MRI acquisition and reconstruction of O-space imaging, where three spatial encoding magnetic (SEM) fields were used. They included two (almost) linear SEMs like typical x- and y-gradient fields, and a SEM whose iso-intensity contours are concentric circles.

Three SEM's were specified here.

        load('patloc_8ch.mat');
        b1_z=squeeze(b1_z(:,:,3,:));;

        ......

        for i=1:8
            bz_tmp=imresize(b1_z(:,:,i),matrix{1},'bilinear');
            Bz(:,:,i)=bz_tmp;
        end;
        bz=Bz;
        %patloc SEMs
        for i=1:8
            b(:,i)=reshape(bz(:,:,i),[size(bz,1)*size(bz,2),1]);
        end;
        [v,s,u]=svd(b,0);
        for g_idx=1:8
            gg=zeros(size(bz,1),size(bz,2));
            for i=1:8
                gg=gg+u(i,g_idx).*bz(:,:,i);
            end;
            G_general(:,:,g_idx)=reshape(fmri_scale(gg(:),ceil(n_freq/2)-1,-floor(n_freq/2),mask_circle(:)),[matrix{m_idx}(1) matrix{m_idx}(2)]);
        end;
        G_general=G_general(:,:,[1:3]);

Compared to PatLoc, O-space imaging in this simulation simply uses the first three "modes" in the Singular Value Decomposition of an 8-channel SEM array to generate the (almost) x-, y-, and o-SEMs.

Three SEMs are shown here.

NOTE In O-space imaging, you have three SEMs to encode a two-dimensional image. Therefore the k-space is 3D. We use kx, ky, and ko to represents three dimenions in the k-space.

In this example, k-space samples were arbitrarily taken by skipping one sample in each k-space dimension. Therefore an image of 128x128 pixels is encoded by (128x128x3/2/2/2) k-space samples. This is equivalent to 8/3-fold "acceleration".

Three SEMs were scaled to satisfy Nyquist sampling. And the range of the k-space was scaled between [-1 1).

Here is the result of the reconstructed image over iterations. Like PatLoc, the center of the field of view has rather blurred reconstruction. This is because the SEMs around the center of the FOV are smooth and they don't have sufficiently independent information to reconstruct image voxels from the encoded data.

The lack of spatial encoding around the FOV center is clearly illustrated by the limited coverage of the k-space for those image voxels.

Clone this wiki locally