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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 854, Tue Apr 19 17:21:51 2011 UTC revision 864, Tue Apr 19 19:56:07 2011 UTC
# Line 1  Line 1 
1    
2    echo "for making RGB lookup table for curvature-based VR"
3    
4  echo "-1 1 -1 1" \  echo "-1 1 -1 1" \
5   | unu reshape -s 2 2 \   | unu reshape -s 2 2 \
6   | unu resample -s 200 200 -k tent -c node -o x.nrrd   | unu resample -s 201 201 -k tent -c node -o x.nrrd
7    
8  unu swap -a 0 1 -i x.nrrd \  unu swap -a 0 1 -i x.nrrd \
9   | unu flip -a 1 -o y.nrrd   | unu flip -a 1 -o y.nrrd
10    
11    echo "1 0 0   1 1 0   0 1 0   0 1 1  0 0 1" \
12     | unu reshape -s 3 5 -o cmap.txt
13    
14  unu 2op atan2 x.nrrd y.nrrd \  unu 2op atan2 x.nrrd y.nrrd \
15   | unu 3op clamp -0.7854 - 2.3562 \   | unu 3op clamp -0.7854 - 2.3562 \
16   | unu rmap -min -0.7854 -max 2.3562 -m cmap.txt -o hue.nhdr   | unu rmap -min -0.7854 -max 2.3562 -m cmap.txt -o hue.nhdr
17    
18    rm -f cmap.txt
19    
20  unu 2op + x.nrrd y.nrrd \  unu 2op + x.nrrd y.nrrd \
21   | unu 2op + - 0.03 | unu 2op x - 40 | unu 1op erf \   | unu 2op + - 0.03 | unu 2op x - 40 | unu 1op erf \
22   | unu 2op + 1 - | unu 2op / - 2 -o mask.nrrd   | unu 2op + 1 - | unu 2op / - 2 -o mask.nrrd
# Line 26  Line 34 
34  unu join -i sat.nrrd sat.nrrd sat.nrrd -a 0 -incr \  unu join -i sat.nrrd sat.nrrd sat.nrrd -a 0 -incr \
35   | unu 3op lerp - 0.65 hue.nhdr -o hue.nhdr   | unu 3op lerp - 0.65 hue.nhdr -o hue.nhdr
36    
 unu quantize -b 8 -min 0 -max 1 -i hue.nhdr \  
  | unu flip -a 2 -o hue.png  
   
37  rm -f x.nrrd y.nrrd mask.nrrd sat.nrrd  rm -f x.nrrd y.nrrd mask.nrrd sat.nrrd
38    
39  echo "space dimension: 2" >> hue.nhdr  echo "space dimension: 2" >> hue.nhdr
40  echo "space origin: (-0.2,-0.2)" >> hue.nhdr  echo "space origin: (-1.0,-1.0)" >> hue.nhdr
41  echo "space directions: none (0.002,0.0) (0.0,0.002)" >> hue.nhdr  echo "space directions: none (0.1,0.0) (0.0,0.1)" >> hue.nhdr
42  echo "kinds: RGB space space" >> hue.nhdr  echo "kinds: RGB space space" >> hue.nhdr
43    
44  unu dice -i hue.nhdr -a 0 -o ./ -ff hue-%d.nrrd  unu dice -i hue.nhdr -a 0 -o ./ -ff hue-%d.nrrd

Legend:
Removed from v.854  
changed lines
  Added in v.864

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