source: trunk/loci/visbio/maxproj.m @ 485

Revision 485, 781 bytes checked in by curtis, 15 years ago (diff)

Move M files to main VisBio folder; update version number and what's new.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1function [result] = maxproj(pix, params)
2%maxproj computes a maximum intensity projection of the input planes
3%
4%  pix    - a 3D array of pixels dimensioned (Y, X, N)
5%  params - not used
6
7if size(pix, 1) == 0
8  if size(params, 1) == 0
9    % return parameter list with default values
10    % (no parameters for maxproj)
11    result = {};
12  else
13    % input dimensions must be prepended to parameter list
14    leny = params(1);
15    lenx = params(2);
16    num = params(3);
17
18    % return output image dimensions for the given
19    % input dimensions and parameter values
20    result = [leny lenx 1];
21  end
22else
23  % process pixels
24  leny = size(pix, 1);
25  lenx = size(pix, 2);
26  num = size(pix, 3);
27  for x = 1:lenx
28    for y = 1:leny
29      result(y,x,1) = max(pix(y,x,:));
30    end
31  end
32end
Note: See TracBrowser for help on using the repository browser.