# A question about the ROI created of activated area

Hi afni expert
In these days ,I tried to save the mask of activated area from afni GUI as ROI. I wonder if it like the mask acquired from other ways which the voxel inside the mask is “1” and the voxel outside the mask is “0”, because I found something strange when I use this mask to render. If it is not , how can I do to make it —make the voxel inside the mask is “1”
Thanks

If you are trying to convert any non-zero voxel value into a value of 1, you can do something like this

3dcalc -a mydset.nii.gz -expr ‘step(a)’ -prefix mydset_mask.nii

That works for positive values at each voxel. If you want to include negative values, then use ‘step(abs(a))’ in your expression. If you want values that exceed some threshold, then use ‘step(a-0.12345)’, replacing the value for the threshold. Hope that makes sense and that it answers your question.

Thank you very much! This do help me! But I met another problem, that is , I want to find the counterpart of the activated area in the contralateral as ROI ,how can I do that? For example, if I find some voxel activated in left STG (this is one of my ROI ), and I’d like to find the same area in right STG as the ROI, how can I make it ?
Thanks

Still not sure exactly what you want, but you can take the contralateral coordinates for most template spaces (MNI variants, TLRC) approximately by negating the x coordinate (RAI or LPI order). So if you are interested in a coordinate at (10,100,100), then you can also look at (-10,100,100). The human brain is only approximately symmetric, so you might consider a sphere around each point. See 3dUndump for placing spheres. Also consider using the left and right regions from an atlas. whereami can provide the mask regions, or you can specify atlas regions with 3dcalc. See our class documentation for ROIs below (pages 30,31,35).

https://afni.nimh.nih.gov/pub/dist/edu/latest/afni11_roi/afni11_roi.pdf