// 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. (12.1373,4.78258,8.3972) input vec3 cVec; // vector between pixels horizontally // e.g. (-0.0135258,0.0247972,0) input vec3 rVec; // vector between pixels vertically // e.g. (0.00667124,0.00363886,-0.0272048) 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; real maxval = -inf; update { vec3 pt = pos + t*dir; real val = F@pt; maxval = max(val, maxval); if (t > 20) stabilize; t = t + stepSz; } /* render: output maxval */ } initially [ RayCast(r, c) | r in 0..199, c in 0..199 ];
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: z; } /* render: output maxval */ } initially [ RayCast(r, c) | r in 0..199, c in 0..199 ];