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 776 -
(download)
(annotate)
Thu Apr 7 21:50:30 2011 UTC (11 years, 2 months ago) by glk
File size: 1180 byte(s)
Thu Apr 7 21:50:30 2011 UTC (11 years, 2 months ago) by glk
File size: 1180 byte(s)
camera tweaks, and more consistent use of normalize
// vr-MIP-test.diderot // // test version of maximum intensity projection in Diderot // //string dataFile = "../data/txs.nrrd"; //vec3 eye = [25.0, 15.0, 10.0]; //vec3 orig = [8.83877,2.5911,7.65275]; //vec3 cVec = [-0.0151831,0.0278357,0.0]; //vec3 rVec = [0.0074887,0.00408474,-0.0305383]; string dataFile = "../data/vfrhand-nohip.nhdr"; vec3 eye = [127.331,-1322.05,272.53]; vec3 orig = [122.835,17.7112,188.044]; vec3 cVec = [-0.00403611,-0.029826,-0.244066]; vec3 rVec = [-0.245595,-0.0112916,0.00544129]; real stepSz = 0.5; image(3)[] img = load (dataFile); field#2(3)[] F = img ⊛ bspln3; //field#0(3)[] F = img ⊛ tent; 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 = normalize(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 > 80.0) stabilize; t = t + stepSz; } /* render: output maxval */ } initially [ RayCast(r, c) | r in 0..479, c in 0..639 ];
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |