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

b0_dem model not working for 3D data #450

Open
mathieuboudreau opened this issue Sep 25, 2021 · 0 comments
Open

b0_dem model not working for 3D data #450

mathieuboudreau opened this issue Sep 25, 2021 · 0 comments
Labels

Comments

@mathieuboudreau
Copy link
Member

I encountered this error while helping an external user that had 3D data.

After downloading our demo data, I copied the singleton slice (in third dimension) so that it would now have two slices:

[a,b] = nii_load('Magn.nii.gz');
a(:,:,2,:) = a;
[c,d] = nii_load('Phase.nii.gz');
c(:,:,2,:) = c;

I then saved them, and loaded them into our GUI and tried to fit the data. This is the error that occurred.

Index in position 1 exceeds array bounds. Index must not
exceed 64.

Error in laplacianUnwrap (line 47)
            phaseWrappedNew(y2,x2,z2) = phaseWrapped(y1, x1, z1);

Error in b0_dem/fit (line 112)
                    Phase_uw(:,:,:,iEcho) = laplacianUnwrap(Phase(:,:,:,iEcho), Magn>obj.options.Magnthresh);

Error in FitData (line 260)
    Fit = Model.fit(data);

Error in qMRLab>FitGo_FitData (line 404)
FitResults = FitData(data,Model,1);

Error in qMRLab>FitGO_Callback (line 386)
FitGo_FitData(hObject, eventdata, handles);

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in qMRLab (line 41)
    gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)qMRLab('FitGO_Callback',hObject,eventdata,guidata(hObject))
 
Error while evaluating UIControl Callback.

I tried briefly understanding how this error happened, but am unable to figure it out as it is within an external tool that I did not write (laplacianUnwrap.m). It's making me question if this 3D functionality was fully tested before merging, as I don't think we've touched this file since then?

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

No branches or pull requests

1 participant