Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
hMRI-toolbox-public/hmri_run_proc_dartel_template.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25 lines (21 sloc)
848 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function out = hmri_run_proc_dartel_template(job) | |
% Wrapper function for the DARTEL processing part of the hMRI toolbox. | |
% This relies on the standard SPM functions but handles some extra | |
% settings, e.g. the selection of the output folder. | |
% For this, things run as usual with SPM functions then data are moved | |
% around where they should be. | |
% Fix the job structure | |
job_spm = job; | |
% Define output folder for SPM function | |
output = struct('outDir', [], 'option', 'same'); | |
if isfield(job.output,'outdir') % -> everything in the same | |
output.outDir = job.output.outdir{1}; | |
output.option = 'allin'; | |
elseif isfield(job.output,'outdir_ps') % -> per suject organization | |
output.outDir = job.output.outdir_ps{1}; | |
output.option = 'subjspec'; | |
end | |
job_spm.output = output; | |
% Call SPM's 'run' function | |
out = spm_dartel_template(job_spm); | |
end |