// 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 */ }