For reference, I've attached 3 images. ConditionA vs Passive, Condition B vs Passive, and what the above mri_binarize and mri_glmfit commands give me when I try exclude changes in deactivation. Please note the yellow region at the frontal pole in the masked_ConditionAvsConditionB.png. That region shows greater deactivation in ConditionBvsPASSIVE compared to ConditionAvPASSIVE, and therefore should not show up in the masked version of the contrast of Condition A and Condition B. 

Thanks for your help!

Maya


On Thu, Sep 26, 2013 at 4:39 PM, Maya Rosen <mayalrosen@gmail.com> wrote:
Hi Doug,

Thanks for your response. I implemented what you suggested, but I'm unclear
as to  what I should use as the value for --min when i use mri_binarize? At
first I used 1.3, but that masked out almost all the activation. I lowered
it to 0.1 just to see what would happen. That looked overall more
reasonable (i.e. showing differences where there is activation and not
where there are differences in deactivation). However, there are a couple
of very small regions that are still showing up as having a significant
difference between Condition A and Condition B, when in fact that
difference is due to differences in deactivation (i.e. more deactivation in
Condition B than Condition A --> shows up as A greater than B).

I'd like to know what a reasonable value for the --min flag and if you have
any insight into why I am still seeing some regions that show differences
in deactivation.

Here's what I ran:

mri_binarize --i CONDITION_Avpassive/ces.nii.gz --mask
CONDITION_Bvpassive/ces.nii.gz --mask-thresh 0.00001 --o
ConditionAvsConditionB/point1.ces.nii --min 0.1

mri_glmfit --y ConditionAvsConditionB/ces.nii.gz --osgm --mask
ConditionAvsConditionB/point1.ces.nii  --glmdir point1_masked.rfx
--nii --surf fsaverage lh

Thanks for the help!

Maya

Message: 1
Date: Tue, 10 Sep 2013 15:37:01 -0400
From: Maya Rosen <mayalrosen@gmail.com>
Subject: [Freesurfer] statistically truncate negative values
To: freesurfer@nmr.mgh.harvard.edu
Message-ID:
        <CAJzkiyGEMzm1GUke-XV0Ko5qYH3QdQAuPmZWO8Rqm-0RyTOiew@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi All,

I have two conditions of interest in my GLM analysis, Condition A and
Condition B. I would like to make a contrast of Condition A and Condition B
that includes only those vertices that are significantly positively
activated when compared to the Passive Viewing baseline. In other words, I
would like to mask anything that is Passive > Condition A or Passive >
Condition B and only include Condition A > Passive and Condition B >
Passive when contrasting Condition A and Condition B, so as to limit my
contrast to changes in *activation *in the two conditions, not *deactivation
*.

I see that in an older version, when isxavg-re-sess was used, there was a
flag --trunc that would allow you to set the negative values to 0. If there
is a way to do this in the v 5.1.0, I could then perform a second level
contrast of positively activated Condition A and Positively activated
condition B.

Is there a way to exclude the negatively activated voxels from the
Condition A vs Passive and Condition B vs Passive contrasts when looking at
Condition A vs Condition B? I would like to do this statistically, not just
at the map level.

Thank you for your help!

Maya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer
/attachments/20130910/85a82842/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 10 Sep 2013 16:00:28 -0400
From: Douglas N Greve <greve@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] statistically truncate negative values
To: freesurfer@nmr.mgh.harvard.edu
Message-ID: <522F7A5C.3030708@nmr.mgh.harvard.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


Hi Maya, you could create 3 separatestacks with isxconcat-sess (A, B,
A-B), then create the mask you want with mri_binarize, something like

mri_binarize --i A.nii --min 0.00001 --mask B.nii --mask-thresh 0.00001
--o A-and-B.nii

Then use this as the --mask input to mri_glmfit.

You should also check with a statistician that it is ok to do this type
of masking. I vaguely remember removing the capability because it was a
biased analysis.

doug