Home > marsbar > @maroi_shape > maroi_shape.m

maroi_shape

PURPOSE ^

maroi_shape - (virtual) shape roi class constructor

SYNOPSIS ^

function [o, others] = maroi_shape(params)

DESCRIPTION ^

 maroi_shape - (virtual) shape roi class constructor
 FORMAT [o, others] = maroi_shape(params)
 Inputs [defaults]
 params  - a structure containing any fields for a maroi parent
 
 Only used by inheriting objects

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [o, others] = maroi_shape(params)
0002 % maroi_shape - (virtual) shape roi class constructor
0003 % FORMAT [o, others] = maroi_shape(params)
0004 % Inputs [defaults]
0005 % params  - a structure containing any fields for a maroi parent
0006 %
0007 % Only used by inheriting objects
0008 %
0009 % $Id$
0010 
0011 myclass = 'maroi_shape';
0012 defstruct = struct('shape', []);
0013 
0014 if nargin < 1
0015   params = [];
0016 end
0017 if isa(params, myclass)
0018   o = params;
0019   return
0020 end
0021 
0022 % fill with defaults
0023 pparams = mars_struct('ffillmerge', defstruct, params);
0024 
0025 % umbrella object, parse out fields for (this object and children)
0026 [uo, pparams] = maroi(pparams);
0027 
0028 % reparse parameters into those for this object, children
0029 [pparams, others] = mars_struct('split', pparams, defstruct);
0030 
0031 o = class(pparams, myclass, uo);
0032 
0033 return

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019