Code covered by the BSD License  

Highlights from
PIVMat 3.02

image thumbnail

PIVMat 3.02

by

 

27 Apr 2006 (Updated )

A PIV Post-processing and data analysis toolbox

loadvec (PIVMat Toolbox)
loadvec (PIVMat Toolbox)
PIVMat Function Reference<< Prev | Next >> 
loadvec
Loads vector/image fields

Description
F = loadvec(FILENAME) loads the vector/image fields matching FILENAME 
into a PIVMat structure array F. 
 
Supported file formats are: 
  .VEC, VC7       2D/3D vector fields from DaVis (LaVision) 
  .MAT            2D/3D vector fields from DPIVSoft (Meunier & Leweke, 
                  2003), MatPIV (J. Kristian Sveen), and DaVis files 
                  converted from vec2mat 
  .IMX, IMG, IM7  Image from DaVis (LaVision) 
  .DAT            Vector fields from VidPIV (Oxford Laser) 
  .TXT            Vector fields in text format from DaVis (LaVision) 
  .SET            Set of vector fields from DaVis. 
  .CM0, UWO       Vector field from Optical Flow. 
 
The PIVMat structure array F can be displayed using showf. See the page 
'Importing data into PIVMat' in the PIVMat documentation browser to 
learn more about loadvec. 
 
A file may also be loaded by clicking on the Current Directory browser 
(but multiple file selection is not allowed). 
 
loadvec without input argument first opens a dialog box for file 
selection. 
 
Note: When used with DaVis files, loadvec needs the READIMX package 
from LaVision to be installed. See the installation procedure of 
PIVMat. See vec2mat to convert DaVis files into Mat-files in 
order to load them on systems without ReadIMX. 
 
To load more than one file into a structure array, you may use 
wildcards ('*') in the filename, e.g., loadvec('B*.vc7'). Chained 
wildcards may also be used in directory names, e.g. 
loadvec('PIV*/B*.VC7'); 
 
For file enumeration, use the bracket ([]) syntax in the filename. 
For example, F = loadvec('B[2:2:6].vc7') loads the files 'B00002.vc7', 
'B00004.vc7', 'B00006.vc7'. See rdir for more details about the bracket 
syntax. 
 
F = loadvec(NUM) loads the file number NUM from the current directory 
(works in alphanumeric order, only for VEC/VC7 and IMX/IM7 files). 
NUM may be a simple number or any valid MATLAB vector (e.g., 1:10, 
[1 10], 2:2:8, 10:-1:1, etc.) 
 
If FILENAME is a cell array, (e.g. {'B1.vc7','B2.vc7'}), then loadvec 
loads all the files in the structure array F. Each string in the cell 
array may contain wildcards ('*') and brackets ([]). 
 
For multi-frame images, F = loadvec(FILENAME, 'frame', N) returns only 
the frame N. 
 
loadvec(...,'verbose') prints out the file names being loaded. 
 
loadvec file_name or loadvec('file_name') without output argument is a 
shortcut for showf(loadvec('file_name')). 
 
For vector fields, the PIVMat structure F contains the following fields: 
   x,y         vectors containing the X and Y coordinates 
   vx,vy (vz)  matrices of the x, y (and z) components of the velocity 
   ysign      string, upward or downward Y axis 
   namevx, unitvx, namex, unitx...   strings 
   name        name of the VEC/VC7 file from which originates V 
   setname     name of the parent directory (called 'SET' in DaVis) 
   Attributes  Additional informations from DaVis (see getattribute) 
   choice      An array of 6 integers, giving the 1st, 2nd, 3rd, 4th 
               choice vectors, the number of filled/processed vectors 
               and the number of missing vectors. 
   history     Remind from which command V has been obtained 
 
For scalar fields, the PIVMat structure is identical, except that vx 
and vy are replaced by w (idem for namevx,...) 
 
Examples
 
   loadvec B00001.vc7 
   showf(loadvec('*.vc7')); 
   showf(vec2scal(loadvec('B00001.vc7'),'rot')); 
   v=loadvec('B[2:2:6]*.v*'); 
   v=loadvec({'data1.set','data2.set'}); 
   v=loadvec(1:10); 
   v=loadvec('*','verbose'); 
 
See Also
showf, rdir, loadarrayvec, vec2mat, convert3dto2df, 
filterf, vec2scal, batchf, zerotonanfield, nantozerofield. 
 
Published output in the Help browser 
   showdemo loadvec 

 Previous: loadpivtxtNext: lsw 

2005-2013 PIVMat Toolbox 3.02

Contact us