You'll need to find the i,j,k coordinates of each x,y,z location and then change the value of that location in the image. The following should work, but you should double check the code as I have not tested it.
V -- image in the same space as x,y,z
roilist is a Nx3 matrix of coordinates.

hdr=spm_vol(V);
[Y,XYZ] = spm_read_vols(spm_vol(V));
Y(:,:,:)=0;

for jj=1:size(1,roilist)
  [xyz,ii]=spm_XYZreg('NearestXYZ,roilist(jj,:),XYZ)
  Y(ii)=1;
end

hdr.fname='newfilename.nii';
spm_write_vol(hdr,Y);


Repeat for other group.



Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.


On Wed, Apr 9, 2014 at 10:47 PM, Thang Le <[log in to unmask]> wrote:
Hi Donald,

Actually the task is much less complicated. I don't need to plot the intensity for each ROIs. Each ROI is simply a set of coordinates x, y, and z. I just wanted to plots ROIs for the groups, one healthy controls the other clinical. The ROIs for the clinical population are a lot more widespread so I thought to show this, all the healthy controls' ROIs would be in red and the clinical population would be in blue. Perhaps this can be done in Micron but I'm not so sure.

Le


On Wed, Apr 9, 2014 at 1:38 PM, MCLAREN, Donald <[log in to unmask]> wrote:
So each ROI has an intensity and you want to plot the intensity at a single voxel (e.g. the color of the voxel would relate to the group intensity)? Are the ROIs for the groups the same?



Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.


On Mon, Apr 7, 2014 at 1:38 PM, Thang Le <[log in to unmask]> wrote:
Hi everyone,

Would you happen to know whether SPM8 would allow me to plot multiple ROIs (each represented by one single point specified by x,y,z) on a brain template? I have two groups of subjects, each group has around 20 ROIs and I would like to plot them on the same image to show the difference. One group would be in one color and the other group in another color. If this is not possible/convenient in SPM, I would welcome recommendation of any other open source software that can do this.

Thank you so much.

Thang Le