AFNI Message Board

History of AFNI updates  

May 13, 2021 07:26PM
Hi all,

I have been trying to do anaticor on NHP data. I think I realized I have been doing it in a stupid way, but now I have an idea how to do it more sensibly. I still have a lingering feeling that I my thinking might be wrong, so I though I'd ask here. First, am I right that the first idea was not good? Second, is the new idea OK?

Here are the details

1. Old (stupid?) idea.

I started with aligning individual anatomy with NMT2.0 template. This produced, among other things, brain segmentation aligned to the individual subject's space.

From that I produced the individual subjects's WM mask:

3dcalc -overwrite -a $SEGinSubj                                         \
    -expr 'equals(a, 4)' -prefix ${odir_aw}/WM_anat_mask

Then I used it in via following options (I am only showing relevant options):                                                              \
        -anat_follower_ROI       WMmask epi ${odir_aw}'/'WM_anat_mask+orig    \
        -anat_follower_erode     WMmask                                       \
        -regress_anaticor_fast                                                \
        -regress_anaticor_radius  20                                          \
        -regress_anaticor_label   WMmask                                      \

but does not it mean that I first warp segmentation from the NMT space to subject space and then I make warp it (or rather just the WM part) back to the NMT space? Which I think is not a good thing to do? I think I am also eroding and then warping to NMT, which does not feel right,

2. New idea

So would it make more sense to:

2.1. extract WM from segmentation in NMT space:
3dcalc -overwrite -a $SEGinNMT                                       \
    -expr 'equals(a, 4)' -prefix ${odir_aw}/WM_NMT_mask

2.2. resample it to EPI resolution via something like
3dresample -dxyz 1.5 1.5 1.5 -rmode NN -input  ${odir_aw}/WM_NMT_mask+tlrc \
           -prefix WM_mask_EPIresampled
(or, should I use something like -master $MyEPI instead of -dxyz to make sure that not only the size but also the boundaries of voxels match between the mask and EPI?)

2.3 erode it (I can't erode an external mask within afni_proc, or can I?)
3dmask_tool -dilate -1  -input WM_mask_EPIresampled+tlrc -prefix WMe_mask_EPIresampled

2.4. use it in afni_proc:                                                              \
        -mask_import WMmask WMe_mask_EPIresampled+tlrc  \
        -regress_anaticor_fast                                                \
        -regress_anaticor_radius  20                                          \
        -regress_anaticor_label   WMmask                                      \

Does the second approach make more sense?
I would be very grateful for any help!
Subject Author Posted

obtaining WM mask for anaticor

Pawel May 13, 2021 07:26PM

Sorry, only registered users may post in this forum.

Click here to login