Hi Maya, do the ces.nii.gz files have multiple frames? If so, then that is definitely the problem as the currently distributed version of mri_binarize does not handle multiple frames. I've put a more up-to-date one here:
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_binarize
Use --min .000001 (something very small).
doug
btw, I'm not sure what you are doing here but doing this kind of per-subject thresholding followed by group analysis could yield some strange results. I don't have time to completely understand what you are doing, I just wanted to give you a heads up that something could be amiss.
On 10/07/2013 09:04 AM, Maya Rosen wrote:
Hi Doug,
I'm still having trouble understanding what value I should use for --min in mri_binarize. When I contrast Condition A and Condition B when using a mask to only include differences in activation (as opposed to differences in deactivation), I still see small regions of the brain (e.g. frontal pole) that show changes in deactivation. See attached figures and my previous email for reference (copied below)
Thank you!
Maya
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
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.
On Fri, Sep 27, 2013 at 7:15 AM, Maya Rosen <mayalrosen@gmail.com mailto:mayalrosen@gmail.com> wrote:
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 <mailto: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 <mailto:mayalrosen@gmail.com>> Subject: [Freesurfer] statistically truncate negative values To: freesurfer@nmr.mgh.harvard.edu <mailto:freesurfer@nmr.mgh.harvard.edu> Message-ID: <CAJzkiyGEMzm1GUke-XV0Ko5qYH3QdQAuPmZWO8Rqm-0RyTOiew@mail.gmail.com <mailto: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