Changeset 4336 for trunk/gui/scripts
- Timestamp:
- Apr 9, 2014, 11:19:10 PM (10 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r4166 r4336 2235 2235 Rappture::Combobox $inner.colormap -width 10 -editable no 2236 2236 } 2237 2238 $inner.colormap choices insert end \ 2239 "BCGYR" "BCGYR" \ 2240 "BGYOR" "BGYOR" \ 2241 "blue" "blue" \ 2242 "blue-to-brown" "blue-to-brown" \ 2243 "blue-to-orange" "blue-to-orange" \ 2244 "blue-to-grey" "blue-to-grey" \ 2245 "green-to-magenta" "green-to-magenta" \ 2246 "greyscale" "greyscale" \ 2247 "nanohub" "nanohub" \ 2248 "rainbow" "rainbow" \ 2249 "spectral" "spectral" \ 2250 "ROYGB" "ROYGB" \ 2251 "RYGCB" "RYGCB" \ 2252 "brown-to-blue" "brown-to-blue" \ 2253 "grey-to-blue" "grey-to-blue" \ 2254 "orange-to-blue" "orange-to-blue" \ 2255 "none" "none" 2256 2237 $inner.colormap choices insert end [GetColormapList -includeNone] 2257 2238 $itk_component(colormap) value "BCGYR" 2258 2239 bind $inner.colormap <<Value>> \ -
trunk/gui/scripts/mapviewer.tcl
r4334 r4336 1416 1416 Rappture::Combobox $inner.palette -width 10 -editable no 1417 1417 } 1418 $inner.palette choices insert end \ 1419 "BCGYR" "BCGYR" \ 1420 "BGYOR" "BGYOR" \ 1421 "blue" "blue" \ 1422 "blue-to-brown" "blue-to-brown" \ 1423 "blue-to-orange" "blue-to-orange" \ 1424 "blue-to-grey" "blue-to-grey" \ 1425 "green-to-magenta" "green-to-magenta" \ 1426 "greyscale" "greyscale" \ 1427 "nanohub" "nanohub" \ 1428 "rainbow" "rainbow" \ 1429 "spectral" "spectral" \ 1430 "ROYGB" "ROYGB" \ 1431 "RYGCB" "RYGCB" \ 1432 "brown-to-blue" "brown-to-blue" \ 1433 "grey-to-blue" "grey-to-blue" \ 1434 "orange-to-blue" "orange-to-blue" 1418 $inner.palette choices insert end [GetColormapList] 1435 1419 1436 1420 $itk_component(terrainpalette) value "BCGYR" -
trunk/gui/scripts/nanovisviewer.tcl
r4197 r4336 1802 1802 } 1803 1803 1804 $inner.colormap choices insert end \ 1805 "default" "default" \ 1806 "BCGYR" "BCGYR" \ 1807 "BGYOR" "BGYOR" \ 1808 "blue" "blue" \ 1809 "blue-to-brown" "blue-to-brown" \ 1810 "blue-to-orange" "blue-to-orange" \ 1811 "blue-to-grey" "blue-to-grey" \ 1812 "green-to-magenta" "green-to-magenta" \ 1813 "greyscale" "greyscale" \ 1814 "nanohub" "nanohub" \ 1815 "rainbow" "rainbow" \ 1816 "spectral" "spectral" \ 1817 "ROYGB" "ROYGB" \ 1818 "RYGCB" "RYGCB" \ 1819 "brown-to-blue" "brown-to-blue" \ 1820 "grey-to-blue" "grey-to-blue" \ 1821 "orange-to-blue" "orange-to-blue" \ 1822 "none" "none" 1823 1804 $inner.colormap choices insert end [GetColormapList -includeDefault -includeNone] 1824 1805 bind $inner.colormap <<Value>> \ 1825 1806 [itcl::code $this AdjustSetting -colormap] -
trunk/gui/scripts/visviewer.tcl
r4302 r4336 89 89 protected method Euler2XYZ { theta phi psi } 90 90 protected method Flush {} 91 protected method GetColormapList { args } 91 92 protected method HandleError { args } 92 93 protected method HandleOk { args } … … 884 885 } 885 886 887 itcl::body Rappture::VisViewer::GetColormapList { args } { 888 array set opts { 889 -includeDefault 0 890 -includeElementDefault 0 891 -includeNone 0 892 } 893 if {[llength $args] > 0} { 894 foreach opt $args { 895 set opts($opt) 1 896 } 897 } 898 set colormaps [list] 899 if {$opts(-includeDefault)} { 900 lappend colormaps "default" "default" 901 } 902 if {$opts(-includeElementDefault)} { 903 lappend colormaps "elementDefault" "elementDefault" 904 } 905 lappend colormaps \ 906 "BCGYR" "BCGYR" \ 907 "BGYOR" "BGYOR" \ 908 "blue-to-brown" "blue-to-brown" \ 909 "blue-to-orange" "blue-to-orange" \ 910 "blue-to-grey" "blue-to-grey" \ 911 "green-to-magenta" "green-to-magenta" \ 912 "greyscale" "greyscale" \ 913 "nanohub" "nanohub" \ 914 "rainbow" "rainbow" \ 915 "spectral" "spectral" \ 916 "ROYGB" "ROYGB" \ 917 "RYGCB" "RYGCB" \ 918 "white-to-blue" "white-to-blue" \ 919 "brown-to-blue" "brown-to-blue" \ 920 "grey-to-blue" "grey-to-blue" \ 921 "orange-to-blue" "orange-to-blue" 922 if {$opts(-includeNone)} { 923 lappend colormaps "none" "none" 924 } 925 return $colormaps 926 } 886 927 887 928 itcl::body Rappture::VisViewer::ColorsToColormap { colors } { … … 911 952 } 912 953 } 913 " blue" {954 "white-to-blue" { 914 955 return { 915 956 0.0 0.900 1.000 1.000 -
trunk/gui/scripts/vtkglyphviewer.tcl
r4200 r4336 1476 1476 return 1477 1477 } 1478 #SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1478 #if { ![info exists _limits($_curFldName)] } { 1479 # SendCmd "dataset maprange all" 1480 #} else { 1481 # SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1482 #} 1479 1483 #SendCmd "cutplane colormode $_colorMode $_curFldName" 1480 1484 SendCmd "glyphs colormode $_colorMode $_curFldName" … … 1721 1725 Rappture::Combobox $inner.colormap -width 10 -editable no 1722 1726 } 1723 $inner.colormap choices insert end \ 1724 "BCGYR" "BCGYR" \ 1725 "BGYOR" "BGYOR" \ 1726 "blue" "blue" \ 1727 "blue-to-brown" "blue-to-brown" \ 1728 "blue-to-orange" "blue-to-orange" \ 1729 "blue-to-grey" "blue-to-grey" \ 1730 "green-to-magenta" "green-to-magenta" \ 1731 "greyscale" "greyscale" \ 1732 "nanohub" "nanohub" \ 1733 "rainbow" "rainbow" \ 1734 "spectral" "spectral" \ 1735 "ROYGB" "ROYGB" \ 1736 "RYGCB" "RYGCB" \ 1737 "brown-to-blue" "brown-to-blue" \ 1738 "grey-to-blue" "grey-to-blue" \ 1739 "orange-to-blue" "orange-to-blue" 1740 1727 $inner.colormap choices insert end [GetColormapList -includeNone] 1741 1728 $itk_component(colormap) value "BCGYR" 1742 1729 bind $inner.colormap <<Value>> \ … … 2147 2134 # Parse style string. 2148 2135 set tag $dataobj-$comp 2136 set fgColor $itk_option(-plotforeground) 2149 2137 array set style { 2150 -color BCGYR 2138 -color $fgColor 2139 -colormap BCGYR 2140 -colorMode vmag 2151 2141 -edgecolor black 2152 2142 -edges 0 … … 2160 2150 -ptsize 1.0 2161 2151 -quality 1 2162 -scaleMode "vmag"2163 -shape "arrow"2152 -scaleMode vmag 2153 -shape arrow 2164 2154 -wireframe 0 2165 2155 } … … 2169 2159 set style(-orientGlyphs) 1 2170 2160 set style(-scaleMode) "vmag" 2161 set style(-colorMode) "vmag" 2171 2162 } else { 2172 2163 set style(-shape) "sphere" 2173 2164 set style(-orientGlyphs) 0 2174 2165 set style(-scaleMode) "scalar" 2166 set style(-colorMode) "scalar" 2175 2167 } 2176 2168 array set style [$dataobj style $comp] … … 2195 2187 } 2196 2188 if { $_changed(colormap) } { 2197 set style(-color ) $_settings(colormap)2189 set style(-colormap) $_settings(colormap) 2198 2190 } 2199 2191 if { $_currentColormap == "" } { 2200 $itk_component(colormap) value $style(-color )2192 $itk_component(colormap) value $style(-colormap) 2201 2193 } 2202 2194 set _currentOpacity $style(-opacity) 2203 2195 SendCmd "glyphs add $style(-shape) $tag" 2204 2196 set _settings(glyphShape) $style(-shape) 2197 $itk_component(gshape) value $style(-shape) 2205 2198 SendCmd "glyphs edges $style(-edges) $tag" 2206 2199 # normscale=1 and gscale=1 are defaults … … 2214 2207 set _settings(glyphScale) $style(-gscale) 2215 2208 SendCmd "outline add $tag" 2216 SendCmd "outline color [Color2RGB $ itk_option(-plotforeground)] $tag"2209 SendCmd "outline color [Color2RGB $style(-color)] $tag" 2217 2210 SendCmd "outline visible $style(-outline) $tag" 2218 2211 set _settings(glyphOutline) $style(-outline) 2219 2212 set _settings(glyphEdges) $style(-edges) 2213 if {$style(-colorMode) == "constant" || $style(-colormap) == "none"} { 2214 SendCmd "glyphs colormode constant {} $tag" 2215 set _settings(colormapVisible) 0 2216 set _settings(colormap) "none" 2217 } else { 2218 SendCmd "glyphs colormode $style(-colorMode) $_curFldName $tag" 2219 set _settings(colormapVisible) 1 2220 set _settings(colormap) $style(-colormap) 2221 SetCurrentColormap $style(-colormap) 2222 } 2223 $itk_component(colormap) value $_settings(colormap) 2224 set _colorMode $style(-colorMode) 2220 2225 # constant color only used if colormode set to constant 2221 SendCmd "glyphs color [Color2RGB $ itk_option(-plotforeground)] $tag"2226 SendCmd "glyphs color [Color2RGB $style(-color)] $tag" 2222 2227 # Omitting field name for gorient and smode commands 2223 2228 # defaults to active scalars or vectors depending on mode 2224 2229 SendCmd "glyphs gorient $style(-orientGlyphs) {} $tag" 2225 2230 SendCmd "glyphs smode $style(-scaleMode) {} $tag" 2231 set _settings(glyphScaleMode) $style(-scaleMode) 2232 $itk_component(scaleMode) value $style(-scaleMode) 2226 2233 SendCmd "glyphs quality $style(-quality) $tag" 2227 2234 SendCmd "glyphs lighting $style(-lighting) $tag" … … 2232 2239 SendCmd "glyphs opacity $_currentOpacity $tag" 2233 2240 set _settings(glyphOpacity) $style(-opacity) 2234 SetCurrentColormap $style(-color)2235 2241 SendCmd "glyphs wireframe $style(-wireframe) $tag" 2236 2242 set _settings(glyphWireframe) $style(-wireframe) -
trunk/gui/scripts/vtkheightmapviewer.tcl
r4134 r4336 1922 1922 Rappture::Combobox $inner.colormap -width 10 -editable no 1923 1923 } 1924 $inner.colormap choices insert end \ 1925 "BCGYR" "BCGYR" \ 1926 "BGYOR" "BGYOR" \ 1927 "blue" "blue" \ 1928 "blue-to-brown" "blue-to-brown" \ 1929 "blue-to-orange" "blue-to-orange" \ 1930 "blue-to-grey" "blue-to-grey" \ 1931 "green-to-magenta" "green-to-magenta" \ 1932 "greyscale" "greyscale" \ 1933 "nanohub" "nanohub" \ 1934 "rainbow" "rainbow" \ 1935 "spectral" "spectral" \ 1936 "ROYGB" "ROYGB" \ 1937 "RYGCB" "RYGCB" \ 1938 "brown-to-blue" "brown-to-blue" \ 1939 "grey-to-blue" "grey-to-blue" \ 1940 "orange-to-blue" "orange-to-blue" \ 1941 "none" "none" 1942 1924 $inner.colormap choices insert end [GetColormapList -includeNone] 1943 1925 $itk_component(colormap) value "BCGYR" 1944 1926 bind $inner.colormap <<Value>> \ -
trunk/gui/scripts/vtkimageviewer.tcl
r4076 r4336 1701 1701 Rappture::Combobox $inner.colormap -width 10 -editable no 1702 1702 } 1703 $inner.colormap choices insert end \ 1704 "BCGYR" "BCGYR" \ 1705 "BGYOR" "BGYOR" \ 1706 "blue" "blue" \ 1707 "blue-to-brown" "blue-to-brown" \ 1708 "blue-to-orange" "blue-to-orange" \ 1709 "blue-to-grey" "blue-to-grey" \ 1710 "green-to-magenta" "green-to-magenta" \ 1711 "greyscale" "greyscale" \ 1712 "nanohub" "nanohub" \ 1713 "rainbow" "rainbow" \ 1714 "spectral" "spectral" \ 1715 "ROYGB" "ROYGB" \ 1716 "RYGCB" "RYGCB" \ 1717 "brown-to-blue" "brown-to-blue" \ 1718 "grey-to-blue" "grey-to-blue" \ 1719 "orange-to-blue" "orange-to-blue" \ 1720 "none" "none" 1703 $inner.colormap choices insert end [GetColormapList -includeNone] 1721 1704 1722 1705 $itk_component(colormap) value "BCGYR" -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r4188 r4336 864 864 } 865 865 $_image(plot) configure -data $bytes 866 set time [clock seconds]867 set date [clock format $time]868 set w [image width $_image(plot)]869 set h [image height $_image(plot)]866 #set time [clock seconds] 867 #set date [clock format $time] 868 #set w [image width $_image(plot)] 869 #set h [image height $_image(plot)] 870 870 #puts stderr "$date: received image ${w}x${h} image" 871 871 if { $_start > 0 } { … … 1470 1470 } 1471 1471 SendCmd "dataset scalar $_curFldName" 1472 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1472 if { ![info exists _limits($_curFldName)] } { 1473 SendCmd "dataset maprange all" 1474 } else { 1475 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1476 } 1473 1477 SendCmd "cutplane colormode $_colorMode $_curFldName" 1474 1478 SendCmd "contour3d colormode $_colorMode $_curFldName" … … 1677 1681 Rappture::Combobox $inner.colormap -width 10 -editable 0 1678 1682 } 1679 $inner.colormap choices insert end \ 1680 "BCGYR" "BCGYR" \ 1681 "BGYOR" "BGYOR" \ 1682 "blue" "blue" \ 1683 "blue-to-brown" "blue-to-brown" \ 1684 "blue-to-orange" "blue-to-orange" \ 1685 "blue-to-grey" "blue-to-grey" \ 1686 "green-to-magenta" "green-to-magenta" \ 1687 "greyscale" "greyscale" \ 1688 "nanohub" "nanohub" \ 1689 "rainbow" "rainbow" \ 1690 "spectral" "spectral" \ 1691 "ROYGB" "ROYGB" \ 1692 "RYGCB" "RYGCB" \ 1693 "brown-to-blue" "brown-to-blue" \ 1694 "grey-to-blue" "grey-to-blue" \ 1695 "orange-to-blue" "orange-to-blue" 1683 $inner.colormap choices insert end [GetColormapList] 1696 1684 1697 1685 $itk_component(colormap) value "BCGYR" … … 2110 2098 array set style { 2111 2099 -color BCGYR 2100 -cutplanesvisible 0 2101 -edgecolor black 2112 2102 -edges 0 2113 -edgecolor black 2103 -isosurfacevisible 1 2104 -levels 10 2105 -lighting 1 2114 2106 -linewidth 1.0 2115 2107 -opacity 0.6 2108 -outline 0 2109 -xcutplanevisible 1 2110 -xcutplaneposition 50 2111 -ycutplanevisible 1 2112 -ycutplaneposition 50 2113 -zcutplanevisible 1 2114 -zcutplaneposition 50 2116 2115 -wireframe 0 2117 -lighting 12118 -outline 02119 -levels 102120 -cutplanesvisible 02121 -xcutplanevisible 12122 -ycutplanevisible 12123 -zcutplanevisible 12124 -xcutplaneposition 502125 -ycutplaneposition 502126 -zcutplaneposition 502127 -isosurfacevisible 12128 2116 } 2129 2117 array set style [$dataobj style $comp] -
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r4199 r4336 1484 1484 } 1485 1485 # Get the new limits because the field changed. 1486 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1486 if { ![info exists _limits($_curFldName)] } { 1487 SendCmd "dataset maprange all" 1488 } else { 1489 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1490 } 1487 1491 SendCmd "streamlines colormode $_colorMode $_curFldName" 1488 1492 SendCmd "cutplane colormode $_colorMode $_curFldName" … … 1736 1740 Rappture::Combobox $inner.colormap -width 10 -editable no 1737 1741 } 1738 $inner.colormap choices insert end \ 1739 "BCGYR" "BCGYR" \ 1740 "BGYOR" "BGYOR" \ 1741 "blue" "blue" \ 1742 "blue-to-brown" "blue-to-brown" \ 1743 "blue-to-orange" "blue-to-orange" \ 1744 "blue-to-grey" "blue-to-grey" \ 1745 "green-to-magenta" "green-to-magenta" \ 1746 "greyscale" "greyscale" \ 1747 "nanohub" "nanohub" \ 1748 "rainbow" "rainbow" \ 1749 "spectral" "spectral" \ 1750 "ROYGB" "ROYGB" \ 1751 "RYGCB" "RYGCB" \ 1752 "brown-to-blue" "brown-to-blue" \ 1753 "grey-to-blue" "grey-to-blue" \ 1754 "orange-to-blue" "orange-to-blue" 1742 $inner.colormap choices insert end [GetColormapList] 1755 1743 1756 1744 $itk_component(colormap) value "BCGYR" -
trunk/gui/scripts/vtkviewer.tcl
r4199 r4336 1857 1857 Rappture::Combobox $inner.palette -width 10 -editable no 1858 1858 } 1859 $inner.palette choices insert end \ 1860 "BCGYR" "BCGYR" \ 1861 "BGYOR" "BGYOR" \ 1862 "blue" "blue" \ 1863 "blue-to-brown" "blue-to-brown" \ 1864 "blue-to-orange" "blue-to-orange" \ 1865 "blue-to-grey" "blue-to-grey" \ 1866 "green-to-magenta" "green-to-magenta" \ 1867 "greyscale" "greyscale" \ 1868 "nanohub" "nanohub" \ 1869 "rainbow" "rainbow" \ 1870 "spectral" "spectral" \ 1871 "ROYGB" "ROYGB" \ 1872 "RYGCB" "RYGCB" \ 1873 "brown-to-blue" "brown-to-blue" \ 1874 "grey-to-blue" "grey-to-blue" \ 1875 "orange-to-blue" "orange-to-blue" 1876 1859 $inner.palette choices insert end [GetColormapList] 1877 1860 $itk_component(meshpalette) value "BCGYR" 1878 1861 bind $inner.palette <<Value>> \ … … 2230 2213 Rappture::Combobox $inner.palette -width 10 -editable no 2231 2214 } 2232 $inner.palette choices insert end \ 2233 "elementDefault" "elementDefault" \ 2234 "BCGYR" "BCGYR" \ 2235 "BGYOR" "BGYOR" \ 2236 "blue" "blue" \ 2237 "blue-to-brown" "blue-to-brown" \ 2238 "blue-to-orange" "blue-to-orange" \ 2239 "blue-to-grey" "blue-to-grey" \ 2240 "green-to-magenta" "green-to-magenta" \ 2241 "greyscale" "greyscale" \ 2242 "nanohub" "nanohub" \ 2243 "rainbow" "rainbow" \ 2244 "spectral" "spectral" \ 2245 "ROYGB" "ROYGB" \ 2246 "RYGCB" "RYGCB" \ 2247 "brown-to-blue" "brown-to-blue" \ 2248 "grey-to-blue" "grey-to-blue" \ 2249 "orange-to-blue" "orange-to-blue" 2250 2215 $inner.palette choices insert end [GetColormapList -includeElementDefault] 2251 2216 $itk_component(moleculepalette) value "elementDefault" 2252 2217 bind $inner.palette <<Value>> \ -
trunk/gui/scripts/vtkvolumeviewer.tcl
r4257 r4336 1815 1815 Rappture::Combobox $inner.colormap -width 10 -editable no 1816 1816 } 1817 $inner.colormap choices insert end \ 1818 "default" "default" \ 1819 "BCGYR" "BCGYR" \ 1820 "BGYOR" "BGYOR" \ 1821 "blue" "blue" \ 1822 "blue-to-brown" "blue-to-brown" \ 1823 "blue-to-orange" "blue-to-orange" \ 1824 "blue-to-grey" "blue-to-grey" \ 1825 "green-to-magenta" "green-to-magenta" \ 1826 "greyscale" "greyscale" \ 1827 "nanohub" "nanohub" \ 1828 "rainbow" "rainbow" \ 1829 "spectral" "spectral" \ 1830 "ROYGB" "ROYGB" \ 1831 "RYGCB" "RYGCB" \ 1832 "brown-to-blue" "brown-to-blue" \ 1833 "grey-to-blue" "grey-to-blue" \ 1834 "orange-to-blue" "orange-to-blue" 1817 $inner.colormap choices insert end [GetColormapList -includeDefault] 1835 1818 1836 1819 bind $inner.colormap <<Value>> \
Note: See TracChangeset
for help on using the changeset viewer.