F = loadvec(FILENAME) loads the vector/image field(s) matching FILENAME
into a PIVMat structure array F.
Supported file formats are:
DaVis (LaVision) .VC7, .TXT
Insight (TSI) .VEC
DynamicStudio (Dantec) .TXT, .MAT
OpenPIV (A. Liberzon) .VEC, .TXT
PIVLab (W. Thielicke) .MAT
PIV plugin for ImageJ (NIH) .TXT
VidPIV (Oxford Laser) .DAT, .TXT
MatPIV (J. Kristian Sveen) .MAT
DPIVSoft (Meunier & Leweke) .MAT
any vector field saved from vec2mat .MAT
Images from DaVis (LaVision) .IMX, IMG, IM7
Set of vector fields from DaVis .SET
Vector field from Optical Flow .CM0, UWO
AVI/MP4 movies .AVI, MP4
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.
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.
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 ([]).
loadvec(...,'verbose') displays 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
v=loadvec('mypivdata.mat');
v=loadvec(1:10);
showf(loadvec('*.vc7'));
showf(vec2scal(loadvec('B00001.vc7'),'rot'));
v=loadvec('B[2:2:6]*.v*');
v=loadvec('*','verbose');
See Also
showf, rdir, loadarrayvec, vec2mat, convert3dto2df,
filterf, vec2scal, batchf, zerotonanfield, nantozerofield.
Published output in the Help browser
showdemo loadvec