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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3102 - (download) (annotate)
Wed Mar 18 16:04:49 2015 UTC (4 years, 4 months ago) by glk
File size: 861 byte(s)
trying to get FA isosurfaces working
/*

to run:

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

*/

int sz0 = 60;
int sz1 = 60;
int sz2 = 60;
real width = 59;
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#0(3)[3,3] V= tent ⊛ image("tball.nrrd");
field#2(3)[3,3] E = V - trace(V)*identity[3,3]/3;
field#2(3)[] F = sqrt(3.0*E:E/(2.0*D:D));

strand sample(int xi, int yi, int zi) {
  output real vv = 0;
  update {
    vec3 p  = orig + xi*xdir + yi*ydir + zi*zdir;
    vv = F(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