AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
Colm Connolly
February 20, 2009 11:09AM
Thanks Daniel, that clears things up.

If I've got anat and functional data which are both oblique. I've run the following command

align_epi_anat.py -anat anat+orig. -epi func+orig. -epi_base 1 -tshift_opts "-tpattern seqplus" -volreg_opts "-Fourier" -deoblique on -force_ts on

When it's finished the anat_al and func are still oblique, is that the way the program is supposed to operate?

Also, the timeseries data does not have header information which indicates that the file needs timeshifting, when in fact it does. I've patched align_epi_anat.py fo add a -force_ts option to force timeshifting in this case. I can send you the patch if you'd like.

One more thing. I noticed the warning
*+ WARNING: base and source datasets have different handedness!
*+ WARNING: Alignment will proceed, but examine results carefully!
even though both input datasets (anat and epi) are RAI. Should I be worried?

3dinfo reports
3dinfo anat+orig. func+orig.
++ 3dinfo: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./anat+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./anat+orig.BRIK is 1.273800 degrees from plumb.

Dataset File: anat+orig
Identifier Code: XYZ_ewaImH80ETEC3I3f1e0ucA Creation Date: Fri Feb 20 14:02:25 2009
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST [this CPU native = LSB_FIRST]
Storage Mode: BRIK file
Storage Space: 47185920 (47 million) bytes
Geometry String: "MATRIX(0.898427,0.000542,0.004366,-112.3492,0.000448,-0.898226,0.019523,125.1748,-0.004369,0.019487,0.899778,-40.21881):256,256,180"
Data Axes Tilt: Oblique (1.274 deg. from plumb)
Data Axes Approximate Orientation:
first (x) = Right-to-Left
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient RPI]
R-to-L extent: -112.349 [R] -to- 116.752 [L] -step- 0.898 mm [256 voxels]
A-to-P extent: -103.927 [A] -to- 125.175 [P] -step- 0.898 mm [256 voxels]
I-to-S extent: -40.219 -to- 120.881 [S] -step- 0.900 mm [180 voxels]
Number of values stored at each pixel = 1
-- At sub-brick #0 '#0' datum type is float: 0 to 5396.29

----- HISTORY -----
[colmconn@cortex.tchpc.tcd.ie: Fri Feb 20 14:02:25 2009] 3dcopy ../orig/hg170209scj011_6_1.nii anat

++ Oblique dataset:./func+orig.BRIK is 0.083929 degrees from plumb.

Dataset File: func+orig
Identifier Code: XYZ_me8P_k6XLPN5wrPEAVZegA Creation Date: Fri Feb 20 14:02:15 2009
Dataset Type: Echo Planar (-epan)
Byte Order: LSB_FIRST [this CPU native = LSB_FIRST]
Storage Mode: BRIK file
Storage Space: 180224000 (180 million) bytes
Geometry String: "MATRIX(2.799998,0.001388,0.004326,-109.0424,0.001391,-2.799998,-0.003602,117.4706,-0.003145,-0.002621,3.849996,-10.27004):80,80,32"
Data Axes Tilt: Oblique (0.084 deg. from plumb)
Data Axes Approximate Orientation:
first (x) = Right-to-Left
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient RPI]
R-to-L extent: -109.042 [R] -to- 112.158 [L] -step- 2.800 mm [ 80 voxels]
A-to-P extent: -103.729 [A] -to- 117.471 [P] -step- 2.800 mm [ 80 voxels]
I-to-S extent: -10.270 -to- 109.080 [S] -step- 3.850 mm [ 32 voxels]
Number of time steps = 220 Time step = 2.000s Origin = 0.000s
-- At sub-brick #0 '#0' datum type is float: 0 to 2275.6
-- At sub-brick #1 '#1' datum type is float: 0 to 1717.12
-- At sub-brick #2 '#2' datum type is float: 0 to 1721.29
** For info on all 220 sub-bricks, use '3dinfo -verb' **

----- HISTORY -----
[colmconn@cortex.tchpc.tcd.ie: Fri Feb 20 14:02:15 2009] 3dcopy ../orig/hg170209scj011_7_1.nii func


