SCM Repository
[diderot] / branches / pure-cfg / test / vr-MIP-test.diderot |
View of /branches/pure-cfg/test/vr-MIP-test.diderot
Parent Directory
|
Revision Log
Revision 585 -
(download)
(annotate)
Tue Mar 8 15:31:54 2011 UTC (9 years, 10 months ago) by jhr
File size: 899 byte(s)
Tue Mar 8 15:31:54 2011 UTC (9 years, 10 months ago) by jhr
File size: 899 byte(s)
Test driver
// vr-MIP-test.diderot // // test version of maximum intensity projection in Diderot // string dataFile = "../data/vox1.nrrd"; real stepSz = 0.1; vec3 eye = [-8.0, 2.0, 2.0]; vec3 orig = [0.0, 3.4036, 3.4036]; vec3 cVec = [0.0, -0.014036, 0.0]; vec3 rVec = [0.0, 0.0, -0.014036]; image(3)[] img = load (dataFile); field#2(3)[] F = img ⊛ bspln3; strand RayCast (int row, int col) { int r = row; // for debugging int c = col; // for debugging vec3 pos = orig + real(row)*rVec + real(col)*cVec; vec3 dir = (pos - eye)/|pos - eye|; real t = 0.0; output real maxval = -∞; update { pos = pos + stepSz*dir; if (inside (pos,F)) { 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 |