AFNI Message Board

History of AFNI updates  

|
May 03, 2021 10:10PM
Hi, Mrinmayi-

Thanks, that all does make sense.

I don't think that "junk" or intermediate alignment should be necessary: you have aligned+warped your EPI to your subj anat, and you have the SSW transform from that same anat to MNI space, so you should just need to invert the SSW warp, and have the output dset be on the EPI grid (which overlays the anat, just more coarsely, I assume).

I think this is what I would try, where "${APDir}" looks like your variable for the AP results, and I am calling the directory with the SSW warps "${dir_ssw}"; if you have those anatQQ* dsets copied into the AP results dir, then you can use that variable again:
3dNwarpApply \
    -source     SOME_ROIS_IN_MNI    \
    -ainterp NN                                                   \
    -master ${APDir}/stats.${subj}+orig.HEAD                 \
    -nwarp  "${dir_ssw}/anatQQ.${subj}_WARP.nii ${dir_ssw}/anatQQ.${subj}.aff12.1D" \
    -iwarp  \
    -prefix  ${APDir}/OUTPUT_IN_SUBJ

NB: as a test, I would try warping the [0]th volume of the MNI SSW template to your subj space like this, to make sure that it looks like it overlaps the anatomical well:
3dNwarpApply \
    -source     MNI_TEMPLATE_SSW"[0]"    \
    -master ${APDir}/stats.${subj}+orig.HEAD                 \
    -nwarp  "${dir_ssw}/anatQQ.${subj}_WARP.nii ${dir_ssw}/anatQQ.${subj}.aff12.1D" \
    -iwarp  \
    -prefix  ${APDir}/MNI_IN_SUBJ

You can use 3dcalc to make spheres (from the program's help):
7. Create a region-of-interest mask comprised of a 3-dimensional sphere.
   Values within the ROI sphere will be labeled as '1' while values     
   outside the mask will be labeled as '0'. Statistical analyses can    
   then be done on the voxels within the ROI sphere.                    

   The example below puts a solid ball (sphere) of radius 3=sqrt(9)     
   about the point with coordinates (x,y,z)=(20,30,70):                 

     3dcalc -a anat+tlrc                                              \
            -expr 'step(9-(x-20)*(x-20)-(y-30)*(y-30)-(z-70)*(z-70))' \
            -prefix ball

--pt
Subject Author Posted

Transforming ROIs from MNI space to Native EPI space

mrinmayik May 01, 2021 12:49PM

Re: Transforming ROIs from MNI space to Native EPI space

ptaylor May 02, 2021 09:10AM

Re: Transforming ROIs from MNI space to Native EPI space

mrinmayik May 02, 2021 04:26PM

Re: Transforming ROIs from MNI space to Native EPI space

ptaylor May 03, 2021 10:10PM



Sorry, only registered users may post in this forum.

Click here to login