SCM Repository
[diderot] / trunk / test / vr-MIP.diderot |
View of /trunk/test/vr-MIP.diderot
Parent Directory
|
Revision Log
Revision 41 -
(download)
(annotate)
Wed Mar 3 17:38:27 2010 UTC (12 years, 4 months ago) by glk
File size: 676 byte(s)
Wed Mar 3 17:38:27 2010 UTC (12 years, 4 months ago) by glk
File size: 676 byte(s)
new example
// vr.diderot // // maximum intensity projection in Diderot // input string dataFile; // name of dataset input real stepSz; // size of steps input vec<3> light; input int wid = 640; input int ht = 480; image[3] img = load (dataFile); field#1[3] F = convolve (bspln3, img); actor RayCast (int row, int col) { vec<3> dir = (real(row), real(col), 0.0); vec<3> pos = (0.0, 0.0, 0.0); real t = 0.0; real maxval = -inf; int num = 0; update { vec<3> pt = pos + t*dir; real val = F@pt; maxval = max(val, maxval); if (t > 1) stabilize; t = t + stepSz; num = num + 1; } /* render: output maxval */ }
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |