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

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.

Hi Lei,

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

Best,

Chao-Gan

OK, I will try to slove it next update.

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.

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.

Sorry, here is 4D(i1, T).*g1.
Best,
Sandy

Hi Lei and Sandy,

The current solution is put the expression as:

repmat(i1,[1,1,1,size(g1,4)]).*g1

Best,

Chao-Gan

Dear Prof. Dr. Yan and Dr. Wang,
Thank you very much for your help! I'll try and then report this solution. 
Best,
Yours truly,
Lei Gao.
 

Dear Dr. Wang,
Thank you very much for your help! I'll try and then report this solution. 
Best,
Yours truly,
Lei Gao.