- Timestamp:
- Mar 8, 2015, 3:14:49 AM (9 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r5094 r5098 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: flowvisviewer - 3D flow rendering 4 #5 4 # 6 5 # This widget performs volume and flow rendering on 3D scalar/vector datasets. … … 65 64 public method limits { cname } 66 65 public method overMarker { m x } 67 public method parameters {title args} { 68 # do nothing 66 public method parameters {title args} { 67 # do nothing 69 68 } 70 69 public method removeDuplicateMarker { m x } … … 89 88 private method CurrentVolumeIds {{what -all}} 90 89 private method Disconnect {} 91 private method EventuallyResize { w h } 92 private method EventuallyGoto { nSteps } 93 private method EventuallyResizeLegend { } 90 private method EventuallyResize { w h } 91 private method EventuallyGoto { nSteps } 92 private method EventuallyResizeLegend { } 94 93 private method FlowCmd { dataobj comp nbytes extents } 95 private method GetDatasetsWithComponent { cname } 94 private method GetDatasetsWithComponent { cname } 96 95 private method GetFlowInfo { widget } 97 96 private method GetMovie { widget width height } … … 103 102 private method ParseLevelsOption { tf levels } 104 103 private method ParseMarkersOption { tf markers } 105 private method QuaternionToView { q } { 104 private method QuaternionToView { q } { 106 105 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break 107 106 } … … 117 116 private method Slice {option args} 118 117 private method SlicerTip {axis} 119 private method ViewToQuaternion {} { 118 private method ViewToQuaternion {} { 120 119 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)] 121 120 } 122 121 private method WaitIcon { option widget } 123 122 private method Zoom {option} 124 private method arrows { tag name } 125 private method box { tag name } 126 private method millisecs2str { value } 127 private method particles { tag name } 128 private method str2millisecs { value } 129 private method streams { tag name } 123 private method arrows { tag name } 124 private method box { tag name } 125 private method millisecs2str { value } 126 private method particles { tag name } 127 private method str2millisecs { value } 128 private method streams { tag name } 130 129 131 130 private variable _arcball "" … … 133 132 private variable _allDataObjs 134 133 private variable _obj2ovride ;# maps dataobj => style override 135 private variable _serverObjs ;# maps dataobj-component to volume ID 134 private variable _serverObjs ;# maps dataobj-component to volume ID 136 135 # in the server 137 private variable _recvObjs ; # list of data objs to send to server136 private variable _recvObjs ; # list of data objs to send to server 138 137 private variable _obj2style ;# maps dataobj-component to transfunc 139 private variable _style2objs ;# maps tf back to list of 138 private variable _style2objs ;# maps tf back to list of 140 139 # dataobj-components using the tf. 141 private variable _obj2flow; 142 143 private variable _reset 1 ; # Connection to server has been reset140 private variable _obj2flow; # Maps dataobj-component to a flow. 141 142 private variable _reset 1 ;# Connection to server has been reset 144 143 private variable _click ;# info used for rotate operations 145 144 private variable _limits ;# autoscale min/max for all axes 146 145 private variable _view ;# view params for 3D view 147 private variable _isomarkers 146 private variable _isomarkers ;# array of isosurface level values 0..1 148 147 private common _settings 149 148 private variable _activeTf "" ;# The currently active transfer function. 150 149 private variable _first "" ;# This is the topmost volume. 151 private variable _volcomponents ; # Array of components found 152 private variable _componentsList ; # Array of components found150 private variable _volcomponents ; # Array of components found 151 private variable _componentsList ; # Array of components found 153 152 private variable _nextToken 0 154 153 private variable _icon 0 155 154 private variable _flow 156 # This157 # indicates which isomarkers and transfer158 # function to use when changing markers,159 # opacity, or thickness.160 155 private common _downloadPopup ;# download options from popup 161 156 … … 198 193 $_dispatcher register !play 199 194 $_dispatcher dispatch $this !play "[itcl::code $this flow next]; list" 200 195 201 196 # Draw legend event 202 197 $_dispatcher register !goto … … 239 234 $this-qy $_view(-qy) 240 235 $this-qz $_view(-qz) 241 $this-zoom $_view(-zoom) 236 $this-zoom $_view(-zoom) 242 237 $this-xpan $_view(-xpan) 243 238 $this-ypan $_view(-ypan) … … 330 325 -offimage [Rappture::icon cutbutton] \ 331 326 -variable [itcl::scope _settings($this-cutplaneVisible)] \ 332 -command [itcl::code $this AdjustSetting cutplaneVisible] 327 -command [itcl::code $this AdjustSetting cutplaneVisible] 333 328 } 334 329 Rappture::Tooltip::for $itk_component(cutplane) \ … … 361 356 [itcl::code $this EventuallyResizeLegend] 362 357 363 # Hack around the Tk panewindow. The problem is that the requested 358 # Hack around the Tk panewindow. The problem is that the requested 364 359 # size of the 3d view isn't set until an image is retrieved from 365 360 # the server. So the panewindow uses the tiny size. … … 369 364 0,0 $itk_component(3dview) -fill both -reqwidth $w \ 370 365 1,0 $itk_component(legend) -fill x 371 blt::table configure $itk_component(plotarea) r1 -resize none 366 blt::table configure $itk_component(plotarea) r1 -resize none 372 367 # Create flow controls... 373 368 374 369 itk_component add flowcontrols { 375 frame $itk_interior.flowcontrols 370 frame $itk_interior.flowcontrols 376 371 } { 377 372 usual … … 420 415 -offimage [Rappture::icon flow-play] \ 421 416 -variable [itcl::scope _settings($this-play)] \ 422 -command [itcl::code $this flow toggle] 417 -command [itcl::code $this flow toggle] 423 418 } 424 419 set fg [option get $itk_component(hull) font Font] … … 472 467 } { 473 468 usual 474 ignore -highlightthickness 469 ignore -highlightthickness 475 470 rename -background -controlbackground controlBackground Background 476 471 } … … 481 476 } { 482 477 usual 483 ignore -highlightthickness 478 ignore -highlightthickness 484 479 rename -background -controlbackground controlBackground Background 485 480 } … … 491 486 } { 492 487 usual 493 ignore -highlightthickness 488 ignore -highlightthickness 494 489 rename -background -controlbackground controlBackground Background 495 490 } … … 508 503 0,4 $itk_component(dial) -fill x -padx {2 0 } \ 509 504 0,5 $itk_component(duration) -padx { 0 0} \ 510 0,7 $itk_component(speed) -padx {2 3} 511 512 # 0,6 $itk_component(speedlabel) -padx {2 0} 505 0,7 $itk_component(speed) -padx {2 3} 506 507 # 0,6 $itk_component(speedlabel) -padx {2 0} 513 508 blt::table configure $itk_component(flowcontrols) c* -resize none 514 509 blt::table configure $itk_component(flowcontrols) c4 -resize both … … 710 705 # If anything changed, then rebuild the plot 711 706 if {$changed} { 712 # Repair the reverse lookup 707 # Repair the reverse lookup 713 708 foreach tf [array names _style2objs] { 714 709 set list {} … … 743 738 -opacity 0.5 744 739 } 745 array unset _limits 746 array unset _volcomponents 740 array unset _limits 741 array unset _volcomponents 747 742 foreach dataobj $args { 748 743 if { ![$dataobj isvalid] } { … … 888 883 return 0 889 884 } 890 set _reset 1 885 set _reset 1 891 886 set result [VisViewer::Connect $_hosts] 892 887 if { $result } { … … 898 893 set info {} 899 894 set user "???" 900 895 if { [info exists env(USER)] } { 901 896 set user $env(USER) 902 897 } 903 898 set session "???" 904 899 if { [info exists env(SESSION)] } { 905 900 set session $env(SESSION) 906 901 } 907 902 lappend info "version" "$Rappture::version" 908 903 lappend info "build" "$Rappture::build" … … 1005 1000 $_image(plot) configure -data $bytes 1006 1001 #puts stderr "image received [image width $_image(plot)] by [image height $_image(plot)]" 1007 } 1002 } 1008 1003 "print" { 1009 1004 set tag $this-$info(-token) 1010 1005 set _hardcopy($tag) $bytes 1011 } 1006 } 1012 1007 "movie" { 1013 1008 set tag $this-$info(-token) … … 1025 1020 # The procedure is the response from the render server to each "legend" 1026 1021 # command. The server sends back a "legend" command invoked our 1027 # the slave interpreter. The purpose is to collect data of the image 1022 # the slave interpreter. The purpose is to collect data of the image 1028 1023 # representing the legend in the canvas. In addition, the isomarkers 1029 1024 # of the active transfer function are displayed. 1030 1025 # 1031 1026 # I don't know is this is the right place to display the isomarkers. 1032 # I don't know all the different paths used to draw the plot. There's 1027 # I don't know all the different paths used to draw the plot. There's 1033 1028 # "Rebuild", "add", etc. 1034 1029 # … … 1115 1110 # Called automatically whenever something changes that affects the data 1116 1111 # in the widget. Clears any existing data and rebuilds the widget to 1117 # display new data. 1112 # display new data. 1118 1113 # 1119 1114 itcl::body Rappture::FlowvisViewer::Rebuild {} { … … 1128 1123 # Turn on buffering of commands to the server. We don't want to 1129 1124 # be preempted by a server disconnect/reconnect (which automatically 1130 # generates a new call to Rebuild). 1125 # generates a new call to Rebuild). 1131 1126 StartBufferingCommands 1132 1127 … … 1482 1477 record { 1483 1478 if { [$itk_component(rewind) cget -relief] != "sunken" } { 1484 $itk_component(rewind) configure -relief sunken 1485 $itk_component(stop) configure -relief raised 1486 $itk_component(play) configure -relief raised 1479 $itk_component(rewind) configure -relief sunken 1480 $itk_component(stop) configure -relief raised 1481 $itk_component(play) configure -relief raised 1487 1482 set inner $itk_component(settingsFrame) 1488 1483 set frames [$inner.framecnt value] … … 1494 1489 stop { 1495 1490 if { [$itk_component(stop) cget -relief] != "sunken" } { 1496 $itk_component(rewind) configure -relief raised 1497 $itk_component(stop) configure -relief sunken 1498 $itk_component(play) configure -relief raised 1491 $itk_component(rewind) configure -relief raised 1492 $itk_component(stop) configure -relief sunken 1493 $itk_component(play) configure -relief raised 1499 1494 _pause 1500 1495 set cmds "flow reset" … … 1505 1500 if { [$itk_component(play) cget -relief] != "sunken" } { 1506 1501 $itk_component(rewind) configure -relief raised 1507 $itk_component(stop) configure -relief raised 1502 $itk_component(stop) configure -relief raised 1508 1503 $itk_component(play) configure \ 1509 1504 -image [Rappture::icon flow-pause] \ 1510 -relief sunken 1505 -relief sunken 1511 1506 bind $itk_component(play) <ButtonPress> \ 1512 1507 [itcl::code $this _pause] … … 1548 1543 $itk_component(play) configure \ 1549 1544 -image [Rappture::icon flow-start] \ 1550 -relief raised 1545 -relief raised 1551 1546 bind $itk_component(play) <ButtonPress> \ 1552 1547 [itcl::code $this Flow movie play toggle] … … 1576 1571 switch -- $what { 1577 1572 colormap { 1578 set color [$itk_component(colormap) value] 1579 set _settings(colormap) $color 1580 #ResetColormap $color 1573 set color [$itk_component(colormap) value] 1574 set _settings(colormap) $color 1575 #ResetColormap $color 1581 1576 } 1582 1577 ambient { … … 1667 1662 blt::table $itk_component(plotarea) \ 1668 1663 0,0 $itk_component(3dview) -fill both \ 1669 1,0 $itk_component(legend) -fill x 1664 1,0 $itk_component(legend) -fill x 1670 1665 blt::table configure $itk_component(plotarea) r1 -resize none 1671 1666 } else { … … 1690 1685 set bool $_settings($this-$what) 1691 1686 if { [isconnected] } { 1692 set vols [CurrentVolumeIds -cutplanes] 1687 set vols [CurrentVolumeIds -cutplanes] 1693 1688 SendCmd "cutplane state $bool $axis $vols" 1694 1689 } … … 1794 1789 # reference. 1795 1790 # 1796 # FIXME: The current way we generate transfer-function names completely 1797 # ignores the -markers option. The problem is that we are forced 1798 # to compute the name from an increasing complex set of values: 1791 # FIXME: The current way we generate transfer-function names completely 1792 # ignores the -markers option. The problem is that we are forced 1793 # to compute the name from an increasing complex set of values: 1799 1794 # color, levels, marker, opacity. I think the cow's out of the 1800 1795 # barn on this one. … … 1942 1937 $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground) 1943 1938 $m relval $x 1944 lappend _isomarkers($tf) $m 1939 lappend _isomarkers($tf) $m 1945 1940 } 1946 1941 } else { … … 1949 1944 $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground) 1950 1945 $m relval $x 1951 lappend _isomarkers($tf) $m 1946 lappend _isomarkers($tf) $m 1952 1947 } 1953 1948 } … … 1956 1951 # 1957 1952 # The -markers option takes a list of zero or more values (the values 1958 # may be separated either by spaces or commas) that have the following 1953 # may be separated either by spaces or commas) that have the following 1959 1954 # format: 1960 1955 # … … 1972 1967 set n [scan $marker "%g%s" value suffix] 1973 1968 if { $n == 2 && $suffix == "%" } { 1974 # ${n}% : Set relative value. 1969 # ${n}% : Set relative value. 1975 1970 set value [expr {$value * 0.01}] 1976 1971 set m [Rappture::IsoMarker \#auto $c $this $tf] … … 1989 1984 1990 1985 # ---------------------------------------------------------------------- 1991 # USAGE: UndateTransferFuncs 1986 # USAGE: UndateTransferFuncs 1992 1987 # ---------------------------------------------------------------------- 1993 1988 itcl::body Rappture::FlowvisViewer::updateTransferFunctions {} { … … 1999 1994 error "active transfer function isn't set" 2000 1995 } 2001 set tf $_activeTf 1996 set tf $_activeTf 2002 1997 set c $itk_component(legend) 2003 1998 set m [Rappture::IsoMarker \#auto $c $this $tf] … … 2158 2153 2,0 $inner.outline -cspan 2 -anchor w \ 2159 2154 3,0 $inner.volume -cspan 2 -anchor w \ 2160 4,0 $inner.legend -cspan 2 -anchor w 2155 4,0 $inner.legend -cspan 2 -anchor w 2161 2156 2162 2157 bind $inner <Map> [itcl::code $this GetFlowInfo $inner] … … 2225 2220 label $inner.thick -text "Thick" -font $fg 2226 2221 2227 label $inner.colormap_l -text "Colormap" -font "Arial 9" 2222 label $inner.colormap_l -text "Colormap" -font "Arial 9" 2228 2223 itk_component add colormap { 2229 2224 Rappture::Combobox $inner.colormap -width 10 -editable no … … 2367 2362 $inner configure -borderwidth 4 2368 2363 2369 label $inner.view_l -text "view" -font "Arial 9" 2370 set f [frame $inner.view] 2371 foreach side { front back left right top bottom } { 2364 label $inner.view_l -text "view" -font "Arial 9" 2365 set f [frame $inner.view] 2366 foreach side { front back left right top bottom } { 2372 2367 button $f.$side -image [Rappture::icon view$side] \ 2373 -command [itcl::code $this SetOrientation $side] 2374 Rappture::Tooltip::for $f.$side "Change the view to $side" 2375 pack $f.$side -side left 2368 -command [itcl::code $this SetOrientation $side] 2369 Rappture::Tooltip::for $f.$side "Change the view to $side" 2370 pack $f.$side -side left 2376 2371 } 2377 2372 2378 2373 blt::table $inner \ 2379 2374 0,0 $inner.view_l -anchor e -pady 2 \ 2380 0,1 $inner.view -anchor w -pady 2 2375 0,1 $inner.view -anchor w -pady 2 2381 2376 blt::table configure $inner r0 -resize none 2382 2377 2383 set row 1 2378 set row 1 2384 2379 set labels { qw qx qy qz xpan ypan zoom } 2385 2380 foreach tag $labels { … … 2435 2430 blt::table $inner \ 2436 2431 1,0 $inner.showstreams -anchor w \ 2437 2,0 $inner.showarrows -anchor w 2432 2,0 $inner.showarrows -anchor w 2438 2433 blt::table configure $inner c0 c1 -resize none 2439 2434 blt::table configure $inner c2 -resize expand … … 2458 2453 -font "Arial 9" 2459 2454 Rappture::Tooltip::for $inner.part$row $info(description) 2460 blt::table $inner $row,0 $inner.part$row -anchor w 2455 blt::table $inner $row,0 $inner.part$row -anchor w 2461 2456 if { !$_settings($this-particles-$name) } { 2462 2457 $inner.part$row select 2463 } 2458 } 2464 2459 incr row 2465 2460 } … … 2485 2480 if { !$_settings($this-box-$name) } { 2486 2481 $inner.box$row select 2487 } 2482 } 2488 2483 incr row 2489 2484 } … … 2491 2486 blt::table configure $inner r$row -resize expand 2492 2487 blt::table configure $inner c3 -resize expand 2493 event generate [winfo parent [winfo parent $w]] <Configure> 2488 event generate [winfo parent [winfo parent $w]] <Configure> 2494 2489 } 2495 2490 … … 2585 2580 } 2586 2581 2587 # camera -- 2582 # camera -- 2588 2583 itcl::body Rappture::FlowvisViewer::camera {option args} { 2589 switch -- $option { 2584 switch -- $option { 2590 2585 "show" { 2591 2586 puts [array get _view] … … 2672 2667 append cmd " -corner1 {$info(corner1)} " 2673 2668 append cmd " -corner2 {$info(corner2)}\n" 2674 } 2669 } 2675 2670 append cmd "$tag data follows $nbytes $extents\n" 2676 2671 return $cmd … … 2740 2735 "stop" { 2741 2736 if { $_flow(state) } { 2742 flow off 2737 flow off 2743 2738 flow reset 2744 2739 } … … 2746 2741 "pause" { 2747 2742 if { $_flow(state) } { 2748 flow off 2743 flow off 2749 2744 } 2750 2745 } … … 2759 2754 set _settings($this-step) 1 2760 2755 SendCmd "flow reset" 2761 } 2756 } 2762 2757 flow next 2763 2758 } … … 2766 2761 if { $_settings($this-play) } { 2767 2762 flow play 2768 } else { 2763 } else { 2769 2764 flow pause 2770 2765 } … … 2791 2786 } 2792 2787 $_dispatcher event -after $_flow(delay) !play 2793 } 2788 } 2794 2789 default { 2795 2790 error "bad option \"$option\": should be play, stop, toggle, or reset." … … 2842 2837 1,0 $inner.please -anchor w \ 2843 2838 1,1 $inner.icon -anchor e \ 2844 2,0 $inner.cancel -cspan 2 2845 blt::table configure $inner r0 -pady 4 2846 blt::table configure $inner r2 -pady 4 2839 2,0 $inner.cancel -cspan 2 2840 blt::table configure $inner r0 -pady 4 2841 blt::table configure $inner r2 -pady 4 2847 2842 bind $inner.cancel <KeyPress-Return> [list $inner.cancel invoke] 2848 2843 } else { … … 2860 2855 update idletasks 2861 2856 update 2862 # We wait here for either 2863 # 1) the png to be delivered or 2864 # 2) timeout or 2857 # We wait here for either 2858 # 1) the png to be delivered or 2859 # 2) timeout or 2865 2860 # 3) user cancels the operation. 2866 2861 tkwait variable $var … … 2901 2896 1,0 $inner.please -anchor w \ 2902 2897 1,1 $inner.icon -anchor e \ 2903 2,0 $inner.cancel -cspan 2 2904 blt::table configure $inner r0 -pady 4 2905 blt::table configure $inner r2 -pady 4 2898 2,0 $inner.cancel -cspan 2 2899 blt::table configure $inner r0 -pady 4 2900 blt::table configure $inner r2 -pady 4 2906 2901 bind $inner.cancel <KeyPress-Return> [list $inner.cancel invoke] 2907 2902 } else { 2908 2903 set inner [$popup component inner] 2909 2904 } 2910 update 2905 update 2911 2906 # Timeout is set to 10 minutes. 2912 2907 $_dispatcher event -after 600000 !movietimeout … … 2914 2909 grab set $inner 2915 2910 focus $inner.cancel 2916 2911 2917 2912 flow duration 2918 2913 flow speed … … 2926 2921 set start [clock seconds] 2927 2922 SendCmd "flow video $token -width $w -height $h -numframes $nframes " 2928 2923 2929 2924 $popup activate $widget below 2930 update idletasks 2925 update idletasks 2931 2926 update 2932 2927 # We wait here until 2933 # 1. the movie is delivered or 2934 # 2. we've timed out or 2928 # 1. the movie is delivered or 2929 # 2. we've timed out or 2935 2930 # 3. the user has canceled the operation.b 2936 2931 tkwait variable $var … … 2947 2942 2948 2943 # This will both cancel the movie generation (if it hasn't already 2949 # completed) and reset the flow. 2944 # completed) and reset the flow. 2950 2945 SendCmd "flow reset" 2951 2946 if { $_hardcopy($this-$token) != "" } { … … 2981 2976 } 2982 2977 2983 itcl::body Rappture::FlowvisViewer::SetOrientation { side } { 2984 array set positions { 2985 front "1 0 0 0" 2986 back "0 0 1 0" 2987 left "0.707107 0 -0.707107 0" 2988 right "0.707107 0 0.707107 0" 2989 top "0.707107 -0.707107 0 0" 2990 bottom "0.707107 0.707107 0 0" 2991 } 2992 foreach name { -qw -qx -qy -qz } value $positions($side) { 2978 itcl::body Rappture::FlowvisViewer::SetOrientation { side } { 2979 array set positions { 2980 front "1 0 0 0" 2981 back "0 0 1 0" 2982 left "0.707107 0 -0.707107 0" 2983 right "0.707107 0 0.707107 0" 2984 top "0.707107 -0.707107 0 0" 2985 bottom "0.707107 0.707107 0 0" 2986 } 2987 foreach name { -qw -qx -qy -qz } value $positions($side) { 2993 2988 set _view($name) $value 2994 } 2989 } 2995 2990 set q [ViewToQuaternion] 2996 2991 $_arcball quaternion $q 2997 SendCmd "camera orient $q" 2992 SendCmd "camera orient $q" 2998 2993 SendCmd "camera reset" 2999 2994 set _view(-xpan) 0.0 … … 3006 3001 3007 3002 # Reset global settings from dataset's settings. 3008 itcl::body Rappture::FlowvisViewer::BuildVolumeComponents {} { 3003 itcl::body Rappture::FlowvisViewer::BuildVolumeComponents {} { 3009 3004 $itk_component(volcomponents) choices delete 0 end 3010 3005 foreach name $_componentsList { … … 3016 3011 3017 3012 # Reset global settings from dataset's settings. 3018 itcl::body Rappture::FlowvisViewer::GetDatasetsWithComponent { cname } { 3013 itcl::body Rappture::FlowvisViewer::GetDatasetsWithComponent { cname } { 3019 3014 if { ![info exists _volcomponents($cname)] } { 3020 3015 return "" -
trunk/gui/scripts/nanovisviewer.tcl
r5094 r5098 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: nanovisviewer - 3D volume rendering … … 19 19 # 20 20 # FIXME: 21 # Need to Add DX readers this client to examine the data before 21 # Need to Add DX readers this client to examine the data before 22 22 # it's sent to the server. This will eliminate 90% of the insanity in 23 # computing the limits of all the volumes. I can rip out all the 23 # computing the limits of all the volumes. I can rip out all the 24 24 # "receive data" "send transfer function" event crap. 25 25 # … … 29 29 # when a new volume is drawn (using the default transfer function) and 30 30 # then when the correct transfer function has been sent and linked to 31 # the volume. 31 # the volume. 32 32 # 33 33 option add *NanovisViewer.width 4i widgetDefault … … 75 75 public method isconnected {} 76 76 public method limits { tf } 77 public method parameters {title args} { 78 # do nothing 77 public method parameters {title args} { 78 # do nothing 79 79 } 80 80 public method scale {args} … … 83 83 # The following methods are only used by this class. 84 84 85 private method AddNewMarker { x y } 85 private method AddNewMarker { x y } 86 86 private method AdjustSetting {what {value ""}} 87 87 private method BuildCameraTab {} … … 90 90 private method BuildVolumeComponents {} 91 91 private method BuildVolumeTab {} 92 private method ComputeAlphamap { cname } 92 private method ComputeAlphamap { cname } 93 93 private method ComputeTransferFunction { cname } 94 94 private method Connect {} … … 97 97 private method DoResize {} 98 98 private method DrawLegend { cname } 99 private method EventuallyRedrawLegend { } 100 private method EventuallyResize { w h } 99 private method EventuallyRedrawLegend { } 100 private method EventuallyResize { w h } 101 101 private method FixLegend {} 102 private method GetAlphamap { cname color } 103 private method GetColormap { cname color } 104 private method GetDatasetsWithComponent { cname } 102 private method GetAlphamap { cname color } 103 private method GetColormap { cname color } 104 private method GetDatasetsWithComponent { cname } 105 105 private method GetVolumeInfo { w } 106 private method HideAllMarkers {} 107 private method InitComponentSettings { cname } 106 private method HideAllMarkers {} 107 private method InitComponentSettings { cname } 108 108 private method InitSettings { args } 109 private method NameToAlphamap { name } 109 private method NameToAlphamap { name } 110 110 private method NameTransferFunction { dataobj comp } 111 111 private method Pan {option x y} … … 113 113 private method ParseLevelsOption { cname levels } 114 114 private method ParseMarkersOption { cname markers } 115 private method QuaternionToView { q } { 115 private method QuaternionToView { q } { 116 116 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break 117 117 } … … 127 127 private method Slice {option args} 128 128 private method SlicerTip {axis} 129 private method SwitchComponent { cname } 129 private method SwitchComponent { cname } 130 130 private method ToggleVolume { tag name } 131 private method ViewToQuaternion {} { 131 private method ViewToQuaternion {} { 132 132 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)] 133 133 } … … 136 136 private variable _arcball "" 137 137 138 private variable _dlist "" ;# list of data objects139 private variable _obj2ovride ;# maps dataobj => style override140 private variable _serverDatasets ;# contains all the dataobj-component 141 ;# to volumes in the server138 private variable _dlist "" ;# list of data objects 139 private variable _obj2ovride ;# maps dataobj => style override 140 private variable _serverDatasets ;# contains all the dataobj-component 141 ;# to volumes in the server 142 142 private variable _recvdDatasets; # list of data objs to send to server 143 143 private variable _dataset2style; # maps dataobj-component to transfunc 144 private variable _style2datasets; # maps tf back to list of 144 private variable _style2datasets; # maps tf back to list of 145 145 # dataobj-components using the tf. 146 146 147 private variable _reset 1; 147 private variable _reset 1; # Connection to server has been reset. 148 148 private variable _click; # Info used for rotate operations. 149 149 private variable _limits; # Autoscale min/max for all axes … … 153 153 private variable _settings 154 154 private variable _first "" ; # This is the topmost volume. 155 private variable _current ""; # Currently selected component 156 private variable _volcomponents ; # Array of components found157 private variable _componentsList ; # Array of components found155 private variable _current ""; # Currently selected component 156 private variable _volcomponents ;# Array of components found 157 private variable _componentsList ;# Array of components found 158 158 private variable _cname2style 159 159 private variable _cname2transferFunction … … 317 317 -offimage [Rappture::icon cutbutton] \ 318 318 -variable [itcl::scope _settings(-cutplanesvisible)] \ 319 -command [itcl::code $this AdjustSetting -cutplanesvisible] 319 -command [itcl::code $this AdjustSetting -cutplanesvisible] 320 320 } 321 321 Rappture::Tooltip::for $itk_component(cutplane) \ … … 329 329 BuildCameraTab 330 330 } errs] != 0 } { 331 331 global errorInfo 332 332 puts stderr "errs=$errs errorInfo=$errorInfo" 333 333 } … … 349 349 [list focus $itk_component(legend)] 350 350 351 # Hack around the Tk panewindow. The problem is that the requested 351 # Hack around the Tk panewindow. The problem is that the requested 352 352 # size of the 3d view isn't set until an image is retrieved from 353 353 # the server. So the panewindow uses the tiny size. … … 356 356 blt::table $itk_component(plotarea) \ 357 357 0,0 $itk_component(3dview) -fill both -reqwidth $w \ 358 1,0 $itk_component(legend) -fill x 358 1,0 $itk_component(legend) -fill x 359 359 blt::table configure $itk_component(plotarea) r1 -resize none 360 360 … … 431 431 } 432 432 catch { blt::arcball destroy $_arcball } 433 array unset _settings 433 array unset _settings 434 434 } 435 435 … … 565 565 -markers "" 566 566 } 567 array unset _limits 568 array unset _volcomponents 567 array unset _limits 568 array unset _volcomponents 569 569 foreach dataobj $args { 570 570 if { ![$dataobj isvalid] } { … … 634 634 # to the BLT picture image it won't be necessary to decode the 635 635 # image data. 636 if { [image width $_image(plot)] > 0 && 636 if { [image width $_image(plot)] > 0 && 637 637 [image height $_image(plot)] > 0 } { 638 638 set bytes [$_image(plot) data -format "jpeg -quality 100"] … … 660 660 return 0 661 661 } 662 set _reset 1 662 set _reset 1 663 663 set result [VisViewer::Connect $_hosts] 664 664 if { $result } { … … 751 751 ReceiveEcho <<line "<read $info(-bytes) bytes" 752 752 if { $info(-type) == "image" } { 753 ReceiveEcho "for [image width $_image(plot)]x[image height $_image(plot)] image>" 753 ReceiveEcho "for [image width $_image(plot)]x[image height $_image(plot)] image>" 754 754 $_image(plot) configure -data $bytes 755 755 } elseif { $info(-type) == "print" } { … … 824 824 # The procedure is the response from the render server to each "legend" 825 825 # command. The server sends back a "legend" command invoked our 826 # the slave interpreter. The purpose is to collect data of the image 826 # the slave interpreter. The purpose is to collect data of the image 827 827 # representing the legend in the canvas. In addition, the 828 828 # active transfer function is displayed. … … 907 907 # Turn on buffering of commands to the server. We don't want to 908 908 # be preempted by a server disconnect/reconnect (which automatically 909 # generates a new call to Rebuild). 909 # generates a new call to Rebuild). 910 910 StartBufferingCommands 911 911 … … 959 959 set _first [lindex [get] 0] 960 960 if { $_reset } { 961 962 963 961 # 962 # Reset the camera and other view parameters 963 # 964 964 set _settings(-qw) $_view(-qw) 965 965 set _settings(-qx) $_view(-qx) 966 966 set _settings(-qy) $_view(-qy) 967 967 set _settings(-qz) $_view(-qz) 968 969 970 968 set _settings(-xpan) $_view(-xpan) 969 set _settings(-ypan) $_view(-ypan) 970 set _settings(-zoom) $_view(-zoom) 971 971 972 972 set q [ViewToQuaternion] … … 974 974 SendCmd "camera orient $q" 975 975 SendCmd "camera reset" 976 977 978 976 PanCamera 977 SendCmd "camera zoom $_view(-zoom)" 978 979 979 #cutplane state 0 all 980 980 foreach axis {x y z} { … … 988 988 -current 989 989 990 991 992 993 994 995 996 997 998 999 990 if {"" != $_first} { 991 set axis [$_first hints updir] 992 if { "" != $axis } { 993 SendCmd "up $axis" 994 } 995 set location [$_first hints camera] 996 if { $location != "" } { 997 array set _view $location 998 } 999 } 1000 1000 } 1001 1001 # Outline seems to need to be reset every update. 1002 InitSettings -outlinevisible -cutplanesvisible 1002 InitSettings -outlinevisible -cutplanesvisible 1003 1003 # nothing to send -- activate the proper ivol 1004 1004 SendCmd "volume state 0" 1005 1005 if {"" != $_first} { 1006 set datasets [array names _serverDatasets $_first-*] 1006 set datasets [array names _serverDatasets $_first-*] 1007 1007 if { $datasets != "" } { 1008 1008 SendCmd "volume state 1 $datasets" … … 1086 1086 } 1087 1087 } 1088 set q [ViewToQuaternion] 1088 set q [ViewToQuaternion] 1089 1089 $_arcball quaternion $q 1090 1090 SendCmd "camera orient $q" … … 1233 1233 switch -- $what { 1234 1234 "-ambient" { 1235 # Other parts of the code use the ambient setting to 1235 # Other parts of the code use the ambient setting to 1236 1236 # tell if the component settings have been initialized 1237 1237 if { ![info exists _settings($_current${what})] } { … … 1250 1250 "-background" { 1251 1251 set bgcolor [$itk_component(background) value] 1252 1253 1254 1255 "grey""black"1256 1252 array set fgcolors { 1253 "black" "white" 1254 "white" "black" 1255 "grey" "black" 1256 } 1257 1257 configure -plotbackground $bgcolor \ 1258 1259 1258 -plotforeground $fgcolors($bgcolor) 1259 DrawLegend $_current 1260 1260 } 1261 1261 "-colormap" { … … 1294 1294 blt::table $itk_component(plotarea) \ 1295 1295 0,0 $itk_component(3dview) -fill both \ 1296 1,0 $itk_component(legend) -fill x 1296 1,0 $itk_component(legend) -fill x 1297 1297 blt::table configure $itk_component(plotarea) r1 -resize none 1298 1298 } else { … … 1347 1347 # have to synchronize each of the local controls (see below) with 1348 1348 # this. 1349 set datasets [CurrentDatasets] 1349 set datasets [CurrentDatasets] 1350 1350 set bool $_settings($what) 1351 1351 SendCmd "volume data state $bool $datasets" … … 1356 1356 } 1357 1357 "-volumevisible" { 1358 # This is the component specific control. It changes the 1358 # This is the component specific control. It changes the 1359 1359 # visibility of only the current component. 1360 1360 set _settings($_current${what}) $_settings($what) … … 1367 1367 set bool $_settings($what) 1368 1368 # We only set cutplanes on the first dataset. 1369 set datasets [CurrentDatasets -cutplanes] 1369 set datasets [CurrentDatasets -cutplanes] 1370 1370 set tag [lindex $datasets 0] 1371 1371 SendCmd "cutplane state $bool $axis $tag" … … 1477 1477 ParseLevelsOption $cname $styles(-levels) 1478 1478 } 1479 1479 1480 1480 } 1481 1481 set wmap [ComputeAlphamap $cname] … … 1498 1498 } 1499 1499 # Add a new marker to the current transfer function 1500 $_transferFunctionEditors($_current) deleteMarker $x $y 1500 $_transferFunctionEditors($_current) deleteMarker $x $y 1501 1501 } 1502 1502 … … 1523 1523 SendCmd "grid axiscolor $rgb" 1524 1524 SendCmd "grid linecolor $rgb" 1525 $itk_component(legend) itemconfigure labels -fill $color 1526 $itk_component(legend) itemconfigure limits -fill $color 1525 $itk_component(legend) itemconfigure labels -fill $color 1526 $itk_component(legend) itemconfigure limits -fill $color 1527 1527 } 1528 1528 } … … 1571 1571 # 1572 1572 # The -markers option takes a list of zero or more values (the values 1573 # may be separated either by spaces or commas) that have the following 1573 # may be separated either by spaces or commas) that have the following 1574 1574 # format: 1575 1575 # … … 1589 1589 set n [scan $marker "%g%s" value suffix] 1590 1590 if { $n == 2 && $suffix == "%" } { 1591 # $n% : Set relative value (0..1). 1591 # $n% : Set relative value (0..1). 1592 1592 lappend list [expr {$value * 0.01}] 1593 1593 } else { … … 1602 1602 1603 1603 # ---------------------------------------------------------------------- 1604 # USAGE: UndateTransferFuncs 1604 # USAGE: UndateTransferFuncs 1605 1605 # ---------------------------------------------------------------------- 1606 1606 itcl::body Rappture::NanovisViewer::updateTransferFunctions {} { … … 1629 1629 if { $min != "" } { 1630 1630 set _limits(min) $min 1631 } 1631 } 1632 1632 if { $max != "" } { 1633 1633 set _limits(max) $max … … 1683 1683 -font "Arial 9" 1684 1684 1685 label $inner.background_l -text "Background" -font "Arial 9" 1685 label $inner.background_l -text "Background" -font "Arial 9" 1686 1686 itk_component add background { 1687 1687 Rappture::Combobox $inner.background -width 10 -editable no … … 1690 1690 "black" "black" \ 1691 1691 "white" "white" \ 1692 "grey" "grey" 1692 "grey" "grey" 1693 1693 1694 1694 $itk_component(background) value $_settings(-background) … … 1723 1723 label $inner.lighting_l \ 1724 1724 -text "Lighting / Material Properties" \ 1725 -font "Arial 9 bold" 1725 -font "Arial 9 bold" 1726 1726 1727 1727 checkbutton $inner.light2side -text "Two-sided lighting" -font $fg \ … … 1767 1767 1768 1768 label $inner.transferfunction_l \ 1769 -text "Transfer Function" -font "Arial 9 bold" 1769 -text "Transfer Function" -font "Arial 9 bold" 1770 1770 1771 1771 # Tooth thickness … … 1778 1778 label $inner.thick -text "Thick" -font $fg 1779 1779 1780 # Colormap 1780 # Colormap 1781 1781 label $inner.colormap_l -text "Colormap" -font $fg 1782 1782 itk_component add colormap { … … 1819 1819 11,1 $inner.thin -anchor e \ 1820 1820 11,2 $inner.thickness -cspan 2 -fill x \ 1821 11,4 $inner.thick -anchor w 1821 11,4 $inner.thick -anchor w 1822 1822 1823 1823 blt::table configure $inner c* r* -resize none … … 2042 2042 } 2043 2043 2044 # camera -- 2044 # camera -- 2045 2045 # 2046 2046 itcl::body Rappture::NanovisViewer::camera {option args} { 2047 switch -- $option { 2047 switch -- $option { 2048 2048 "show" { 2049 2049 puts [array get _view] … … 2119 2119 -font "Arial 9" 2120 2120 Rappture::Tooltip::for $inner.vol$row $info(description) 2121 blt::table $inner $row,0 $inner.vol$row -anchor w 2121 blt::table $inner $row,0 $inner.vol$row -anchor w 2122 2122 if { !$_settings(-volume-$name) } { 2123 2123 $inner.vol$row select 2124 } 2124 } 2125 2125 incr row 2126 2126 } … … 2128 2128 blt::table configure $inner r$row -resize expand 2129 2129 blt::table configure $inner c3 -resize expand 2130 event generate [winfo parent [winfo parent $w]] <Configure> 2130 event generate [winfo parent [winfo parent $w]] <Configure> 2131 2131 } 2132 2132 … … 2136 2136 } 2137 2137 2138 itcl::body Rappture::NanovisViewer::SetOrientation { side } { 2138 itcl::body Rappture::NanovisViewer::SetOrientation { side } { 2139 2139 array set positions { 2140 2140 front "1 0 0 0" … … 2147 2147 foreach name { -qw -qx -qy -qz } value $positions($side) { 2148 2148 set _view($name) $value 2149 } 2149 } 2150 2150 set q [ViewToQuaternion] 2151 2151 $_arcball quaternion $q 2152 SendCmd "camera orient $q" 2152 SendCmd "camera orient $q" 2153 2153 SendCmd "camera reset" 2154 2154 set _view(-xpan) 0 … … 2168 2168 # time we try to switch to a given component in SwitchComponent below. 2169 2169 # 2170 itcl::body Rappture::NanovisViewer::InitComponentSettings { cname } { 2170 itcl::body Rappture::NanovisViewer::InitComponentSettings { cname } { 2171 2171 # Expanding component name for key. 2172 2172 array set _settings [subst { … … 2190 2190 # with the settings of the new current component. 2191 2191 # 2192 itcl::body Rappture::NanovisViewer::SwitchComponent { cname } { 2192 itcl::body Rappture::NanovisViewer::SwitchComponent { cname } { 2193 2193 if { ![info exists _settings($cname-ambient)] } { 2194 2194 InitComponentSettings $cname … … 2218 2218 # volume settings tab. 2219 2219 # 2220 itcl::body Rappture::NanovisViewer::BuildVolumeComponents {} { 2220 itcl::body Rappture::NanovisViewer::BuildVolumeComponents {} { 2221 2221 $itk_component(volcomponents) choices delete 0 end 2222 2222 foreach name $_componentsList { … … 2228 2228 if { [llength $_componentsList] <= 1 } { 2229 2229 # Unpack the components label and dropdown if there's only one 2230 # component. 2230 # component. 2231 2231 blt::table forget $parent.volcomponents_l $parent.volcomponents 2232 2232 } else { 2233 # Pack the components label and dropdown into the table there's 2234 # more than one component to select. 2233 # Pack the components label and dropdown into the table there's 2234 # more than one component to select. 2235 2235 blt::table $parent \ 2236 2236 0,0 $parent.volcomponents_l -anchor e -cspan 2 \ 2237 0,2 $parent.volcomponents -cspan 3 -fill x 2237 0,2 $parent.volcomponents -cspan 3 -fill x 2238 2238 } 2239 2239 } … … 2247 2247 # volumes that have the current component. 2248 2248 # 2249 itcl::body Rappture::NanovisViewer::GetDatasetsWithComponent { cname } { 2249 itcl::body Rappture::NanovisViewer::GetDatasetsWithComponent { cname } { 2250 2250 if { ![info exists _volcomponents($cname)] } { 2251 2251 return "" … … 2268 2268 # created, deleted, or moved markers. 2269 2269 # 2270 itcl::body Rappture::NanovisViewer::HideAllMarkers {} { 2270 itcl::body Rappture::NanovisViewer::HideAllMarkers {} { 2271 2271 foreach cname [array names _transferFunctionEditors] { 2272 $_transferFunctionEditors($cname) hideMarkers 2273 } 2274 } 2275 2276 itcl::body Rappture::NanovisViewer::GetColormap { cname color } { 2272 $_transferFunctionEditors($cname) hideMarkers 2273 } 2274 } 2275 2276 itcl::body Rappture::NanovisViewer::GetColormap { cname color } { 2277 2277 if { $color == "default" } { 2278 2278 return $_cname2defaultcolormap($cname) … … 2281 2281 } 2282 2282 2283 itcl::body Rappture::NanovisViewer::GetAlphamap { cname name } { 2283 itcl::body Rappture::NanovisViewer::GetAlphamap { cname name } { 2284 2284 if { $name == "default" } { 2285 2285 return $_cname2defaultalphamap($cname) … … 2288 2288 } 2289 2289 2290 itcl::body Rappture::NanovisViewer::ResetColormap { cname color } { 2290 itcl::body Rappture::NanovisViewer::ResetColormap { cname color } { 2291 2291 # Get the current transfer function 2292 2292 if { ![info exists _cname2transferFunction($cname)] } { … … 2300 2300 } 2301 2301 2302 itcl::body Rappture::NanovisViewer::ComputeAlphamap { cname } { 2302 itcl::body Rappture::NanovisViewer::ComputeAlphamap { cname } { 2303 2303 if { ![info exists _transferFunctionEditors($cname)] } { 2304 2304 return [list 0.0 0.0 1.0 1.0] … … 2319 2319 # Scale values between 0.00001 and 0.01000 2320 2320 set delta [expr {double($_settings($cname-thickness)) * 0.0001}] 2321 2321 2322 2322 set first [lindex $isovalues 0] 2323 2323 set last [lindex $isovalues end] … … 2366 2366 switch -- $name { 2367 2367 "ramp-up" { 2368 set wmap { 2369 0.0 0.0 2370 1.0 1.0 2368 set wmap { 2369 0.0 0.0 2370 1.0 1.0 2371 2371 } 2372 2372 } 2373 2373 "ramp-down" { 2374 set wmap { 2375 0.0 1.0 2376 1.0 0.0 2374 set wmap { 2375 0.0 1.0 2376 1.0 0.0 2377 2377 } 2378 2378 } 2379 2379 "vee" { 2380 set wmap { 2381 0.0 1.0 2382 0.5 0.0 2383 1.0 1.0 2380 set wmap { 2381 0.0 1.0 2382 0.5 0.0 2383 1.0 1.0 2384 2384 } 2385 2385 } 2386 2386 "tent-1" { 2387 set wmap { 2388 0.0 0.0 2389 0.5 1.0 2390 1.0 0.0 2387 set wmap { 2388 0.0 0.0 2389 0.5 1.0 2390 1.0 0.0 2391 2391 } 2392 2392 } 2393 2393 "tent-2" { 2394 set wmap { 2395 0.0 0.0 2396 0.25 1.0 2397 0.5 0.0 2398 0.75 1.0 2399 1.0 0.0 2394 set wmap { 2395 0.0 0.0 2396 0.25 1.0 2397 0.5 0.0 2398 0.75 1.0 2399 1.0 0.0 2400 2400 } 2401 2401 } 2402 2402 "tent-3" { 2403 set wmap { 2404 0.0 0.0 2403 set wmap { 2404 0.0 0.0 2405 2405 0.16666 1.0 2406 2406 0.33333 0.0 … … 2408 2408 0.66666 0.0 2409 2409 0.83333 1.0 2410 1.0 0.0 2410 1.0 0.0 2411 2411 } 2412 2412 } 2413 2413 "tent-4" { 2414 set wmap { 2415 0.0 0.0 2414 set wmap { 2415 0.0 0.0 2416 2416 0.125 1.0 2417 2417 0.25 0.0 2418 2418 0.375 1.0 2419 0.5 0.0 2419 0.5 0.0 2420 2420 0.625 1.0 2421 2421 0.75 0.0 2422 2422 0.875 1.0 2423 1.0 0.0 2423 1.0 0.0 2424 2424 } 2425 2425 } 2426 2426 "sinusoid-1" { 2427 2427 set wmap { 2428 0.0 0.000 0.600 0.800 2429 0.14285714285714285 0.400 0.900 1.000 2430 0.2857142857142857 0.600 1.000 1.000 2431 0.42857142857142855 0.800 1.000 1.000 2432 0.5714285714285714 0.900 0.900 0.900 2433 0.7142857142857143 0.600 0.600 0.600 2434 0.8571428571428571 0.400 0.400 0.400 2428 0.0 0.000 0.600 0.800 2429 0.14285714285714285 0.400 0.900 1.000 2430 0.2857142857142857 0.600 1.000 1.000 2431 0.42857142857142855 0.800 1.000 1.000 2432 0.5714285714285714 0.900 0.900 0.900 2433 0.7142857142857143 0.600 0.600 0.600 2434 0.8571428571428571 0.400 0.400 0.400 2435 2435 1.0 0.200 0.200 0.200 2436 2436 } 2437 2437 } 2438 2438 "sinusoid-2" { 2439 set wmap { 2440 0.0 0.900 1.000 1.000 2441 0.1111111111111111 0.800 0.983 1.000 2442 0.2222222222222222 0.700 0.950 1.000 2443 0.3333333333333333 0.600 0.900 1.000 2444 0.4444444444444444 0.500 0.833 1.000 2445 0.5555555555555556 0.400 0.750 1.000 2446 0.6666666666666666 0.300 0.650 1.000 2447 0.7777777777777778 0.200 0.533 1.000 2448 0.8888888888888888 0.100 0.400 1.000 2439 set wmap { 2440 0.0 0.900 1.000 1.000 2441 0.1111111111111111 0.800 0.983 1.000 2442 0.2222222222222222 0.700 0.950 1.000 2443 0.3333333333333333 0.600 0.900 1.000 2444 0.4444444444444444 0.500 0.833 1.000 2445 0.5555555555555556 0.400 0.750 1.000 2446 0.6666666666666666 0.300 0.650 1.000 2447 0.7777777777777778 0.200 0.533 1.000 2448 0.8888888888888888 0.100 0.400 1.000 2449 2449 1.0 0.000 0.250 1.000 2450 2450 } … … 2452 2452 "sinusoid-6" { 2453 2453 set wmap { 2454 0.0 0.200 0.100 0.000 2455 0.09090909090909091 0.400 0.187 0.000 2456 0.18181818181818182 0.600 0.379 0.210 2457 0.2727272727272727 0.800 0.608 0.480 2458 0.36363636363636365 0.850 0.688 0.595 2459 0.45454545454545453 0.950 0.855 0.808 2460 0.5454545454545454 0.800 0.993 1.000 2461 0.6363636363636364 0.600 0.973 1.000 2462 0.7272727272727273 0.400 0.940 1.000 2463 0.8181818181818182 0.200 0.893 1.000 2464 0.9090909090909091 0.000 0.667 0.800 2465 1.0 0.000 0.480 0.600 2454 0.0 0.200 0.100 0.000 2455 0.09090909090909091 0.400 0.187 0.000 2456 0.18181818181818182 0.600 0.379 0.210 2457 0.2727272727272727 0.800 0.608 0.480 2458 0.36363636363636365 0.850 0.688 0.595 2459 0.45454545454545453 0.950 0.855 0.808 2460 0.5454545454545454 0.800 0.993 1.000 2461 0.6363636363636364 0.600 0.973 1.000 2462 0.7272727272727273 0.400 0.940 1.000 2463 0.8181818181818182 0.200 0.893 1.000 2464 0.9090909090909091 0.000 0.667 0.800 2465 1.0 0.000 0.480 0.600 2466 2466 } 2467 2467 } 2468 2468 "sinusoid-10" { 2469 2469 set wmap { 2470 0.0 0.000 0.480 0.600 2471 0.09090909090909091 0.000 0.667 0.800 2472 0.18181818181818182 0.200 0.893 1.000 2473 0.2727272727272727 0.400 0.940 1.000 2474 0.36363636363636365 0.600 0.973 1.000 2475 0.45454545454545453 0.800 0.993 1.000 2476 0.5454545454545454 0.950 0.855 0.808 2477 0.6363636363636364 0.850 0.688 0.595 2478 0.7272727272727273 0.800 0.608 0.480 2479 0.8181818181818182 0.600 0.379 0.210 2480 0.9090909090909091 0.400 0.187 0.000 2481 1.0 0.200 0.100 0.000 2470 0.0 0.000 0.480 0.600 2471 0.09090909090909091 0.000 0.667 0.800 2472 0.18181818181818182 0.200 0.893 1.000 2473 0.2727272727272727 0.400 0.940 1.000 2474 0.36363636363636365 0.600 0.973 1.000 2475 0.45454545454545453 0.800 0.993 1.000 2476 0.5454545454545454 0.950 0.855 0.808 2477 0.6363636363636364 0.850 0.688 0.595 2478 0.7272727272727273 0.800 0.608 0.480 2479 0.8181818181818182 0.600 0.379 0.210 2480 0.9090909090909091 0.400 0.187 0.000 2481 1.0 0.200 0.100 0.000 2482 2482 } 2483 2483 } … … 2517 2517 set wmap { 2518 2518 "#EE82EE" 2519 "#4B0082" 2520 "blue" 2521 "#008000" 2522 "yellow" 2523 "#FFA500" 2524 "red" 2519 "#4B0082" 2520 "blue" 2521 "#008000" 2522 "yellow" 2523 "#FFA500" 2524 "red" 2525 2525 } 2526 2526 }
Note: See TracChangeset
for help on using the changeset viewer.