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  

|
August 10, 2007 08:48AM
For your Q1:
3D datasets are stored in some indexing order (i,j,k) which is mapped by a matrix into DICOM (x,y,z) coordinates. When you use -EPI, the 'j' index is treated as the phase-encoding direction, in which scaling and shearing is allowed. If you are not sure if this is correct for your dataset, use 3dinfo and look at this output:

Dataset File: v1_time+orig
Identifier Code: MCW_DMRDPREMLMV Creation Date: Sun Jun 2 09:34:19 1996
Dataset Type: Echo Planar (-epan)
Byte Order: MSB_FIRST [this CPU native = LSB_FIRST]
Storage Mode: BRIK file
Data Axes Orientation:
  first (x) = Superior-to-Inferior
  second (y) = Anterior-to-Posterior
  third (z) = Left-to-Right [-orient SAL]

In this example, the A-P direction is the 'j' direction. If this were incorrect, the hidden -FPS option (use -HELP to see all of these) can be used to change the mapping of (i,j,k) to (frequency,phase, slice); -EPI is in fact implemented as '-FPS 123', indicating that the first direction in the dataset 'i' is frequency, the second 'j' is phase, and the third 'k' is slice. Alternatively, if you don't want or need the shearing/scaling in the phase direction, then just using '-warp shr' to indicate a rigid body registration may be best for you -- you'll have to judge.

For registering an entire 3D+time EPI dataset to an anatomical dataset, I currently recommend the following, as described in '3dAllineate -help' [afni.nimh.nih.gov]:

(1) create the mean EPI volume with 3dTstat
(2) register that to the anatomical with 3dAllineate, saving the transformation matrix with -1Dmatrix_save
(3) use 3dvolreg to register the EPI time series within itself, using -1Dmatrix_save to save the transformation matrices and using -prefix NULL to suppress output.
(4) combine the matrices from 2 and 3 with cat_matvec
(5) use 3dAllineate -1Dmatrix_apply to apply the combined matrices to the original EPI time series dataset to produce the registered volume.

You will need the latest edition of 3dAllineate to carry out this procedure, since -1Dmatrix_save and _apply are recent innovations.

ASIDE: I am currently working on a better 3dAllineate cost function for registering EPI data to T1-weighted anatomicals. Don't know when it will be ready for consumption. The initial experiments look promising.

-----------------
As for your Q2:

-parfix 2 0 -parfix 4 0 -parfix 5 0 -parfix 8 1 -parfix 10 0 -parfix 12 0

means to not allow
* shifts in the DICOM z (I-S) direction
* rotations about the DICOM z axis
* rotations about the DICOM x (R-L) axis
* scaling along the DICOM y (A-P) axis
The only shearing allowed is along the rotated DICOM z axis, proportional to the DICOM x coordinate.

You don't say what your goal is in fixing these parameters (e.g., what directions correspond to your acquisition), so I can't tell you if this is 'correct' in any sense.

-----------------
As for your Q3:
3dvolreg only does rigid body registration, so the scaling and shearing parameters are fixed by the program's construction. There is no way in 3dvolreg to restrict the shifting or rotation parameters. The program 2dImReg is an alternative, but cannot be used with 3dAllineate as I described earlier.
Subject Author Posted

3dAllineate, matrix concatentation

Brad Buchsbaum April 06, 2007 07:18PM

Re: 3dAllineate, matrix concatentation

ziad April 09, 2007 10:20AM

Re: 3dAllineate, matrix concatentation

Brad Buchsbaum April 10, 2007 01:56PM

Re: 3dAllineate, matrix concatentation

ziad April 10, 2007 03:34PM

Re: 3dAllineate, matrix concatentation

Brad Buchsbaum April 10, 2007 04:03PM

Re: 3dAllineate, matrix concatentation

Brad Buchsbaum April 10, 2007 05:42PM

Re: 3dAllineate, matrix concatentation

ziad April 12, 2007 09:54AM

Re: 3dAllineate, matrix concatentation

Walther July 19, 2007 04:35PM

Re: 3dAllineate, matrix concatentation

bob cox July 23, 2007 09:21AM

Re: 3dAllineate, matrix concatentation

bob cox July 27, 2007 02:21PM

Re: 3dAllineate, matrix concatentation

Walther August 09, 2007 10:20PM

Re: 3dAllineate and EPI

bob cox August 10, 2007 08:48AM

Re: 3dAllineate and EPI

bob cox August 10, 2007 09:05AM

Re: 3dAllineate and EPI

Colm Connolly August 14, 2007 09:15AM

Re: 3dAllineate and EPI

bob cox August 14, 2007 09:49AM

Re: 3dAllineate and EPI

Colm Connolly August 16, 2007 07:15AM

Re: 3dAllineate and EPI

bob cox August 21, 2007 11:47AM