Print

Print


Hi,

These commands will do what you want:

   fslmaths baseimage -mul 0 -add 1 -roi 44 1 68 1 40 1 0 1 -kernel sphere 3 -fmean sphmask -odt float
   fslmaths sphmask -mul 2 -thr `fslstats sphmask -p 100` -bin -mas brain_mask sphmask

You need to change the voxel coordinates (44,68,40) and there sphere radius (3) above to suit your needs.  It also requires a "baseimage" in whatever space you are working in (and suits the voxel coordinates that you are using).  Also, it assumes you have a "brain_mask" image (a binary brain mask).

All the best,
	Mark




> On 11 Sep 2017, at 10:15, Navot Naor <[log in to unmask]> wrote:
> 
> Hi all, 
> 
> Small question, 
> Is there a way to mask a sphere based mask created based on coordinates, so that the sphere includes only regions within the brain?
> 
> Thank you!
> 
> Navot