Skip to content

CSD always runs when multishell is set to TRUE, looking for file never generated #36

Description

@njhunsak

I'm trying to use the option 'computeCSD' and my data are multishell.

afq.params.track.multishell = true;
afq = AFQ_Create('sub_dirs', sub_dirs, 'sub_group', sub_group, 'showfigs', false, 'computeCSD', 1, 'normalization', 'ants');

I'm having issues with these options. Based on the code in AFQ_Create with the options I've included, this is the command that runs:

AFQ/functions/AFQ_Create.m

Lines 334 to 340 in dd6c478

files = AFQ_mrtrixInit(AFQ_get(afq, 'dt6path',ii), ...
lmax,...
mrtrixdir,...
afq.software.mrtrixVersion, ...
afq.params.track.multishell, ... % true/false
afq.params.track.tool, ...
afq.params.track.response); % 'fsl', 'freesurfer'

That code creates a list of files:

files = AFQ_mrtrix_build_files(fname_trunk, lmax, compute5tt, multishell);

Going to that script there's several files listed for CSD, but here's the file giving me issues:

files.csd = strcat(fname_trunk, sprintf('_csd_lmax%i.mif',lmax));

Once you have the files listed, there's another program to check which mrtrix processes have been computed:

computed = mrtrix_check_processes(files);

And here's the problem I'm having, the scripts are looking for the CSD file. However, that file is only created if multishell==0

if multishell==0
% Compute the CSD estimates:
if (~computed.('csd'))
disp('The following step takes a while (a few hours)');
AFQ_mrtrix_csdeconv(files.dwi, ...
files.response, ...
lmax, ...
files.csd, ... %out
files.b, ... %grad
files.brainmask,... %mask
false,... % Verbose
mrtrixVersion)
end

Since I'm using multishell, that CSD file is never created, so every time I run the AFQ_Create command, it always says CSD needs to be run.

It seems like somewhere when generating file names and checking those names to determine what mrtrix processes need to be run, there needs to be different criteria if multishell is set?


Also I had to change -tempdir to -scratch based on my version of mrTrix:

'-nocrop -tempdir ' tmpDir];

'-nocrop -tempdir ' tmpDir];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions