Open evaalonsoortiz opened 4 years ago
@evaalonsoortiz the link to the data brings me here: https://github.com/shimming-toolbox/data-testing/tree/realtime_zshimming_data
correct link: https://github.com/shimming-toolbox/data-testing/tree/master/realtime_zshimming_data
trying to reproduce this issue, running into another error:
Version of shimming-toolbox: 9081cdac6701d7df74c5db109c205655be10d54e Version of testing-data: a7e82fb0dba6e05aa5b6050ad9432ddab9cb9e38
>> realtime_zshim('phantom')
~~~~~~~~~~ realtime_zshim ~~~~~~~~~~
Current date and time: 18-Aug-2020 22:11:27
Currently analyzing: realtime_zshimming_data
(ADD SLASH AT THE END!) Field map mag path: "15_gre_field_mapping_PMUlog_2/"
Field map phase path: "16_gre_field_mapping_PMUlog_2/"
MGRE mag path: "17_gre_realtime_zshim_UNSHIMMED_2/"
Error using dir
Name must be a string scalar or character vector.
Error in MaRdI.findimages (line 2357)
ListSubdirs = dir( [ imgDir 'echo*'] );
Error in MaRdI (line 108)
imgList = MaRdI.findimages( imgDir ) ;
Error in realtime_zshim (line 106)
Mag = MaRdI(MGRE_mag_path);
@evaalonsoortiz could you please provide more information so i can reproduce this issue? notably: what data and code versions, what exact syntax you typed, etc.
@evaalonsoortiz the link to the data brings me here: https://github.com/shimming-toolbox/data-testing/tree/realtime_zshimming_data
correct link: https://github.com/shimming-toolbox/data-testing/tree/master/realtime_zshimming_data
link updated
@evaalonsoortiz could you please provide more information so i can reproduce this issue? notably: what data and code versions, what exact syntax you typed, etc.
The paths need to be entered with single quotations around them:'15_gre_field_mapping_PMUlog_2/'
I am using the latest commit to master. Can you tell me how you obtain the version number, like you shared above?
I am using the latest commit to master. Can you tell me how you obtain the version number, like you shared above?
cd into the git repository and type:
git log
or a more fancy look at the history:
git log --pretty=oneline --decorate --all --graph
I made these useful aliases in my bash_profile:
alias gs="git status -s"
alias gc="git commit -S -a"
alias gp="git push"
alias gl="git log --pretty=oneline"
alias glg="git log --pretty=oneline --decorate --all --graph"
alias gd="git diff"
alias gb="git branch"
after using the single quotes as suggested in https://github.com/shimming-toolbox/shimming-toolbox/issues/161#issuecomment-675814633, i ran into the following issue (still a different error message than the one reported in https://github.com/shimming-toolbox/shimming-toolbox/issues/161#issue-680540896):
@evaalonsoortiz did you go that far in the processing or does your error appear afterwards?
@jcohenadad I believe you are getting that error because we only kept 10 field mapping volumes, whereas the original acquisition had 60 (and the dicom header states that there are 60 volumes). Perhaps we should go back to the example data and keep the 60 volumes.
just checked, that ^ is why. the MaRdI
constructor uses the number of repetitions/measurements to initialize the object, so you end up with a bunch of empty images if they're they're claimed in the header but the files are missing. Unfortunately the class design relies entirely on the validity of the header so idk how easy it would be to fix. Can at least add a check + error message.
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#L310Instead 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:
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.