Home > brede > brede_vol_mat2vol.m

brede_vol_mat2vol

PURPOSE ^

brede_vol_mat2vol - Convert vector/matrix to volume structure

SYNOPSIS ^

function S = brede_vol_mat2vol(X, varargin)

DESCRIPTION ^

 brede_vol_mat2vol    - Convert vector/matrix to volume structure

       function V = brede_vol_mat2vol(X, 'PropertyName', ...
          'PropertyValue')
       
       Input:    X   Volume in a column vector or 3D array

       Property: Description Textural description of the volume
                 Filename    Filename associated with the volume
                 Origin      Origin of the volume (The voxel index
                             corresponding to (0,0,0). 
                 VolumeSize  3-element with size of volume, necessary
                             if X is given as vector 
                 VoxelCoord  Coordinate for each voxel in meter    
                 VoxelSize   Voxel size in meter
                
       Output:   V   Volume structure 

       This function converts a matrix or a vector to a 'volume
       structure'. If a 3D array is used as 'X' it should have the
       x-coordinate in the rows, the y-coordinate in the columns and 
       the z-coordinate in the third dimension.

       It is required to give alignment information either by setting
       the 'VoxelCoord' property or the 'Origin' and 'VoxelSize'.

       A part from the required fields there are some optional field
       which might be useful to set as other functions can take
       advantage of the information. The fields are 'description' and
       'filename'.

       See brede_vol for definition of the fields in the 'vol'
       structure. 

       Examples:
         C = brede_vol_gencoord;
         V = somefunction(C);
         S = brede_vol_mat2vol(V, 'VoxelCoord', C);

         V = zeros(79,95,68); 
         S = brede_vol_mat2vol(V, 'Origin', [40 57 26], ...
               'VoxelSize', [0.002 0.002 0.002]);

       See also BREDE, BREDE_VOL, BREDE_VOL_GENCOORD,
                BREDE_READ_ANALYZE.

 $Id: brede_vol_mat2vol.m,v 1.11 2008/03/12 14:51:01 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