The complete align_epi_anat.py output is below.

Thanks,

Colm.

#++ align_epi_anat version: 1.17
#Script is running:
3dAttribute DELTA /scratch/deoblique/auto/func+orig
#++ Spacing for EPI to tlrc alignment is 2.800000 mm
#Script is running:
3dAttribute DELTA /scratch/deoblique/auto/anat+orig
#++ Spacing for anat to EPI deobliquing is 0.898438 mm
#++ Removing all the temporary files
#Script is running:
rm -f __tt_func*
#Script is running:
rm -f __tt_anat*
#Script is running:
3dcopy /scratch/deoblique/auto/anat+orig __tt_anat
++ Environment variable AFNI_VERSION_CHECK already set to 'NO'. Value of 'NO' from /home/thpsy/colmconn/.afnirc is ignored.
++ Environment variable AFNI_NOSPLASH already set to 'YES'. Value of 'YES' from /home/thpsy/colmconn/.afnirc is ignored.
++ 3dcopy: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as /scratch/deoblique/auto/anat+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:/scratch/deoblique/auto/anat+orig.BRIK is 1.273800 degrees from plumb.
#++ Removing skull from anatomical data
#Script is running:
3dSkullStrip -input /scratch/deoblique/auto/__tt_anat+orig -prefix __tt_anat_ns
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as /scratch/deoblique/auto/__tt_anat+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:/scratch/deoblique/auto/__tt_anat+orig.BRIK is 1.273800 degrees from plumb.
Warning 3dSkullStrip:****************
Surface self intersecting! trying again:
smoothing of 84, avoid_vent -1
Warning 3dSkullStrip:****************
Surface self intersecting! trying again:
smoothing of 96, avoid_vent -1
Warning 3dSkullStrip:****************
Surface self intersecting! trying again:
smoothing of 108, avoid_vent -1
Warning 3dSkullStrip:****************
Surface self intersecting! trying again:
smoothing of 120, avoid_vent -1
Warning 3dSkullStrip: Stubborn intersection remaining at smoothing of 120. Ignoring it.The intensity in the output dataset is a modified version
of the intensity in the input volume.
To obtain a masked version of the input with identical values inside
the brain, you can either use 3dSkullStrip's -orig_vol option
or run the following command:
3dcalc -a /scratch/deoblique/auto/__tt_anat+orig -b __tt_anat_ns+orig -expr 'a*step(b)' \
-prefix __tt_anat_ns_orig_vol
to generate a new masked version of the input.
#Script is running (command trimmed):
3dinfo __tt_anat_ns+orig | \grep 'Data Axes Tilt:'|\grep 'Oblique'
#++ Dataset /scratch/deoblique/auto/__tt_anat_ns+orig is ***oblique****
#++ Matching obliquity of anat to epi
#++ Matching obliquity of anat to epi
#Script is running (command trimmed):
3dWarp -verb -card2oblique func+orig -prefix __tt_anat_ns_ob -newgrid 0.898438 __tt_anat_ns+orig | \grep -A 4 '# mat44 Obliquity Transformation ::' > __tt_anat_ns_obla2e_mat.1D
++ 3dWarp: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
++ Authored by: RW Cox
++ Deobliquing original dataset before obliquing
++ Combining oblique transformations
++ Output dataset ./__tt_anat_ns_ob+orig.BRIK
#++ Correcting for slice timing
#Script is running (command trimmed):
3dTshift -prefix __tt_func_tsh -tpattern seqplus func+orig
++ 3dTshift: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./func+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./func+orig.BRIK is 0.083929 degrees from plumb.
#++ Volume registration for epi data
#Script is running (command trimmed):
3dvolreg -1Dfile __tt_func_tsh_vr_motion.1D -1Dmatrix_save __tt_func_tsh_vr_mat.aff12.1D -prefix __tt_func_tsh_vr -base 1 -Fourier __tt_func_tsh+orig
++ 3dvolreg: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
++ Authored by: RW Cox
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./__tt_func_tsh+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./__tt_func_tsh+orig.BRIK is 0.083929 degrees from plumb.
++ Max displacement in automask = 0.99 (mm) at sub-brick 70
#++ Creating representative epi sub-brick
#Script is running (command trimmed):
3dbucket -prefix __tt_func_tsh_vr_ts __tt_func_tsh_vr+orig'[1]'
++ 3dbucket: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./__tt_func_tsh_vr+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./__tt_func_tsh_vr+orig.BRIK is 0.083929 degrees from plumb.
#++ resampling epi to match anatomical data
#Script is running (command trimmed):
3dresample -master __tt_anat_ns_ob+orig -prefix __tt_func_tsh_vr_ts_rs -inset __tt_func_tsh_vr_ts+orig'' -rmode Cu
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./__tt_func_tsh_vr_ts+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./__tt_func_tsh_vr_ts+orig.BRIK is 0.083929 degrees from plumb.
#++ removing skull or area outside brain
#Script is running (command trimmed):
3dSkullStrip -input __tt_func_tsh_vr_ts_rs+orig -prefix __tt_func_tsh_vr_ts_rs_ns
The intensity in the output dataset is a modified version
of the intensity in the input volume.
To obtain a masked version of the input with identical values inside
the brain, you can either use 3dSkullStrip's -orig_vol option
or run the following command:
3dcalc -a __tt_func_tsh_vr_ts_rs+orig -b __tt_func_tsh_vr_ts_rs_ns+orig -expr 'a*step(b)' \
-prefix __tt_func_tsh_vr_ts_rs_ns_orig_vol
to generate a new masked version of the input.
#++ Computing weight mask
#Script is running (command trimmed):
3dBrickStat -automask -percentile 90.000000 1 90.000000 __tt_func_tsh_vr_ts_rs_ns+orig
#++ Applying threshold of 3162.000000 on /scratch/deoblique/auto/__tt_func_tsh_vr_ts_rs_ns+orig
#Script is running (command trimmed):
3dcalc -datum float -prefix __tt_func_tsh_vr_ts_rs_ns_wt -a __tt_func_tsh_vr_ts_rs_ns+orig -expr 'min(1,(a/3162.000000))'
++ 3dcalc: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./__tt_func_tsh_vr_ts_rs_ns_wt+orig.BRIK
#++ Aligning anatomical data to epi data
#Script is running (command trimmed):
3dAllineate -lpc -wtprefix __tt_anat_ns_ob_al_wtal -weight __tt_func_tsh_vr_ts_rs_ns_wt+orig -source __tt_anat_ns_ob+orig -prefix __tt_anat_ns_ob_temp_al -base __tt_func_tsh_vr_ts_rs_ns+orig -nocmass -1Dmatrix_save anat_al_e2a_only_mat.aff12.1D -master SOURCE -weight_frac 1.0 -maxrot 6 -maxshf 10 -VERB -warp aff -source_automask+4 -onepass
++ 3dAllineate: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
++ Authored by: Emperor Zhark
++ Loading datasets
++ 2361491 voxels in -source_automask+4
++ Zero-pad: not needed
++ 1790919 voxels [14.2%] in weight mask
++ Output dataset ./__tt_anat_ns_ob_al_wtal+orig.BRIK
++ Number of points for matching = 1790919
++ Local correlation: blok type = 'RHDD(6.54321)'
++ shift param auto-range: -73.8..73.8 -75.0..75.0 -53.9..53.9
+ Range param#4 [z-angle] = -6.000000 .. 6.000000
+ Range param#5 [x-angle] = -6.000000 .. 6.000000
+ Range param#6 [y-angle] = -6.000000 .. 6.000000
+ Range param#1 [x-shift] = -10.000000 .. 10.000000
+ Range param#2 [y-shift] = -10.000000 .. 10.000000
+ Range param#3 [z-shift] = -10.000000 .. 10.000000
+ 12 free parameters
++ Normalized convergence radius = 0.001000
++ ======= Allineation of 1 sub-bricks using Local Pearson Correlation Signed =======
++ Memory usage now = 151362764 (151 million): about to start alignment loop
++ ========== sub-brick #0 ========== [total CPU=5.8 s]
++ *** Fine pass begins ***
+ * Enter alignment setup routine
+ - copying base image
+ - copying source image
+ - copying weight image
+ - using 1790919 points from base image
+ * Exit alignment setup routine
+ 1694165 total points stored in 2313 'RHDD(6.54321)' bloks
+ - Initial cost = -0.003496
+ - Initial fine Parameters = 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000
+ - Finalish cost = -0.404417 ; 238 funcs
+ - Final cost = -0.404535 ; 73 funcs
+ Final fine fit Parameters = 2.6915 9.9987 4.8817 0.0994 -0.3396 0.5948 0.9989 0.9774 0.9896 -0.0066 0.0025 -0.0028
+ - Fine CPU time = 41.8 s
++ Computing output image
++ image warp: parameters = 2.6915 9.9987 4.8817 0.0994 -0.3396 0.5948 0.9989 0.9774 0.9896 -0.0066 0.0025 -0.0028
++ Memory usage now = 408364604 (408 million): end of sub-brick alignment
++ Memory usage now = 93101640 (93 million): end of sub-brick loop (after cleanup)
++ Output dataset ./__tt_anat_ns_ob_temp_al+orig.BRIK
++ Memory usage now = 67882069 (68 million): after writing output dataset
++ Wrote -1Dmatrix_save anat_al_e2a_only_mat.aff12.1D
++ total CPU time = 49.5 sec Elapsed = 51.7
++ Memory usage now = 6841097 (6.8 million): end of program (after final cleanup)
++ ###########################################################
#Script is running:
cat_matvec -ONELINE anat_al_e2a_only_mat.aff12.1D __tt_anat_ns_obla2e_mat.1D -I > anat_al_mat.aff12.1D
#++ Combining anat to epi and oblique transformations
#Script is running (command trimmed):
3dAllineate -base __tt_func_tsh_vr_ts_rs_ns+orig -1Dmatrix_apply anat_al_mat.aff12.1D -prefix anat_al -input __tt_anat_ns+orig -master SOURCE
++ 3dAllineate: AFNI version=AFNI_2008_07_18_1710 (Feb 12 2009) [64-bit]
++ Authored by: Emperor Zhark
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./__tt_anat_ns+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./__tt_anat_ns+orig.BRIK is 1.273800 degrees from plumb.
++ Loading datasets
*+ WARNING: base and source datasets have different handedness!
*+ WARNING: Alignment will proceed, but examine results carefully!
++ ========== Applying transformation to 1 sub-bricks ==========
++ ========== sub-brick #0 ========== [total CPU=0.1 s]
++ Output dataset ./anat_al+orig.BRIK
++ total CPU time = 2.5 sec Elapsed = 3.2
++ ###########################################################
#++ Creating final output: anat data aligned to epi data
# copy is not necessary
#++ Saving history
#Script is running:
3dNotes -h "align_epi_anat.py -anat anat+orig. -epi func+orig. -epi_base 1 \
-tshift_opts '-tpattern seqplus' -volreg_opts -Fourier -deoblique on \
-force_ts on" anat_al+orig

*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./anat_al+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./anat_al+orig.BRIK is 1.273800 degrees from plumb.
*+ WARNING: Over-writing dataset ./anat_al+orig.HEAD
#++ Removing all the temporary files
#Script is running:
rm -f __tt_func*
#Script is running:
rm -f __tt_anat*

# Finished alignment successfully

Subject Author Posted

bug in 3dAttribute?

Colm Connolly February 19, 2009 06:32AM

Re: bug in 3dAttribute?

Daniel Glen February 19, 2009 09:58AM

Re: bug in 3dAttribute?

Colm Connolly February 20, 2009 11:09AM

Re: bug in 3dAttribute?

Daniel Glen February 20, 2009 11:31AM

Re: bug in 3dAttribute?

Colm Connolly February 20, 2009 11:45AM

Re: bug in 3dAttribute?

Daniel Glen February 20, 2009 12:11PM