rest_Fix_Read_Write_Error

Submitted by djo155 on
Hi again, Switched to DPARSFA and have my detrended native space images in subject folders in /FunRaw/FunImgNormalizedSmoothedDetrendedFiltered. Running DPARSF_V2.1_120101 and REST_V1.7_120101 on Matlab R2011b with SPM8. Here is the initial error: Computing ALFF with: "/Volumes/EtkinLab_Data/Imaging/ctr_gad_mdd_cmd_pts/resting_state/D.Oathes/Temp/FunRaw/FunImgNormalizedSmoothedDetrendedFiltered/gad_c029" Read 3D EPI functional images: "/Volumes/EtkinLab_Data/Imaging/ctr_gad_mdd_cmd_pts/resting_state/D.Oathes/Temp/FunRaw/FunImgNormalizedSmoothedDetrendedFiltered/gad_c029"............................................... Load mask "". Build ALFF filtered mask. Wait... ALFF computing. Wait................... ReConstructing 3D Dataset ALFF. Wait................... Saving ALFF map. Wait... ALFF compution over, elapsed time: 29.02 seconds. Error using rest_Fix_Read_Write_Error (line 64) Meet error while fixing read write error. Please restart MATLAB, and run "rest_Fix_Read_Write_Error" before starting anything. Error in rest_WriteNiftiImage (line 91) rest_Fix_Read_Write_Error; %YAN Chao-Gan, 100426. Error in DPARSFA_run (line 1579) rest_WriteNiftiImage(Data,Head,[AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},'Results',filesep,'ALFF',filesep,'mALFF-1_Map_',AutoDataProcessParamet Error in DPARSFA>pushbuttonRun_Callback (line 1133) [Error]=DPARSFA_run(handles.Cfg); Error in gui_mainfcn (line 96) feval(varargin{:}); Error in DPARSFA (line 31) gui_mainfcn(gui_State, varargin{:}); Error while evaluating uicontrol Callback ======================================== I restarted Matlab, then punched in this with the following error: >> rest_Fix_Read_Write_Error Error using rest_Fix_Read_Write_Error (line 64) Meet error while fixing read write error. Please restart MATLAB, and run "rest_Fix_Read_Write_Error" before starting anything. ========================================= Thank you, in advance, for any tips. Desmond

YAN Chao-Gan

Tue, 09/18/2012 - 16:57

1. The disk is not full, and it's not unconnected during data processing, right? 2. What's the release of your SPM8? type in [SPMversion,c]=spm('Ver') and you will get it.

djo155

Tue, 09/18/2012 - 19:11

In reply to by YAN Chao-Gan

re 1., Disk is not full and is connected. To be sure, I moved the data from the server where I was running it to my local drive and tried again. The error is the same. re 2., c=4010 On my local drive, was able to get "rest_Fix_Read_Write_Error" to run without errors but it didn't fix the initial problem. Thank you, Desmond

Hi, this seems weird. Could have a test on reading and writing? 1. Please cd to a directory where you have a test image (.img or .nii) named XXX.nii. 2. [Data Head]=rest_ReadNiftiImage('XXX.nii'); 3. rest_WriteNiftiImage(Data,Head,'TestWrite.nii');

djo155

Tue, 09/18/2012 - 21:14

In reply to by YAN Chao-Gan

Trying to follow your instructions, though my data are in Analyze format so I tried two variations: In Analyze format- >> [Data Head]=rest_ReadAnalyzeImage('vol0000'); >> rest_WriteAnalyzeImage(Data,Head, 'TestWrite'); Error using rest_WriteAnalyzeImage (line 28) Not enough input arguments. ======== Guessing that I might not know the proper syntax for that write command in Analyze format, I used fslchfiletype to convert one of my hdr/img pairs to NIFTI and tried the following: >> [Data Head]=rest_ReadNiftiImage('vol0000.nii'); >> rest_WriteNiftiImage(Data,Head, 'TestWrite.nii'); The image is written, no problem. Still would like to keep my data in Analyze format, if possible, but if the only way to use the toolbox is to convert them all to NIFTI, I can of course do that. Thank you for the help, Desmond

The problem is caused by writing the mALFF - 1 images. The ALFF and mALFF were already generated. If you want to keep in Analyze format, you can just comment Line 1579. mALFF - 1 image are no longer needed as AFNI and REST one-sample t-test could compare to 1. Or comment Line 1578 may also address the problem in ANALYZE format.
Forums