Skip to content
This repository was archived by the owner on May 18, 2021. It is now read-only.
This repository was archived by the owner on May 18, 2021. It is now read-only.

Problem using "resliceimg"  #161

@evaalonsoortiz

Description

@evaalonsoortiz

The realtime_zshimming.m script uses a time series of B0 maps to compute the static and dynamic shim gradients that are needed for z-shimming. If z-shimming is going to be done with a gradient echo scan, then realtime_zshimming.m requires a sample magnitude gradient echo scan so that the static and dynamic shim gradient images can be resampled to the resolution of the gradient echo scan.

"realtime_zshim.m" calls resliceimg here:
https://github.com/shimming-toolbox/shimming-toolbox/blob/9081cdac6701d7df74c5db109c205655be10d54e/example/realtime_zshim.m#L310

Instead of doing realtime z-shimming with a gradient echo scan, I am attempting to do it with an EPI scan. This means that realtime_zshimming.m will use an EPI scan to resample the static and dynamic shim gradient maps to the resolution of EPI scan. When trying this, I run into the following error:

Index exceeds the number of array elements (68992).

Error in MaRdI/resliceimg (line 1342)
            [~,iNearest(iR)] = min( sqrt( ( X_Ip - X_Ep( iEp(iR) ) ).^2 + ...

Error in realtime_zshim (line 310)
GzField.resliceimg( X,Y,Z, mask ) ; % reslice static b0 image

There is sample data to test this out here. The realtime_zshim.m script can be called using realtime_zshim('phantom') in the folder containing the sample data. You will then be prompted to enter the paths of the B0 maps and the EPI (or GRE) images.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions