History of AFNI updates  

|
February 13, 2020 01:15PM
Hello AFNI,
Thanks to --pt I have now the solution for the coregistration of the functional images in macaques:

I had difficulty with nonlinear warping because large shifts were involved:

"basically, the memory usage can be quite high, because the warp field must cover a box that covers both input and output datasets-- and a large shift means that one would need a large box (memory consumption grows like an edge length cubed, because of the three dimensionality of dsets).
So, at present @animal_warper assumes that your input datasets are well centered; there is actually a bit of inconsistency in how it deals with the 'original' and shifted dsets. I think what we will do is the following:
+ have a "native space" skullstripped anatomical that is overlays perfectly on the "shifted" dataset there, that way there won't be any relative offset between input anat dsets, and the WARP field won't get made quite large.
+ and then, one would want the EPI to overlay well on that shifted anat, again, so that the (concatenated) WARP used in the end is not huge.
here is the script I used to adjust this in your data, and the alignment looked good at the end (final_epi_vr_base_min_outlier+tlrc.BRIK and anat_final.sub-003+tlrc.BRIK both overlay each other and the NMT template well);

---------------------------------------------------------------------------------------------
# recenter anat to be on the "shifted" dset from @animal_warper: that
# is really where warps are made to/from
set ref_dset  = ${aw_dir}/a00_deob_shft.nii.gz      
set new_ori   = `3dinfo -orient ${ref_dset}`

# recenter the '-copy_anat ..' dset
3dresample                               \
    -prefix a00_deob_ns_RECEN.nii.gz     \
    -orient ${new_ori}                   \
    -input ${aw_dir}/a00_deob_ns.nii.gz
3drefit                          \
    -duporigin ${ref_dset}       \
    a00_deob_ns_RECEN.nii.gz

#### Recenter the EPI '-dsets ..' dset(s)
# also, move the EPI to be centered (approximately) on that new spot,
# so the WARP dset doesn't have to stretch too far
@Align_Centers                       \
    -cm                              \
    -base a00_deob_ns_RECEN.nii.gz   \
    -dset LONGER_e00_deob.nii        \
    -prefix LONGER_e00_deob_RECEN.nii


afni_proc.py                                                              \
    -subj_id ${subj}                                                      \
    -script proc.${subj}                                                  \
    -scr_overwrite                                                        \
    -out_dir ${subj}.results                                              \
    -blocks tshift align tlrc volreg                                      \
    -dsets      LONGER_e00_deob_RECEN.nii                                 \
    -copy_anat  a00_deob_ns_RECEN.nii.gz                                  \
    -anat_has_skull no                                                    \
    -volreg_align_to   MIN_OUTLIER                                        \
    -volreg_align_e2a                                                     \
    -volreg_tlrc_warp                                                     \
    -align_opts_aea                    \
        -epi_strip 3dAutomask          \
        -cost lpc+zz                   \
        -giant_move                    \
        -check_flip                    \
    -tlrc_base  ${refvol}              \
    -tlrc_NL_warp                      \
    -tlrc_NL_warped_dsets                                   \
        ${aw_dir}/a00_deob_warp2std_nsu.nii.gz              \
        ${aw_dir}/a00_deob_shft_al2std_mat.aff12.1D         \
        ${aw_dir}/a00_deob_shft_WARP.nii.gz                 \
    -html_review_style pythonic                             \
    -execute

"
--pt

I big thank you at --pt that solve this problem!
Clément
Subject Author Posted

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 03, 2020 05:38PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Daniel Glen January 03, 2020 05:58PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 07, 2020 05:48PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 08, 2020 09:46AM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 08, 2020 11:21AM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 08, 2020 12:09PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 08, 2020 12:35PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 08, 2020 01:03PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 08, 2020 12:37PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 08, 2020 11:47AM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 08, 2020 12:10PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 08, 2020 12:38PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Daniel Glen January 08, 2020 06:30PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 09, 2020 09:37AM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 09, 2020 09:54AM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 09, 2020 11:22AM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 09, 2020 12:00PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 09, 2020 12:06PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 09, 2020 12:27PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 15, 2020 06:21PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 21, 2020 05:49PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 21, 2020 10:56PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 22, 2020 10:14AM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 22, 2020 06:03PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys January 22, 2020 06:33PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

ptaylor January 22, 2020 06:46PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys February 13, 2020 01:15PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Doughboys May 21, 2020 09:27PM

Re: can't malloc -1437173116 bytes in 3dNwarpApply

Daniel Glen May 25, 2020 11:35PM