AFNI version info (afni -ver
):
Hi All,
I have two masks which I overlay on suma surface and I want to find their individual area as well as the area of their intersection. How can I extract these information from suma and my data?
code text # or delete if not needed
dglen
December 11, 2023, 10:12pm
2
Several things you can calculate about overlap between two surface datasets on the same mesh.
# counting overlaps in terms of number of nodes
3dBrickStat -mask std.60.rh.thickness.niml.dset'<3.5..5>' -count -non-zero std.60.rh.thickness.niml.dset
4179
3dBrickStat -mask std.60.rh.thickness.niml.dset -count -non-zero std.60.rh.thickness.niml.dset
34263
3dOverlap std.60.rh.thickness.niml.dset'<3.5..5>' std.60.rh.thickness.niml.dset
++ 3dOverlap: AFNI version=AFNI_23.3.12 (Dec 8 2023) [64-bit]
4179
3dABOverlap -no_automask std.60.rh.thickness.niml.dset'<3.5..5>' std.60.rh.thickness.niml.dset
++ 3dABoverlap: AFNI version=AFNI_23.3.12 (Dec 8 2023) [64-bit]
#A=std.60.rh.thickness.niml.dset B=std.60.rh.thickness.niml.dset
#A #B #(A uni B) #(A int B) #(A \ B) #(B \ A) %(A \ B) %(B \ A) Rx(B/A) Ry(B/A) Rz(B/A)
4179 34263 34263 4179 0 30084 0.0000 87.8032 0.9081 0.0000 0.0000
3dcalc -a std.60.rh.thickness.niml.dset'<3.5..5>' -b std.60.rh.thickness.niml.dset -expr 'b*step(a)' -prefix a_in_b.niml.dset
++ 3dcalc: AFNI version=AFNI_23.3.12 (Dec 8 2023) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./a_in_b.niml.dset
3dBrickStat -count -non-zero a_in_b.niml.dset
4179
For relative surface areas, use commands like these:
SurfMeasures -func n_area_A -info_area -spec std.60.FT_rh.spec -surf_A pial -nodes_1D a_in_b.1D.dset -out_1D a_in_b_area.1D -overwrite
----------------------------------------------------------
-- **total area 0 = 50576.1**
3dBrickStat -sum a_in_b_area.1D'[1]'
50576.1
3dmaskave -sum a_in_b_area.1D'[1]'
++ 3dmaskave: AFNI version=AFNI_23.3.12 (Dec 8 2023) [64-bit]
+++ 36002 voxels in the entire dataset (no mask)
50576.1 [36002 voxels]
I am really thankful of your great help.