Hello REST experts,
I have a question about arranging files for DPARSF. When reading the instructions for choosing the working directory, it says:
"If you start with NIFTI images (.hdr/.img pairs) before slice timing, you need to arrange each subject's fMRI NIFTI images in one directory"
I am assuming this means that each volume should have one 3D .img/.hdr pair associated with it. Therefore, if there are 150 volumes then each participant should have 150 .img/.hdr pairs. However, my images were in .nii.gz format, which is a 4D image that includes the volumes in one file. How can I convert .nii.gz to .img/.hdr and also separate it into different files for each volume?
I think this is what I need to do because when I convert the .nii.gz file to one .img/.hdr file, it says that there is only 1 volume.
Thank you
Submitted by YAN Chao-Gan on Fri, 03/16/2012 - 00:14 Permalink
Re
Hi!
Please download the latest DPARSF and use the advanced edition (type in DPARSFA).
Choose the Template Parameters in DPARSFA --- Standard Steps: Normalized by DARTEL (Start from .nii.gz files).
You will see the checkbox "4D Fun .nii(.gz) to 3D" is already checked. DPARSFA will do the conversion automatically for you.
Submitted by ahezghia on Fri, 03/16/2012 - 02:01 Permalink
Hello Thank you for the help.
Hello
Thank you for the help. I have tried the steps you have suggested and I receive this error message after I press Run:
Undefined function 'spm' for input arguments of type 'char'.
Error in DPARSFA_run (line 34)
[SPMversion,c]=spm('Ver');
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
Any idea what is going wrong?
Thank you once again
Submitted by YAN Chao-Gan on Fri, 03/16/2012 - 03:05 Permalink
Re
DPARSF is a spm plug-in.
Make sure you installed SPM8 (or 5) correctly in advance.
Submitted by ahezghia on Fri, 03/16/2012 - 03:33 Permalink
I have SPM 8 installed and it
I have SPM 8 installed and it works properly without error when I use it. Does DPARSF have to be put into the spm folder?
Thank you
Submitted by YAN Chao-Gan on Fri, 03/16/2012 - 04:02 Permalink
Re
No, doesn't have to.
If you set up SPM8 correctly, you will not get "Undefined function 'spm' for input arguments of type 'char'."
Submitted by ahezghia on Fri, 03/16/2012 - 04:37 Permalink
Is there a way to check if my
Is there a way to check if my SPM8 is installed correctly? I believe the installation process was straightforward so I am not sure what could go wrong.
Thank you once again
Submitted by YAN Chao-Gan on Fri, 03/16/2012 - 05:04 Permalink
Re
MATLAB -> add subfolders -> the SPM8 directory.
type in "spm('Ver')" in command window see what happens.
Submitted by ahezghia on Fri, 03/16/2012 - 05:47 Permalink
The output was:ans =SPM8
The output was:
ans =
SPM8
I tried it again after doing that and I received this error message this time:
Undefined function 'rest_misc' for input arguments of type
'char'.
Error in DPARSF_Nii2NiftiPairs (line 13)
addpath(fullfile(rest_misc('WhereIsREST'),
'rest_spm5_files'));
Error in DPARSFA_run (line 272)
DPARSF_Nii2NiftiPairs(ImgFileList{x},PO);
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
Submitted by YAN Chao-Gan on Fri, 03/16/2012 - 06:05 Permalink
Re
That means you didn't install REST.
Please pay some attention to the tips pop up when you start DPARSF, it will check if the environment is appropriate.
By the way, spend some time to the video course (restfmri.net/forum/course) would be probably helpful for the further calculations and problems.