Please help: Error related to 'Realign: Estimate & Reslice'

Submitted by Floating on

Dear Expert,

While I  was running DPARSF, I ran into this error:

Starting parallel pool (parpool) using the 'local' profile ... Warning: Found 2 pre-existing communicating job(s) created by pool that are running. You can use 'delete(myCluster.Jobs)' to remove all jobs
created with profile local. To create 'myCluster' use 'myCluster = parcluster('local')'. 
connected to 2 workers.
Realign Setup:10111 OK
Realign Setup:20312 OK
Warning: Run spm_jobman('initcfg'); beforehand
> In spm_jobman at 107
  In DPARSFA_run>(parfor body) at 756
  In parallel_function>make_general_channel/channel_general at 927
  In remoteParallelFunction at 38 
 
 
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Warning: Run spm_jobman('initcfg'); beforehand
> In spm_jobman at 107
  In DPARSFA_run>(parfor body) at 756
  In parallel_function>make_general_channel/channel_general at 927
  In remoteParallelFunction at 38 
 
 
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Running 'Realign: Estimate & Reslice'
Failed  'Realign: Estimate & Reslice'
Attempted to access V.dim(4); index out of bounds because numel(V.dim)=3.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_write_vol.m" (???), function "spm_write_vol" at line 22.
In file "C:\Users\zlin\Documents\MATLAB\spm8\spm_reslice.m" (v4179), function "reslice_images" at line 230.
In file "C:\Users\zlin\Documents\MATLAB\spm8\spm_reslice.m" (v4179), function "spm_reslice" at line 122.
In file "C:\Users\zlin\Documents\MATLAB\spm8\config\spm_run_realign_estwrite.m" (v4152), function "spm_run_realign_estwrite" at line 39.
 
The following modules did not run:
Failed: Realign: Estimate & Reslice
 
Error using cfg_util (line 835)
Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the
exact #job as displayed in this error message)
------------------
Running job #1
------------------
 
 
Error in spm_jobman (line 217)
 
 
 
Error in DPARSFA_run>(parfor body) (line 756)
 
 
 
Error in DPARSFA_run (line 715)
    parfor i=1:AutoDataProcessParameter.SubjectNum
 
Error in DPARSF_run (line 95)
[Error] = DPARSFA_run(Cfg);
 
Error in DPARSF>pushbuttonRun_Callback (line 1117)
    [Error]=DPARSF_run(handles.Cfg);
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSF (line 50)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback

 

I used the exact procedure as before but for some reasons it didn't work this time.  Any help or suggestion would be greatly appreciated!  My matlab version is matlab2014a, using DPARSF 3.1, SPM8.

Thank you very much,

Floating

 

YAN Chao-Gan

Sat, 06/04/2016 - 09:20

Hi Floating,
Seems there is something wrong with your data. Are you using 4D NifTI data? Please make sure the data is correct.

Best,

Chao-Gan

On Sat, Jun 4, 2016 at 4:51 PM, The R-fMRI Network <rfmri.org@gmail.com> wrote:
[To post a comment, please reply to rfmri.org@gmail.com ABOVE this line]

By Ziyong Lin (Floating)

Dear Expert,

While I  was running DPARSF, I ran into this error:

