History of AFNI updates  

|
July 22, 2022 06:22AM
Hi-

I don't quite understand. Can you provide a bit more description? It is correct that you have a volume with a single ROI in it, and you *just* the edge of it?

There are different ways to do so; there is also some decision-making about what is meant by "edge": are the voxels connected by any of voxel-faces or -nodes or -edges, or a subset of those? There are also various permutations depending on whether you have multiple ROIs per voxel (it sounds like that is not the case here).

The way I would start by doing this would be to calculate the depth of the ROI in terms of voxel counts:
3dDepthMap \
    -zeros_are_zero \
    -ignore_voxdims \
    -prefix mask_depth.nii.gz \
    -input DSET_ROI
... and then use the following 3dcalc command to find nonzero places in the depth map below a certain value---using 1.2 here will keep a boundary connected by voxel-faces or voxel-edges:
3dcalc \
    -a mask_depth.nii.gz \
    -expr 'bool(a)*step(1.2-a)' \
    -prefix mask_edge.nii.gz \
    -overwrite
Those images are attached, showing the ROI as underlay, first with the depth calculation and then with the boundary calculation.

--pt
Attachments:
open | download - img_depth.jpg (14.5 KB)
open | download - img_boundary.jpg (9.7 KB)
Subject Author Posted

How to add the egde for the mask

hjr61547 July 22, 2022 02:34AM

Re: How to add the egde for the mask Attachments

ptaylor July 22, 2022 06:22AM

Re: How to add the egde for the mask Attachments

hjr61547 July 23, 2022 10:21AM

Re: How to add the egde for the mask

Daniel Glen July 24, 2022 01:03PM