Print

Print


Dear All,

In a lesional study, I need to mask the tissue classes rc1_i (grey matter),
rc2_i (white matter) for the image i (size 256^3) by a lesion ROI mask, msk
(size 256^3,  a 0-1 binary mask). During the New Segment routine, rc1_i and
rc2_i are generated at a size 121X145X121. Here are the options I thought
of:

1. Subject the msk to New Segment (this would generate rc* classes for the
mask of the appropriate size, and mask each i tissue class to the
corresponding msk class:

rc1_i_hdr=spm_vol(rc1_i);

rc1_i_img=spm_read_vols(rc1_i_hdr);

rc2_i_hdr=spm_vol(rc2_i);

rc2_i_img=spm_read_vols(rc2_i_hdr);

rc1_msk_hdr=spm_vol(rc1_msk);

rc1_msk_img=spm_read_vols(rc1_msk_hdr);

rc2_msk_hdr=spm_vol(rc2_msk);

rc2_msk_img=spm_read_vols(rc2_msk_hdr);

rc1_i_img(rc1_msk_img~=0)=0;  % ~=0.5

spm_write_vol(rc1_i_hdr, rc1_i_img);

rc2_i_img(rc2_msk_img~=0)=0;  % ~=0.5

spm_write_vol(rc2_i_hdr, rc2_i_img);


proceed to Dartel. This is the most natural, although I am not sure about
the rationale of getting tissue classes for a binary mask.

2. Use ImCalc to generate an overall tissue volume rc_i_vol=
(rc1_i+rc2_i)/2;
+?- threshold it, then Coregister: Estimate and Reslice msk using rc_i_vol
as template (=er_msk), then mask each rc*_i with er_msk, proceed to Dartel.

I wanted to see if there is a simpler way that this could be done that I
miss.

Thank you,

Octavian