Starting parallel pool (parpool) using the 'local' profile ... Warning: Found 2 pre-existing communicating job(s) created by pool that are running. You can use 'delete(myCluster.Jobs)' to remove all jobs
created with profile local. To create 'myCluster' use 'myCluster = parcluster('local')'. 
connected to 2 workers.
Realign Setup:10111 OK
Realign Setup:20312 OK
Warning: Run spm_jobman('initcfg'); beforehand
> In spm_jobman at 107
  In DPARSFA_run>(parfor body) at 756
  In parallel_function>make_general_channel/channel_general at 927
  In remoteParallelFunction at 38 
 
 
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Warning: Run spm_jobman('initcfg'); beforehand
> In spm_jobman at 107
  In DPARSFA_run>(parfor body) at 756
  In parallel_function>make_general_channel/channel_general at 927
  In remoteParallelFunction at 38 
 
 
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Running 'Realign: Estimate & Reslice'
Failed  'Realign: Estimate & Reslice'
Attempted to access V.dim(4); index out of bounds because numel(V.dim)=3.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_write_vol.m" (???), function "spm_write_vol" at line 22.
In file "C:\Users\zlin\Documents\MATLAB\spm8\spm_reslice.m" (v4179), function "reslice_images" at line 230.
In file "C:\Users\zlin\Documents\MATLAB\spm8\spm_reslice.m" (v4179), function "spm_reslice" at line 122.
In file "C:\Users\zlin\Documents\MATLAB\spm8\config\spm_run_realign_estwrite.m" (v4152), function "spm_run_realign_estwrite" at line 39.
 
The following modules did not run:
Failed: Realign: Estimate & Reslice
 
Error using cfg_util (line 835)
Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the
exact #job as displayed in this error message)
------------------
Running job #1
------------------
 
 
Error in spm_jobman (line 217)
 
 
 
Error in DPARSFA_run>(parfor body) (line 756)
 
 
 
Error in DPARSFA_run (line 715)
    parfor i=1:AutoDataProcessParameter.SubjectNum
 
Error in DPARSF_run (line 95)
[Error] = DPARSFA_run(Cfg);
 
Error in DPARSF>pushbuttonRun_Callback (line 1117)
    [Error]=DPARSF_run(handles.Cfg);
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSF (line 50)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback

 

I used the exact procedure as before but for some reasons it didn't work this time.  Any help or suggestion would be greatly appreciated!  My matlab version is matlab2014a, using DPARSF 3.1, SPM8.

Thank you very much,

Floating

 


Online version of this post: http://rfmri.org/content/please-help-error-related-realign-estimate-reslice


Many a little makes a mickle -- your kind contributions shall make our efforts not perish from the earth. Please help The R-fMRI Network at http://rfmri.org/#overlay=HelpUs
To manage subscriptions, please visit: http://rnet.co/mailman/listinfo/rfmri.org_rnet.co
Mail comment ID: http://rfmri.org/mailcomment/redirect/%3C31.2319.0.1465030293.735910a5a3153f419326524b40632756%40www.rfmri.org%3E



--
Chao-Gan YAN, Ph.D.
Principal Investigator
Deputy Director, MRI Research Center
Institute of Psychology, Chinese Academy of Sciences
16 Lincui Road, Chaoyang District, Beijing 100101, China
-

Thank you so much for your quick reply!  I am extremely grateful.

The data format is img and hdr.  I have used the same data before...  When I did slice timing, there was another error:

 

connected to 2 workers.
Removing First 5 Time Points: 10143 OKRemoving First 5 Time Points: 10151 OKRemoving First 5 Time Points: 10152 OK
Removing First 5 Time Points: 10141 OKRemoving First 5 Time Points: 10142 OKRemoving First 5 Time Points: 10153 OK
 
Slice Timing Setup:10143 OK
Warning: Run spm_jobman('initcfg'); beforehand
> In spm_jobman at 107
  In DPARSFA_run>(parfor body) at 693
  In parallel_function>make_general_channel/channel_general at 927
  In remoteParallelFunction at 38 
 
 
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Slice Timing Setup:10141 OK
Warning: Run spm_jobman('initcfg'); beforehand
> In spm_jobman at 107
  In DPARSFA_run>(parfor body) at 693
  In parallel_function>make_general_channel/channel_general at 927
  In remoteParallelFunction at 38 
 
 
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Running 'Slice Timing'
 
SPM8: spm_slice_timing (v4310)                     05:20:59 - 04/06/2016
========================================================================
Your TR is 2.0
Running 'Slice Timing'
 
