Changeset 354 for trunk/src/read_field.m
- Timestamp:
- Dec 30, 2011, 5:00:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_field.m
r334 r354 29 29 function [Field,ParamOut,errormsg] = read_field(ObjectName,FileType,ParamIn,num) 30 30 Field=[]; 31 ParamOut=[]; 31 if ~exist('num','var') 32 num=1; 33 end 34 if ~exist('ParamIn','var') 35 ParamIn=[]; 36 end 37 ParamOut=ParamIn;%default 32 38 errormsg=''; 33 39 if isfield(ParamIn,'VelType') … … 38 44 switch FileType 39 45 case {'civx','civdata','netcdf'} %read the first nc field 40 ParamOut.FieldName=ParamIn.FieldName;46 % ParamOut.FieldName=ParamIn.FieldName; 41 47 GUIName='get_field'; %default name of the GUI get_field 42 48 if isfield(ParamIn,'GUIName') … … 140 146 end 141 147 142 case ' movie'148 case 'video' 143 149 try 144 150 A=read(ObjectName,num); 145 FieldName='image';146 151 catch ME 147 errormsg=ME.message ;152 errormsg=ME.message 148 153 return 149 154 end 150 case 'avi' 151 try 152 mov=aviread(ObjectName,num); 153 catch ME 154 errormsg=ME.message; 155 return 156 end 157 A=frame2im(mov(1)); 158 FieldName='image'; 155 FieldName='image'; 156 % case 'avi' 157 % try 158 % mov=aviread(ObjectName,num); 159 % catch ME 160 % errormsg=ME.message; 161 % return 162 % end 163 % A=frame2im(mov(1)); 164 % FieldName='image'; 159 165 case 'vol' 160 166 A=imread(ObjectName);
Note: See TracChangeset
for help on using the changeset viewer.