History of AFNI updates  

|
August 09, 2022 10:36AM
Hi, Emily-

Re: <<I would like Z scores between 1.5 and 4 to be marked as "1s" and Z scores between -1.5 and -4 to be marked as "1s". The rest will be "0s" when binarizing.>>
Yes, you can do that like this:
3dcalc \
   -a DSET_STAT \
   -expr 'within(a,-4, -1.5) +within(a,1.5, 4)' \
   -prefix DSET_ROI_MASK

Re. calculating Dice in AFNI: Yes, there are a few options:
+ There are "3ddot -dodice ..."
+ 3dMatch has a Dice calculation (as well as a continuous-variable calculation, which might actually be of additional use/information here?); the Dice value would be in the 4th column of the output *.vals file
+ There is a fun, slice-wise Dice calculator, called 3dSliceNDice: 3dSliceNDice. That is generally more useful for calculating an interesting Dice comparison between larger ROI regions (like comparing masks).

... but also, there might be good ways to do a non-binarized comparison---those are often more informative, less sensitive to thresholding (which is arbitary, even if it happens to fall on a round-ish number), and use data more effectively. Visualizing the data together with translucent thresholding (such as used in the afni_proc.py QC stats images) is really quite helpful. In the AFNI GUI, that is done by apply the "A" and "B" buttons, and in @chauffeur_afni, you can do the same thing, such as shown here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/auto_image/auto_%40chauffeur_afni.html#ex-5-overlay-beta-coefs-and-threshold-translucently-with-stats
with these opts:
-olay_alpha       Yes                                             \
    -olay_boxed       Yes                                             \

--pt
Subject Author Posted

thresholding and binarizing images

ebelleau August 09, 2022 09:47AM

Re: thresholding and binarizing images

ptaylor August 09, 2022 10:36AM

Re: thresholding and binarizing images

ptaylor August 09, 2022 10:44AM

Re: thresholding and binarizing images

Daniel Glen August 09, 2022 10:45AM

Re: thresholding and binarizing images

ptaylor August 09, 2022 10:50AM

Re: thresholding and binarizing images

ebelleau August 11, 2022 10:37AM