Error report in DPABI-Image Calculator-“i1.*g1”

Submitted by Lei.Gao on

Dear Prof. Dr. Yan,

I'd be grateful if you could take time to help me. When I mask a group of images (*.nii format) with a binary individual mask (*.nii format) in DPABI → Utilities → Image Calculator (both DPABI_V2.0_151201 and DPABI_V1.3_150710 version), the following error is displayed:

------------------------------------------------------------------------

Error message:

------------------------------------------------------------------------

Reading images from "F:\aa\bbbb.nii" etc.

i1: F:\aa\cc.nii

Error using DPABI_CALCULATOR_TOOL>ComputeButton_Callback (line 345)

Expression Error

Error in gui_mainfcn (line 96)

        feval(varargin{:});

Error in DPABI_CALCULATOR_TOOL (line 42)

    gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)DPABI_CALCULATOR_TOOL('ComputeButton_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating uicontrol Callback

------------------------------------------------------------------------

 

However, this calculation can be carried out without any problems in the REST_V1.8_130615. I would appreciate any of your help.

Yours sincerely,

Lei Gao.

YAN Chao-Gan

Mon, 12/07/2015 - 10:14

Hi Lei,

Thanks for your report! This is a bug. @Sandy ;)

Best,

Chao-Gan

sandywang

Mon, 12/07/2015 - 12:00

In reply to by YAN Chao-Gan

Hi Chao-gan, when I coded this calculator module, I considered one thing that i1.*g1 should not be exectly correct in a expression, so I used "4D" keyword to execute matlab's "repmat" command, so 4D(i1, 100).*g1 should work fine. However, for the previous usage in REST, it should be inferited, too. What is your advice for this issue? Claim the "4D" keyword will be good in turorials. Best, Sandy

sandywang

Mon, 12/07/2015 - 12:00

Hi Lei, Also, I have another expression to do this staff. You could use "4D(g1, T).*i1" to do the same thing in Calculator. Where T is the number of time point in g1. Best, Sandy