Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/charisee_dev/test/zslice1.diderot
ViewVC logotype

Annotation of /branches/charisee_dev/test/zslice1.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3063 - (view) (download)
Original Path: branches/charisee/test/zslice1.diderot

1 : jhr 1115 // zslice1.diderot
2 : cchiw 2846 //unu reshape -i zslice1.txt -s 200 200 | unu 2op exists - 0.1 | unu quantize -b 8 -o zslice1.png
3 : jhr 1115
4 : cchiw 2846
5 : jhr 1115 string dataFile = "../data/zimg.nrrd";
6 :     int dataSize = 9;
7 :     int imgSize = 200;
8 :     vec3 orig = [0.0, 0.0, 4.0];
9 :     vec3 cVec = [0.0, 1.0, 0.0];
10 :     vec3 rVec = [1.0, 0.0, 0.0];
11 : jhr 3063 image(3)[] img = image (dataFile);
12 : jhr 1115 field#2(3)[] F = img ⊛ bspln3;
13 :    
14 :     strand RayCast (int row, int col)
15 :     {
16 :     real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);
17 :     real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
18 :     vec3 pos = orig + rr*rVec + cc*cVec;
19 :     output real val = -∞;
20 :    
21 :     update
22 :     {
23 :     if (inside (pos,F)) {
24 :     val = 1.0;
25 :     }
26 :     stabilize;
27 :     }
28 :     }
29 :    
30 :     initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ];

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0