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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 855 - (view) (download)

1 : glk 855
2 :     echo "for making RGB lookup table for curvature-based VR"
3 :    
4 : glk 854 echo "-1 1 -1 1" \
5 :     | unu reshape -s 2 2 \
6 :     | unu resample -s 200 200 -k tent -c node -o x.nrrd
7 :    
8 :     unu swap -a 0 1 -i x.nrrd \
9 :     | unu flip -a 1 -o y.nrrd
10 :    
11 :     unu 2op atan2 x.nrrd y.nrrd \
12 :     | unu 3op clamp -0.7854 - 2.3562 \
13 :     | unu rmap -min -0.7854 -max 2.3562 -m cmap.txt -o hue.nhdr
14 :    
15 :     unu 2op + x.nrrd y.nrrd \
16 :     | unu 2op + - 0.03 | unu 2op x - 40 | unu 1op erf \
17 :     | unu 2op + 1 - | unu 2op / - 2 -o mask.nrrd
18 :    
19 :     unu join -i x.nrrd y.nrrd -a 0 -incr \
20 :     | unu project -a 0 -m l2 \
21 :     | unu gamma -g 0.75 \
22 :     | unu 3op clamp 0 - 1 \
23 :     | unu resample -s x1 x1 -k gauss:10,3 \
24 :     | unu 2op - - 0.02 \
25 :     | unu 2op x - 1.03 \
26 :     | unu 3op clamp 0 - 1 \
27 :     | unu 2op x - mask.nrrd -o sat.nrrd
28 :    
29 :     unu join -i sat.nrrd sat.nrrd sat.nrrd -a 0 -incr \
30 :     | unu 3op lerp - 0.65 hue.nhdr -o hue.nhdr
31 :    
32 :     unu quantize -b 8 -min 0 -max 1 -i hue.nhdr \
33 :     | unu flip -a 2 -o hue.png
34 :    
35 :     rm -f x.nrrd y.nrrd mask.nrrd sat.nrrd
36 :    
37 : glk 855 echo "ACTUALLY this is not centered around 0,0 and needs to be"
38 : glk 854 echo "space dimension: 2" >> hue.nhdr
39 : glk 855 echo "space origin: (-0.205,-0.205)" >> hue.nhdr
40 :     echo "space directions: none (0.00205,0.0) (0.0,0.00205)" >> hue.nhdr
41 : glk 854 echo "kinds: RGB space space" >> hue.nhdr

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