fn_imvect
Contents
Syntax
x = fn_imvect(x,mask[,outputtype][,outsidevalue]) k = fn_imvect(ij,mask[,outsidevalue]) ij = fn_imvect(k,mask[,outsidevalue])
Description
switch between "image" and "vector" representation of the pixels in an image
Input:
- x array of size (nx,ny,nt,...) or (np,nt,...)
- mask logical array of size (nx,ny), such that sum(mask(:))==np,
or dimensions [nx ny] to create the mask true(nx,ny)
mask can also be a cell array of logical arrays: then operation
applies to succesive dimensions
- outputtype 'vector' or 'image': default behavior toggles
representation; by setting outputtype, x is unchanged if
is already has the desired representation
'maskimage': if input is the image, output will be the
masked image
- outsidevalue value to set outside the mask in the image [default=0]Output: - x array size became (np,nt,...) or (nx,ny,nt,...), respectively
See also fn_indices, fn_maskavg, fn_maskselect
Source
Thomas Deneux
Copyright 2011-2017