Home > . > read_imatext.m

# read_imatext

## PURPOSE

'read_imatext': reads the .civ file for image documentation (obsolete)

## SYNOPSIS

function [error,time,TimeUnit,mode,npx,npy,pxcmx,pxcmy]=read_imatext(fileinput);

## DESCRIPTION

    'read_imatext': reads the .civ file for image documentation (obsolete)
     fileinput: name of the documentation file
     time: matrix of times for the set of images
    pxcmx: scale along x in pixels/cm
    pxcmy: scale along y in pixels/cm

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- civ 'civ': function associated with the interface 'civ.fig' for PIV, spline interpolation and stereo PIV (patch)
- series 'series': master function associated to the GUI series.m for analysis field series
- uvmat 'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization

## SOURCE CODE

    0001 %'read_imatext': reads the .civ file for image documentation (obsolete)
    0002 % fileinput: name of the documentation file
    0003 % time: matrix of times for the set of images
    0004 %pxcmx: scale along x in pixels/cm
    0005 %pxcmy: scale along y in pixels/cm
    0006 function [error,time,TimeUnit,mode,npx,npy,pxcmx,pxcmy]=read_imatext(fileinput);
    0007 error=0;%default
    0008 time=[]; %default
    0009 TimeUnit='s';
    0010 mode='pairs';
    0011 npx=[]; %default
    0012 npy=[]; %default
    0013 pxcmx=1;%default
    0014 pxcmy=1;%default
    0015 if exist(fileinput,'file')~=2, error=2, return;end;%input file does not exist
    0016 dotciv=textread(fileinput);
    0017 sizdot=size(dotciv);
    0018 if ~isequal(sizdot(1)-8,dotciv(1,1));
    0019     error=1; %inconsistent number of bursts
    0020 end
    0021 nbfield=sizdot(1)-8;
    0022 npx=(dotciv(2,1));
    0023 npy=(dotciv(2,2));
    0024 pxcmx=(dotciv(6,1));% pixels/cm in the .civ file
    0025 pxcmy=(dotciv(6,2));
    0026 % nburst=dotciv(3,1); % nbre of bursts
    0027 abs_time1=dotciv([9:nbfield+8],2);
    0028 dtime=dotciv(5,1)*(dotciv([9:nbfield+8],[3:end-1])+1);
    0029 timeshift=[abs_time1 dtime];
    0030 time=cumsum(timeshift,2);