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

SCM Repository

[diderot] View of /branches/pure-cfg/data/didthis-hue.txt
ViewVC logotype

View of /branches/pure-cfg/data/didthis-hue.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 855 - (download) (annotate)
Tue Apr 19 17:24:25 2011 UTC (8 years, 9 months ago) by glk
File size: 1205 byte(s)
tweaks
echo "for making RGB lookup table for curvature-based VR"

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

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

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 hue.nhdr

unu 2op + x.nrrd y.nrrd \
 | unu 2op + - 0.03 | unu 2op x - 40 | unu 1op erf \
 | unu 2op + 1 - | unu 2op / - 2 -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:10,3 \
 | unu 2op - - 0.02 \
 | unu 2op x - 1.03 \
 | unu 3op clamp 0 - 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 hue.nhdr -o hue.nhdr

unu quantize -b 8 -min 0 -max 1 -i hue.nhdr \
 | unu flip -a 2 -o hue.png

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

echo "ACTUALLY this is not centered around 0,0 and needs to be"
echo "space dimension: 2" >> hue.nhdr
echo "space origin: (-0.205,-0.205)" >> hue.nhdr
echo "space directions: none (0.00205,0.0) (0.0,0.00205)" >> hue.nhdr
echo "kinds: RGB space space" >> hue.nhdr

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