Skip to content

aamod_firstlevel_threshold generating incorrect maps #150

Description

@jones-michael-s

Hello all,

Hope everyone is having a good summer.

I recently ran into some trouble with the heatmaps generated by aamod_firstlevel_threshold. There's some code logic that seems strange to me, but I thought I'd check how other people are using the module before changing it.

The difficulty is here:

        if aas_stream_has_contents(aap,subj,'structural') % Structural if available (backward compatibility)
            tmpfile = aas_getfiles_bystream(aap, subj,'structural');
            if size(tmpfile,1) > 1 % in case of norm_write (first: native, second: normalised)
                tmpfile = tmpfile(2,:); 
            end
        else  % Template
            aas_log(aap,false,'Structural cannot be loaded! Template will be used...');
            tmpfile = aap.directory_conventions.T1template;
            if tmpfile(1) ~= '/'
                if exist(tmpfile,'file'), tmpfile = which(tmpfile);
                else tmpfile = fullfile(fileparts(which('spm')),tmpfile); end
            end
        end

Now:

  1. Our analyses always have a structural. The structual stream is not optional nor renameable in aamod_firstlevel_threshold. Ergo, the module will always find a structural (and it will be in a stream named "structural").

  2. Our analyses always map the functional results to MNI space. Ergo, unless the structural is normed, aamod_firstlevel_threshold will display the heatmaps on the individual anatomy and it will be wrong. Indeed, I'm getting weirdness like this:

image

The difficulty is (as far as I can tell) the only stream that is named "structural" that has normed content comes out of aamod_norm_noss. (This is that weird two-part structural stream nobody seems to like and we may change, but that is a separate issue). The issue presently is if you're not using aamod_norm_noss, aamod_firstlevel_threshold will always generate bad maps (This only affects the slices -- the 3D renders are fine, but that is because it always uses the SPM rendered brains).

It seems to me there needs to be a way to force aamod_firstlevel_threshold to use the SPM T1 template even if a structural is present.

On the other hand, it's hard to believe that nobody noticed this before.

Is there something peculiar about my usage?

Regards,
Mike

PS: I think aamod_secondlevel_threshold is similarly broken.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions