help > RE: Error when reading slice times from BIDS json during prerocessing
Apr 29, 2025  06:04 AM | Dmitry Sinitsyn
RE: Error when reading slice times from BIDS json during prerocessing

Hi Alfonso,


In my last reply, I did not press the button 'quote and reply'. I thought this may have caused you not to be notified about the message. If so, please see my previous post.


Thanks


Dmitry


 


Originally posted by Alfonso Nieto-Castanon:



Hi Dmitry,


That is strange indeed, could you please attach your .json file to help replicate this issue?


Thanks


Alfonso


Originally posted by Dmitry Sinitsyn:



Hello everyone,

In the GUI of CONN 22v2407, I imported images from DICOM and tried to run the default prerocessing pipeline, selecting the option to read slice times from the BIDS json file. This file was successfully created upon import and contained the relevant field:

  "SliceTiming": [

  1.11,

  0,

  0.74,

  0.0925,

  0.8325,

. . .

During prerocessing, the following error occured:

Undefined function 'mtimes' for input arguments of type 'cell'.

Error in conn_setup_preproc (line 2618)

 else sliceorder=1000*reshape(str,1,[]); % (ms)

I tried to debug this, and in the file conn_setup_preproc.m made a break point at line 2602:

str=conn_jsonread(matlabbatch{end}.spm.temporal.st.scans{1}{1},'SliceTiming');

The resulting variable was a cell array:

K>> str

str =

  64×1 cell array

    {[1.1100]}

    {[     0]}

    {[0.7400]}

    {[0.0925]}

    {[0.8325]}

. . .

This caused the above-mentioned error in line 2618 with code:

else sliceorder=1000*reshape(str,1,[]); % (ms)

I suppose this line expects str to be a numerical array, not a cell array. So my guess is that there is a bug in function conn_jsonread.

Can anyone confirm this or explain what I may be doing wrong?

Best,

Dmitry


 



 

Threaded View

TitleAuthorDate
Dmitry Sinitsyn Apr 21, 2025
Alfonso Nieto-Castanon Apr 21, 2025
RE: Error when reading slice times from BIDS json during prerocessing
Dmitry Sinitsyn Apr 29, 2025
Dmitry Sinitsyn Apr 22, 2025