Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog afi #14 #16

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

Blog afi #14 #16

wants to merge 36 commits into from

Conversation

mathieuboudreau
Copy link
Member

Continuation of the PR from #14

jvelazquez-reyes and others added 3 commits September 8, 2020 22:33
* Add notebook template

* Add AFI notebook and modify Dockerfile

* gti clone changes

* git clone branches

* Update sos's

* Add matplotlib

* Change git checkout commit number

* Fixes to figures
@mathieuboudreau
Copy link
Member Author

@jvelazquez-reyes I think I found the source of the bug in your notebook where it says it can't find afi_b1.

I think it's not the class that it can't find, but a property of another help tool that we've developed.

Here's the error:

loading struct
loading io
loading statistics
loading optim
loading image
warning: load: '/home/jovyan/work/t1_notebooks/qMRLab/docs/iqmr_gethelp.mat' found by searching load path
warning: called from
    qMRinfo at line 15 column 8
    get_MRIinputs_optional at line 130 column 20
    sanityCheck at line 73 column 27
    FitData at line 37 column 1
error: structure has no member 'b1_afi'
error: called from
    qMRinfo at line 17 column 21
    get_MRIinputs_optional at line 130 column 20
    sanityCheck at line 73 column 27
    FitData at line 37 column 1

In short, I think you haven't completed all the steps to create a new qMRLab model (https://github.com/qMRLab/qMRLab/wiki/Guideline:-Adding-a-new-Model) - see point 11 from that link.

@agahkarakuzu can provide more guidance on how to complete a model if you have questions.

@mathieuboudreau
Copy link
Member Author

@jvelazquez-reyes In addition to Figure 8 that's not working yet because of the issue above, Figure 4 seems to be broken as well. It appears that you tried to implement two sliders in a figure, but does Plotly allow for that? Did you have it working on your end at one time?

@jvelazquez-reyes
Copy link
Collaborator

Hi @mathieuboudreau and @agahkarakuzu

I added the b1_afi module to the list on the qMRLab_static_Models.m file and it solved the error: structure has no member 'b1_afi'. Now I got the following error:

=============== qMRLab::Fit ======================
Operation has been started: b1_afi
error: 'medfilt3' undefined near line 108 column 28
error: called from
    medianFilt at line 108 column 26
    fit at line 74 column 39
    fit at line 88 column 37
    FitData at line 261 column 9

This is happening because in the inheritance to the FilterClass you changed the default to median in 126a14e. I was testing in Octave and the same is for the option gaussian. Apparently, neither imgaussfilt3 nor medfilt3 is supported in Octave (I'm using version 5.2. The options spline and polynomial are working well). Could this be the source of the bug?

I was testing step 7 (https://github.com/qMRLab/qMRLab/wiki/Guideline:-Adding-a-new-Model). qMRgenBatch(b1_afi) is working partially. The code lines the load the AFI data are missing. I think the source is the file genBatch.qmr (https://github.com/qMRLab/qMRLab/blob/update_2.5.0/src/Common/genBatch.qmr#L28-L33), and the problem is the command *-dataCommand-* in line 33. Any suggestion?

@mathieuboudreau
Copy link
Member Author

This is happening because in the inheritance to the FilterClass you changed the default to median in 126a14e. I was testing in Octave and the same is for the option gaussian. Apparently, neither imgaussfilt3 nor medfilt3 is supported in Octave (I'm using version 5.2. The options spline and polynomial are working well). Could this be the source of the bug?

Yup, my bad. Resolved in : qMRLab/qMRLab@b2494b6

@mathieuboudreau
Copy link
Member Author

I was testing step 7 (https://github.com/qMRLab/qMRLab/wiki/Guideline:-Adding-a-new-Model). qMRgenBatch(b1_afi) is working partially. The code lines the load the AFI data are missing. I think the source is the file genBatch.qmr (https://github.com/qMRLab/qMRLab/blob/update_2.5.0/src/Common/genBatch.qmr#L28-L33), and the problem is the command -dataCommand- in line 33. Any suggestion?

After scratching my head about this problem, I think I found the problem and resolved it. You set up the model as we instructed, and I compared it with another similar model (b1_dam) and they appeared to match. What I think was causing the problem was actually my fault; when I uploaded the AFI data to OSF, I uploaded the images ass *.nii files and not the gzipped versions *.nii.gz, and it appears that the genbatch looks for that pattern specifically for nifti files. I've gzipped the AFI images and reuploaded them to OSF, and it appears to have resolved the issue on my end. @jvelazquez-reyes please test it on your end and confirm.

@jvelazquez-reyes
Copy link
Collaborator

Hi @mathieuboudreau

Yes, uploading the images as *.nii.gz resolved the issue. I tested genbatch on my end and I confirm that now it's running well.

Also, Figure 8 of the notebook is ok once the Polynomial (in FilterClass) was reverted to be the default option.

@mathieuboudreau
Copy link
Member Author

@jvelazquez-reyes we never did publish this blog post, correct? Would you like to revisit this and complete it so that we may have an additional blog post?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants