SCM Repository
[diderot] / trunk / test / vr-MIP.diderot |
View of /trunk/test/vr-MIP.diderot
Parent Directory
|
Revision Log
Revision 145 -
(download)
(annotate)
Fri Jul 9 08:14:51 2010 UTC (10 years, 6 months ago) by glk
File size: 1245 byte(s)
Fri Jul 9 08:14:51 2010 UTC (10 years, 6 months ago) by glk
File size: 1245 byte(s)
removed tabs, added example values for txs.nrrd MIP renderings
// vr-MIP.diderot // // maximum intensity projection in Diderot // input string dataFile; // name of dataset input real stepSz; // size of steps // e.g. 0.5 input vec3 eye; // location of eye point // e.g. (50,30,20) input vec3 orig; // location of pixel (0,0) // e.g. (16.7502,3.81144,16.1159) input vec3 cVec; // vector between pixels horizontally // e.g. (-0.0345728,0.0639965,0) input vec3 rVec; // vector between pixels vertically // e.g. (0.016857,0.00910666,-0.0701694) 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 ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |