getting an error while using rest slice viewer ??

Error using sprintf Function is not defined for 'matlab.ui.Figure' inputs.
Error in rest_sliceviewer>InitControls (line 940) set(theFig, 'DeleteFcn', sprintf('rest_sliceviewer(''Delete'', %g);', theFig) );
Error in rest_sliceviewer (line 74) REST_SliceViewer_Cfg.Config(1+GetDisplayCount(REST_SliceViewer_Cfg)) =InitControls(AFilename, ACallback);
Error in rest_sliceviewer (line 38) rest_sliceviewer('ShowImage',''); %by Default, I show a black brain image
Error in rest (line 153) rest_sliceviewer,
Error using drawnow Error while evaluating UIControl Callback

답변 (1개)

Rik
Rik 2018년 1월 2일
편집: Rik 2018년 1월 2일

2 개 추천

Apparently rest slice viewer was made for HG1 releases (which have numerical handles), and so is not compatible with HG2 releases (R2014b and newer).
This specific instance can be fixed by explicitly loading the number (which might have been turned off)
set(theFig, 'DeleteFcn', sprintf('rest_sliceviewer(''Delete'', %g);', get(theFig,'Number')) );
Edit: this change will keep the code compatible with prior releases, although there may be many other things you will have to change.

댓글 수: 2

pra sa
pra sa 2018년 1월 2일
Thanks..but still it shows the same error
Rik
Rik 2018년 1월 2일
Really? Does it still say "Error using sprintf Function is not defined for 'matlab.ui.Figure' inputs." for this same line? I don't understand that, because it doesn't use the figure object as an argument for sprintf anymore. Have you close all instances of this function before retrying?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Neuroimaging에 대해 자세히 알아보기

질문:

2018년 1월 2일

댓글:

Rik
2018년 1월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by