{ Date: Wed, 25 Sep 1996 07:14:34 -0500 (CDT) From: norbert@mc.bio.uva.nl (Norbert Vischer) To: Multiple recipients of list Subject: Re: projecting maximum of stack slices > I want to project a stack onto a window, such that the result of (x,y) is > the maximum grey value found in any of the slices of the stack at (x,y). > I have been fiddling with the parameters but to no avail. Any kind soul who > has a hint maybe? > > ard Here is a working fragment of one of my project macros. The 'brightest point' selects low pixel values, the 'darkest point' selects high pixel values. Note that the 'darkest point' needs to invert the stack before projection. veel plezier, Norbert } {Brightest and darkest point projection} var stackpid: integer; procedure InvertStack; var i:integer; begin for i:= 1 to nSlices do begin SelectSlice(i); Invert; end; end; procedure DoProjection; begin SetProjection('Initial Angle',0); SetProjection('Total Rotation', 0); SetProjection('Rotation Angle Increment', 7) ; {not necessary} SetProjection('Surface Opacity',0); SetProjection('Surface Depth-Cueing',0); SetProjection('Interior Depth-Cueing',0); SetProjection('Minimize Window Size', 1); {0=false, 1=true} SetProjection('Y-Axis'); SetProjection('Brightest Point'); Project; end; macro 'First make a stack'; begin savestate; setbackgroundcolor(128); setfontsize(24); setnewsize(200, 200); makenewstack('demo stack'); setforeground(50); moveto(20, 50); writeln('Bright = 50'); addslice; addslice; setforeground(200); moveto(20, 50); writeln('Dark = 200'); restorestate; stackpid := pidnumber; end; macro 'Project darkest point'; var projectpid: integer; begin SelectPic(stackpid); InvertStack; DoProjection; projectpid := pidnumber; Invert; SelectPic(stackpid); invertStack; SelectPic(projectpid); end; macro 'Project brightest point'; begin SelectPic(stackpid); DoProjection; end;