Print

Print


Dear Joshua,

> Hi All, perhaps someone can expedite me towards a solution. 
> 
> I have a pre-exisitng image/mask that I'd like to break down into two smaller masks.  Specifically, I'd like to supply the x,y,z coordinates of a bounding plane and generate two new masks, or at least, spit out the volume of each.
> 
> For example, say I had a pre-existing mask that traced out the amygdala, I'd now like to split it into two masks like anterior amygdala and posterior amygdala, by supplying the plane by which it is split.
> 
> I realize that creating such a mask could entail partialling of voxels. I would be satisfied with a solution that just divided by a specified z-plane.
> 
> Thanks for any help that can be given. I'd hate to spend a bunch of time retracing manually what should easily be done with a little code.

use fslmaths to create another image with the same dimensions, but with all zeros. You can then use fslroi to create (from your mask) two images which each has part of the ROI and to create (from your image of zeros) two other images of the same sizes. Finally use fslmerge to combine images with half a ROI with the empty images.

Good luck Jesper