Home > brede > brede_vol_origin.m

brede_vol_origin

PURPOSE ^

brede_vol_origin - Return origin of volume in 'vol' structure

SYNOPSIS ^

function origin = brede_vol_origin(V, varargin)

DESCRIPTION ^

 brede_vol_origin     - Return origin of volume in 'vol' structure

       origin = brede_vol_origin(V)

       Input:  V       'Vol' structure

       Output: origin  3-element vector with origin in voxel-indices
                       indexed from one

       Get the 'origin' field from the 'vol' structure. If the origin
       field is not defined the origin will be determined from the
       'x', 'y' and 'z' fields. If these are neither defined the the
       origin is reported as the middle of the volume, e.g., if
       the volume is 91 voxel wide then the origin for the x
       coordinate will be returned as 46.

       Example:
         f = fullfile(fileparts(which('brede')),'xml','cerebellum1.xml');
         V = brede_read_xml2vol(f);
         brede_vol_origin

       See also BREDE, BREDE_VOL, BREDE_VOL_REGISTER.

 $Id: brede_vol_origin.m,v 1.3 2009/11/16 20:10:33 fn Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005