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

SCM Repository

[diderot] Annotation of /branches/fem/test/zslice-rgb.diderot
ViewVC logotype

Annotation of /branches/fem/test/zslice-rgb.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1115 - (view) (download)
Original Path: trunk/test/zslice-rgb.diderot

1 : jhr 1115 // to process output:
2 :     //
3 :     // unu reshape -i mip.txt -s 3 200 200 | unu quantize -b 8 -o zslice-rgb.png
4 :    
5 :     int imgRes = 200;
6 :     int dataRes = 110;
7 :    
8 :     field#0(2)[3] RGB= load("../data/txf/2d-bow.nrrd") ⊛ tent;
9 :    
10 :     strand RayCast (int ui, int vi)
11 :     {
12 :     int u = ui;
13 :     int v = vi;
14 :     vec2 pos = [lerp(-1.0, 1.0, -0.5, real(ui), real(imgRes)-0.5),
15 :     lerp(-1.0, 1.0, -0.5, real(vi), real(imgRes)-0.5)];
16 :     output vec3 rgb = [0.0,0.0,0.0];
17 :    
18 :     update
19 :     {
20 :    
21 :     // How to probe the per-component images
22 :     //rgb = [RR(pos),GG(pos),BB(pos)] if inside(pos,RR) else [0.0,0.0,0.0];
23 :    
24 :     // How to probe the single RGB image
25 :     rgb = RGB(pos) if inside(pos,RGB) else [0.0,0.0,0.0];
26 :    
27 :     stabilize;
28 :     }
29 :     }
30 :    
31 :     initially [ RayCast(ui, vi) | vi in 0..(imgRes-1), ui in 0..(imgRes-1) ];

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