Print

Print


Hi,

I'm having trouble getting the syntax right to implement the strategy 
written about below (a prior listserv email) for making a spherical ROI 
mask.  I've based the commands off of this email and the syntax output 
of fslmaths.  For example, I tried the following commands to make a 
10x10x10mm sphere around point 50,50,50 in matrix space like so:

fslmaths MNI152_T1_2mm_brain_mask -roi 50 1 50 1 50 1 0 1 point_mask
fslmaths point_mask -kernel sphere 10x10x10 -fmean sphere_mask

The creation of the roi (the first command) works great, but not the 
second command.  I've tried a number of variations of the above syntax, 
including putting everything into one fslmaths command, but all I get 
for final output is either a single point ROI (i.e., the original 
point_mask above) or a null image.

Could someone point me to the right command/syntax for implementing 
this?  I'm running it on Ubuntu Gutsy, FSL version 4.0.3-2.

Thanks - John

Mark Jenkinson wrote:
> Hi,
> 
> It isn't possible to save an image that is not rectangular.
> But you can certainly mask an image by making everything zero outside a
> spherical region.  The best way is to make a spherical mask and then
> just mask with this.  To do that I recommend making an image with the
> everything zero except the centre voxel (you can easily do this with
> the -roi option in fslmaths) and then use the -kernel sphere option
> in fslmaths together with -fmean to turn this single voxel into a
> sphere.  You can then (separately) use this result to mask your image
> in fslmaths.
> 
> All the best,
>     Mark
> 
> 
> On 18 Feb 2008, at 18:03, Martin M Monti wrote:
> 
>> Hi, I know you can use fslroi to create cubic or similar ROIs -- using 
>> it in its first form -- is there a way to produce a spherical ROI, 
>> specifying the center in voxels/mm and a radius -- for example?
>>
>> cheers
>>
>> martin
>>
>