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

SCM Repository

[diderot] View of /branches/charisee/ertest/vispaper/iso3d/resamp.diderot
ViewVC logotype

View of /branches/charisee/ertest/vispaper/iso3d/resamp.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2941 - (download) (annotate)
Wed Mar 4 11:22:21 2015 UTC (6 years, 2 months ago) by glk
File size: 1102 byte(s)
for testing canny
/*

../../../bin/diderotc resamp.diderot \
 && ./resamp \
 && unu reshape -i resamp.txt -s 30 30 30 | \
    unu dnorm -o tmp.nrrd \
 && unu minmax tmp.nrrd

*/

int sz0 = 30;
int sz1 = 30;
int sz2 = 30;
real width = 2;
vec3 spc = [width/(sz0-1), width/(sz1-1), width/(sz2-1)];

vec3 pp = [0.0,0.0,0.0];
vec3 xdir = [spc[0], 0.0, 0.0];
vec3 ydir = [0.0, spc[1], 0.0];
vec3 zdir = [0.0, 0.0, spc[2]];
vec3 orig = -(xdir*(sz0-1) + ydir*(sz1-1) + zdir*(sz2-1))/2;

//field#2(3)[] V= bspln3 ⊛ load("gauss0.nrrd");
//field#0(3)[] func =|∇⊗∇V|; // doesn't work
//field#0(3)[] func = trace(∇⊗∇V);
//field#0(3)[] func = (∇⊗∇V):(∇⊗∇V);
//field#0(3)[] func = trace((∇⊗∇V)•(∇⊗∇V));

field#4(3)[] V= c4hexic ⊛ load("canny.nrrd");
field#3(3)[3] G = ∇V;
field#2(3)[3,3] H = ∇⊗∇V;
field#2(3)[] func = G•H•G/|G|;

strand sample(int xi, int yi, int zi) {
  output real vv = 0;
  update {
    vec3 p  = orig + xi*xdir + yi*ydir + zi*zdir;
    vv = func(p);
    stabilize;
  }
}
initially [ sample(xi, yi, zi) | zi in 0..(sz2-1), yi in 0..(sz1-1), xi in 0..(sz0-1) ];

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