SCM Repository
[diderot] / trunk / test / vr-MIP.diderot |
View of /trunk/test/vr-MIP.diderot
Parent Directory
|
Revision Log
Revision 163 -
(download)
(annotate)
Tue Jul 20 18:55:32 2010 UTC (11 years, 11 months ago) by jhr
File size: 1256 byte(s)
Tue Jul 20 18:55:32 2010 UTC (11 years, 11 months ago) by jhr
File size: 1256 byte(s)
Update examples with output variables
// vr-MIP.diderot // // maximum intensity projection in Diderot // input string dataFile; // name of dataset input real stepSz; // size of steps // e.g. 0.1 input vec3 eye; // location of eye point // e.g. (25,15,10) input vec3 orig; // location of pixel (0,0) // e.g. (8.83877,2.5911,7.65275) input vec3 cVec; // vector between pixels horizontally // e.g. (-0.0151831,0.0278357,0) input vec3 rVec; // vector between pixels vertically // e.g. (0.0074887,0.00408474,-0.0305383) image(3)[] img = load (dataFile); //field#1(3)[] F = convolve (bspln3, img); field#2(3)[] F = convolve (bspln3, img); actor RayCast (int row, int col) { vec3 pos = orig + real(row)*rVec + real(col)*cVec; vec3 dir = (pos - eye)/|pos - eye|; real t = 0.0; output real maxval = -inf; update { pos = pos + stepSz*dir; real val = F@pos; maxval = max(val, maxval); if (t > 20.0) stabilize; t = t + stepSz; } /* render: output maxval */ } initially [ RayCast(r, c) | r in 0..199, c in 0..199 ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |