Home > brede > brede_read_xml2vol.m

brede_read_xml2vol

PURPOSE ^

brede_read_xml2vol - Read a XML file with a volume

SYNOPSIS ^

function V = brede_read_xml2vol(filename, varargin)

DESCRIPTION ^

 brede_read_xml2vol   - Read a XML file with a volume

       V = brede_read_xml2vol(filename)

       Input:   filename  Filename as string

       Output:  V         'Vol' structure

       Read a volume from an XML file. Presently only runlength
       encoding from brede_write_vol2xml is implemented. This sets up
       a binary volume.
 
       Run length decoding is performed as
         indices = cumsum(runlength)
         V.volume(indices(1):indices(1+1)-1) = 1
         V.volume(indices(2):indices(2+1)-1) = 1
         V.volume(indices(3):indices(3+1)-1) = 1
         ...

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

       See also BREDE, BREDE_READ, BREDE_VOL, BREDE_WRITE,
                BREDE_READ_XML, BREDE_READ_ANALYZE,
                BREDE_READ_VOLUMES, BREDE_WRITE_VOL2XML.

 $Id: brede_read_xml2vol.m,v 1.1 2005/10/05 13:15:03 fnielsen Exp $

CROSS-REFERENCE INFORMATION ^

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