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

SCM Repository

[diderot] View of /branches/vis12/data/txf/didthis-2d-bow.txt
ViewVC logotype

View of /branches/vis12/data/txf/didthis-2d-bow.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1685 - (download) (annotate)
Sun Jan 22 15:23:36 2012 UTC (7 years, 9 months ago) by jhr
File size: 1802 byte(s)
  Create a branch to implement things that we need for the Vis 2012 paper
echo "for making RGB lookup table for curvature-based VR"

echo "-1 1 -1 1" \
 | unu reshape -s 2 2 \
 | unu resample -s 201 201 -k tent -c node -o x.nrrd

unu swap -a 0 1 -i x.nrrd \
 | unu flip -a 1 -o y.nrrd

echo "0 0 1     0 1 1    0 1 0     1 1 0    1 0 0 " \
 | unu reshape -s 3 5 -o cmap.txt

unu 2op atan2 x.nrrd y.nrrd \
 | unu 3op clamp -0.7854 - 2.3562 \
 | unu rmap -min -0.7854 -max 2.3562 -m cmap.txt -o 2d-bow.nrrd

echo "0 1" \
 | unu reshape -s 2 \
 | unu resample -s 200 -k tent -c node \
 | unu rmap -m cmap.txt -r \
 | unu axinsert -a 1 \
 | unu pad -min 0 0 0 -max 2 199 M -o bow

unu 1op exists -i bow \
 | unu 2op / - 2 -o gray

echo "0 1" \
 | unu reshape -s 2 \
 | unu resample -s 200 -k tent -c node \
 | unu gamma -g 0.65 \
 | unu axinsert -a 0 \
 | unu axinsert -a 2 \
 | unu pad -min 0 0 0 -max 2 M 199 \
 | unu 3op lerp - gray bow \
 | unu axinfo -a 0 -k RGB \
 | unu axinfo -a 1 -mm 0 1 \
 | unu axinfo -a 2 -mm -2.35619449019234492884 0.78539816339744830961 \
 | ../../bin/dnorm -i - -o - \
 | unu pad -min 0 -3 -3 -max M M+3 M+3 -o 2d-bow-polar.nrrd

rm -f cmap.txt

unu 3op + 0.03 x.nrrd y.nrrd \
 | unu 2op x - 40 | unu 1op erf \
 | unu affine -1 - +1 0 1 -o mask.nrrd

unu join -i x.nrrd y.nrrd -a 0 -incr \
 | unu project -a 0 -m l2 \
 | unu gamma -g 0.75 \
 | unu 3op clamp 0 - 1 \
 | unu resample -s x1 x1 -k gauss:15,3 \
 | unu quantize -b 16 \
 | unu unquantize -i - -min 0 -max 1 \
 | unu 2op x - mask.nrrd -o sat.nrrd

unu join -i sat.nrrd sat.nrrd sat.nrrd -a 0 -incr \
 | unu 3op lerp - 0.65 2d-bow.nrrd -o 2d-bow.nrrd

unu axinfo -i 2d-bow.nrrd -a 0 -k RGB \
 | unu axinfo -a 1 -mm -1 1 \
 | unu axinfo -a 2 -mm -1 1 \
 | ../../bin/dnorm -i - -o - \
 | unu pad -min 0 -3 -3 -max M M+3 M+3 -o 2d-bow.nrrd

rm -f x.nrrd y.nrrd mask.nrrd sat.nrrd gray bow


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