SPM8: spm_slice_timing (v4310)                     05:20:59 - 04/06/2016
========================================================================
Your TR is 2.0
Failed  'Slice Timing'
Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 0.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
.....
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm2\spm_create_image.m" (???), function "spm_create_image" at line 11.
In file "C:\Users\zlin\Documents\MATLAB\marsbar-0.44\spm99\spm_create_vol.m" (???), function "spm_create_vol" at line 7.
In file "C:\Users\zlin\Documents\MATLAB\spm8\spm_slice_timing.m" (v4310), function "spm_slice_timing" at line 196.
In file "C:\Users\zlin\Documents\MATLAB\spm8\config\spm_run_st.m" (v2312), function "spm_run_st" at line 25.
 
The following modules did not run:
Failed: Slice Timing
 
Error using cfg_util (line 835)
Job execution failed. The full log of this run can be found in
MATLAB command window, starting with the lines (look for the line
showing the exact #job as displayed in this error message)
------------------
Running job #1
------------------
 
 
Error in spm_jobman (line 217)
 
 
 
Error in DPARSFA_run>(parfor body) (line 693)
 
 
 
Error in DPARSFA_run (line 593)
        parfor i=1:AutoDataProcessParameter.SubjectNum
 
Error in DPARSF_run (line 95)
[Error] = DPARSFA_run(Cfg);
 
Error in DPARSF>pushbuttonRun_Callback (line 1117)
    [Error]=DPARSF_run(handles.Cfg);
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSF (line 50)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback

 

Does that give any more information about the error?

 

Thanks again!

Dear Dr. Yan,

It turns out that once I removed the pathways appeard in the errors and re-run the analysis.  It worked.  However, I ran into another error following No co*T1 Image.. Below is the error message:

Apply Reorient Mats to functional images for 10141: OK
Bet begin...
Chris Rorden's dcm2nii :: 1 April 2010 
reading preferences file C:\Users\zlin\Documents\DPABI_V1.2_141101\DPARSF_V3.1_141101\dcm2nii\dcm2nii.ini 
Adjusting NIfTI/Analyze image D:\Analysis3\RealignParameter\10141\Bet_meanafPITCH101D_5123-0011-00006-000006-01BeforeBet.hdr 
Changing subformat of D:\Analysis3\RealignParameter\10141\Bet_meanafPITCH101D_5123-0011-00006-000006-01BeforeBet.hdr 
 
Image data-type is SHORTS 
Image min/max is -10 1775 
bas = -10, range = 1785 
Image voxel size: 3.000000 3.000000 3.600000 
Image dimensions: 72 72 36 
hist_min=0.000000 thresh2=1.000000 thresh=14.000000 thresh98=129.000000 hist_max=230.000000 
CofG (109.666983,99.307173,56.582538) mm 
RADIUS 78.867214 
MEDIANVAL 95.000000 
Pass 1, iteration 0 
Pass 1, iteration 50 
Pass 1, iteration 100 
Pass 1, iteration 150 
Pass 1, iteration 200 
Pass 1, iteration 250 
Pass 1, iteration 300 
Pass 1, iteration 350 
Pass 1, iteration 400 
Pass 1, iteration 450 
Pass 1, iteration 500 
Pass 1, iteration 550 
Pass 1, iteration 600 
Pass 1, iteration 650 
Pass 1, iteration 700 
Pass 1, iteration 750 
Pass 1, iteration 800 
Pass 1, iteration 850 
Pass 1, iteration 900 
Pass 1, iteration 950 
self-intersection total = 223.709236 (threshold=4000.000000) 
3.610379 secs 
 
0.019409 for pre-processing 
0.571393 for normal computation 
2.442929 for search along normal 
0.231916 for checking self-intersection 
0.092610 for output 
Chris Rorden's dcm2nii :: 1 April 2010 
reading preferences file C:\Users\zlin\Documents\DPABI_V1.2_141101\DPARSF_V3.1_141101\dcm2nii\dcm2nii.ini 
Adjusting NIfTI/Analyze image D:\Analysis3\T1ImgBet\10141\Bet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.hdr 
Changing subformat of D:\Analysis3\T1ImgBet\10141\Bet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.hdr 
Not enough data in D:\Analysis3\T1ImgBet\10141\fBet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.img 
Actually read 0 
Error using y_Read (line 54)
File doesn't exist:
D:\Analysis3\T1ImgBet\10141\Bet_sPITCH101D_5123-0003-00001-000192-01AfterBet.img
 
Error in y_Call_bet (line 46)
    Data = y_Read(fullfile(OutPath,[OutFile,'AfterBet.img']));
 
Error in DPARSFA_run>(parfor body) (line 1400)
            y_Call_bet(T1File, OutputFile_Temp, '');
 
Error in DPARSFA_run (line 1372)
        parfor i=1:AutoDataProcessParameter.SubjectNum
 
Error in DPARSF_run (line 95)
[Error] = DPARSFA_run(Cfg);
 
Error in DPARSF>pushbuttonRun_Callback (line 1117)
    [Error]=DPARSF_run(handles.Cfg);
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSF (line 50)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback
 

It seems like it tries to recall a file but it doesn't exist? 

Sorry for asking multiple questions within a post.

Thank you very much again for all your help!

Best,

Floating

 

You can open fBet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.img
Is it all zeros?

Best,

Chao-Gan

On Sat, Jun 4, 2016 at 5:58 PM, The R-fMRI Network <rfmri.org@gmail.com> wrote:
[To post a comment, please reply to rfmri.org@gmail.com ABOVE this line]

Commented by Ziyong Lin (Floating)

Dear Dr. Yan,

It turns out that once I removed the pathways appeard in the errors and re-run the analysis.  It worked.  However, I ran into another error following No co*T1 Image.. Below is the error message:

Apply Reorient Mats to functional images for 10141: OK
Bet begin...
Chris Rorden's dcm2nii :: 1 April 2010 
reading preferences file C:\Users\zlin\Documents\DPABI_V1.2_141101\DPARSF_V3.1_141101\dcm2nii\dcm2nii.ini 
Adjusting NIfTI/Analyze image D:\Analysis3\RealignParameter\10141\Bet_meanafPITCH101D_5123-0011-00006-000006-01BeforeBet.hdr 
Changing subformat of D:\Analysis3\RealignParameter\10141\Bet_meanafPITCH101D_5123-0011-00006-000006-01BeforeBet.hdr 
 
Image data-type is SHORTS 
Image min/max is -10 1775 
bas = -10, range = 1785 
Image voxel size: 3.000000 3.000000 3.600000 
Image dimensions: 72 72 36 
hist_min=0.000000 thresh2=1.000000 thresh=14.000000 thresh98=129.000000 hist_max=230.000000 
CofG (109.666983,99.307173,56.582538) mm 
RADIUS 78.867214 
MEDIANVAL 95.000000 
Pass 1, iteration 0 
Pass 1, iteration 50 
Pass 1, iteration 100 
Pass 1, iteration 150 
Pass 1, iteration 200 
Pass 1, iteration 250 
Pass 1, iteration 300 
Pass 1, iteration 350 
Pass 1, iteration 400 
Pass 1, iteration 450 
Pass 1, iteration 500 
Pass 1, iteration 550 
Pass 1, iteration 600 
Pass 1, iteration 650 
Pass 1, iteration 700 
Pass 1, iteration 750 
Pass 1, iteration 800 
Pass 1, iteration 850 
Pass 1, iteration 900 
Pass 1, iteration 950 
self-intersection total = 223.709236 (threshold=4000.000000) 
3.610379 secs 
 
0.019409 for pre-processing 
0.571393 for normal computation 
2.442929 for search along normal 
0.231916 for checking self-intersection 
0.092610 for output 
Chris Rorden's dcm2nii :: 1 April 2010 
reading preferences file C:\Users\zlin\Documents\DPABI_V1.2_141101\DPARSF_V3.1_141101\dcm2nii\dcm2nii.ini 
Adjusting NIfTI/Analyze image D:\Analysis3\T1ImgBet\10141\Bet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.hdr 
Changing subformat of D:\Analysis3\T1ImgBet\10141\Bet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.hdr 
Not enough data in D:\Analysis3\T1ImgBet\10141\fBet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.img 
Actually read 0 
Error using y_Read (line 54)
File doesn't exist:
D:\Analysis3\T1ImgBet\10141\Bet_sPITCH101D_5123-0003-00001-000192-01AfterBet.img
 
Error in y_Call_bet (line 46)
    Data = y_Read(fullfile(OutPath,[OutFile,'AfterBet.img']));
 
Error in DPARSFA_run>(parfor body) (line 1400)
            y_Call_bet(T1File, OutputFile_Temp, '');
 
Error in DPARSFA_run (line 1372)
        parfor i=1:AutoDataProcessParameter.SubjectNum
 
Error in DPARSF_run (line 95)
[Error] = DPARSFA_run(Cfg);
 
Error in DPARSF>pushbuttonRun_Callback (line 1117)
    [Error]=DPARSF_run(handles.Cfg);
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSF (line 50)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback
 

It seems like it tries to recall a file but it doesn't exist? 

Sorry for asking multiple questions within a post.

Thank you very much again for all your help!

Best,

Floating

 


Online version of this post: http://rfmri.org/comment/4350#comment-4350


Many a little makes a mickle -- your kind contributions shall make our efforts not perish from the earth. Please help The R-fMRI Network at http://rfmri.org/#overlay=HelpUs
To manage subscriptions, please visit: http://rnet.co/mailman/listinfo/rfmri.org_rnet.co
Mail comment ID: http://rfmri.org/mailcomment/redirect/%3C31.2319.4350.1465034296.58f207f8a2cd357d6b5a16c59e801bc7%40www.rfmri.org%3E



--
Chao-Gan YAN, Ph.D.
Principal Investigator
Deputy Director, MRI Research Center
Institute of Psychology, Chinese Academy of Sciences
16 Lincui Road, Chaoyang District, Beijing 100101, China
-

Because the error states: "Changing subformat of D:\Analysis3\T1ImgBet\10141\Bet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.hdr 
Not enough data in D:\Analysis3\T1ImgBet\10141\fBet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.img 
Actually read 0 "
Probably change to another participant to have a test.

Best,

Chao-Gan

On Sun, Jun 5, 2016 at 7:50 AM, The R-fMRI Network <rfmri.org@gmail.com> wrote:
[To post a comment, please reply to rfmri.org@gmail.com ABOVE this line]

Commented by Ziyong Lin (Floating)

When I open fBet_sPITCH101D_5123-0003-00001-000192-01BeforeBet.img, it seems a normal T1 image.  How do I check if it is all zeros? 

Thank you very much!

Floating


Online version of this post: http://rfmri.org/comment/4352#comment-4352


Many a little makes a mickle -- your kind contributions shall make our efforts not perish from the earth. Please help The R-fMRI Network at http://rfmri.org/#overlay=HelpUs
To manage subscriptions, please visit: http://rnet.co/mailman/listinfo/rfmri.org_rnet.co
Mail comment ID: http://rfmri.org/mailcomment/redirect/%3C31.2319.4352.1465084232.10fb982cdf5441bb295f33c1d05a65b3%40www.rfmri.org%3E



--
Chao-Gan YAN, Ph.D.
Principal Investigator
Deputy Director, MRI Research Center
Institute of Psychology, Chinese Academy of Sciences
16 Lincui Road, Chaoyang District, Beijing 100101, China
-