AFNI program: lpc_align.py

Output of -help



    ===========================================================================
    This script is used to align an anatomical T1 to an epi (T2/T2*) volume.
    Alignment parameters are set presuming the two volumes to be in close
    alignment. 
    The script resamples and removes the skull off of anat and epi volumes. A
    3dAllineate command is then executed.
    
    Basic Usage:
      lpc_align.py -anat ANAT   -epi EPI   
    
    Extra Options:
      -big_move : indicates that large displacement is needed to align the
                  two volumes. This option is off by default.
      -partial_coverage: indicates that the EPI dataset covers a part of the 
                         brain.    
    
    The script outputs the following:
        ANAT_alepi: A version of the anatomy that is aligned to the epi 
        anat2epi.aff12.1D: A transformation matrix to align anatomy to the epi 
         You can use this transform or its inverse with programs such as
         3dAllineate -cubic -1Dmatrix_apply anat2epi.aff12.1D \
                     -prefix ANAT_alman ANAT
         To align the EPI to the anatomy, first get the inverse of 
         anat2epi.aff12.1D with:
            cat_matvec -ONELINE anat2epi.aff12.1D -I > epi2anat.aff12.1D
         then use 3dAllineate:
         3dAllineate -cubic -1Dmatrix_apply epi2anat.aff12.1D  \
                     -prefix EPI_alman EPI
        Also, since the input volumes are preprocessed before using 3dAllineate,
        the script outputs copies of the preprocessed volumes as they were used
        in 3dAllineate.
         _lpc.EPI : EPI volume for 3dAllineate's -base
         _lpc.ANAT: ANAT volume for 3dAllineate's -input
         _lpc.wt.EPI: weight volume for 3dAllineate's -weight
               
    The goodness of the alignment should always be assessed. At the face of it,
    most of 3dAllineate's cost functions, and those of registration programs
    from other packages, will produce a plausible alignment but it may not be
    the best. You need to examine the results carefully if alignment quality is
    crucial for your analysis.
    In the absence of a gold standard, and given the low contrast of EPI data,
    it is difficult to judge alignment quality by just looking at the two
    volumes. This is the case, even when you toggle quickly between one volume
    and the next; turning overlay off and using 'u' key in the slice window.
    To aid with the assessment of alignment, you can use the script
    @AddEdge. For each pair of volumes (E, A), @AddEdge finds the edges eE in E, 
    and eA in A, and creates a new version of E with both sets of edges. The 
    edges eE are given a low value, edges eA a higher value and the highest 
    value at voxels where eE and eA overlap. Although not all edges are 
    relevant, one can from experience focus on edges that are relevant. 
    Here is a simple example, where one can judge the improvement of alignment.
    Say we have anat+orig, epi+orig and we ran: 
      lpc_align.py -anat anat+orig -epi epi+orig 
    The relevant output of lpc_align.py is 
      anat_alepi+orig, _lpc.anat+orig, _lpc.epi+orig :
    To judge the improvement of alignment, we run:
      @AddEdge _lpc.epi+orig _lpc.anat+orig anat_alepi+orig 
      where the first option is the epi as passed to 3dAllineate. I recommend
      you use _lpc.epi+orig and _lpc.anat+orig rather than epi+orig and
      anat+orig, because edge enhancement is much better without skulls. 
      Anatomical volumes of various alignments with the EPI can be listed next.
      Here we are only examing pre- and post-lpc_align.py alignment.
    @AddEdge will create new, edge enhanced volumes with names starting by _ae. A
    new pair of volumes is created for each pair at input. Once done, @AddEdge
    proposes you run the following commands:
      afni -niml -yesplugouts &
      @AddEdge 
    With no options, @AddEdge will now cycle trough the pairs of (E,A)
    displaying an edge enhanced A in the backgroung and E in the foregound
    (colored). Assuming your colorscale is 'Spectrum:red_to_blue', the edges
    from the EPI are blue, edges from anatomical are orange and overlapping
    edges red. The script will open two slice viewers, navigate around to see
    how the contours match up. Remember that edges will not correspond perfectly
    and everywhere. Edges sometimes model different structures in different
    volumes. After all, if edges matched that well, we'd use them in
    registration! Look at the volumes closely and in different modes to
    appreciate what is being displayed. Although AFNI is being driven by the
    script, it is still fully interactive.
    @AddEdge then awaits user input at the shell to show the next pair of
    volumes. All you need is to hit enter, or enter the number of the pair 
    you want to examine next. A .jpg of the images is saved as you switch from
    one pair to the next. Cycling between one pair and the next, helps you
    appreciate which alignment is best.
    
    This script is still in very beta mode so please don't disseminate it to
    younguns. DO send us all the feedback you have and of course, let us know if
    it fails. We'll probably ask that you send us some data to look into it
    ourselves.
    
    Our abstract describing the alignment tools is available here:
      http://afni.nimh.nih.gov/sscc/rwcox/abstracts/file.2008-02-21.4176173435   
    
    ===========================================================================      

A full list of options for lpc_align.py:

   -epi                
   -anat               
   -mask               
      default:            vent
   -keep_rm_files      
   -prep_only          
   -help               
   -verb               
   -align_centers      
      allowed:            yes, no
      default:            no
   -strip_anat_skull   
      allowed:            yes, no
      default:            yes
   -epi_strip          
      allowed:            3dSkullStrip3dAutomask, None
      default:            3dSkullStrip
   -pow_mask           
      default:            1.0
   -bin_mask           
      allowed:            yes, no
      default:            no
   -box_mask           
      allowed:            yes, no
      default:            no
   -ex_mode            
      use:                Command execution mode.
                          quiet: execute commands quietly
                          echo: echo commands executed
                          dry_run: only echo commands
                          
      allowed:            quiet, echo, dry_run
      default:            echo
   -big_move           
   -partial_coverage   
   -Allineate_opts     
      use:                Options passed to 3dAllineate.
      default:            -lpc -weight_frac 1.0 -VERB -warp aff -maxrot 6 -maxshf 10 -source_automask+4 
   -perc               
      default:            50
   -fresh              
   -suffix             
      default:            _alepi




This page auto-generated on Thu Jan 20 11:01:33 EST 2011