Changeset 3371 for trunk/gui/scripts/vtkheightmapviewer.tcl
- Timestamp:
- Feb 27, 2013, 7:45:07 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r3355 r3371 92 92 private method BuildContourTab {} 93 93 private method BuildDownloadPopup { widget command } 94 private method ColorsToColormap { color }95 94 private method Combo { option } 96 95 private method ConvertToVtkData { dataobj comp } … … 1671 1670 } 1672 1671 1673 itcl::body Rappture::VtkHeightmapViewer::ColorsToColormap { colors } {1674 switch -- $colors {1675 "grey-to-blue" {1676 return {1677 0.0 0.200 0.200 0.2001678 0.14285714285714285 0.400 0.400 0.4001679 0.2857142857142857 0.600 0.600 0.6001680 0.42857142857142855 0.900 0.900 0.9001681 0.5714285714285714 0.800 1.000 1.0001682 0.7142857142857143 0.600 1.000 1.0001683 0.8571428571428571 0.400 0.900 1.0001684 1.0 0.000 0.600 0.8001685 }1686 }1687 "blue-to-grey" {1688 return {1689 0.0 0.000 0.600 0.8001690 0.14285714285714285 0.400 0.900 1.0001691 0.2857142857142857 0.600 1.000 1.0001692 0.42857142857142855 0.800 1.000 1.0001693 0.5714285714285714 0.900 0.900 0.9001694 0.7142857142857143 0.600 0.600 0.6001695 0.8571428571428571 0.400 0.400 0.4001696 1.0 0.200 0.200 0.2001697 }1698 }1699 "blue" {1700 return {1701 0.0 0.900 1.000 1.0001702 0.1111111111111111 0.800 0.983 1.0001703 0.2222222222222222 0.700 0.950 1.0001704 0.3333333333333333 0.600 0.900 1.0001705 0.4444444444444444 0.500 0.833 1.0001706 0.5555555555555556 0.400 0.750 1.0001707 0.6666666666666666 0.300 0.650 1.0001708 0.7777777777777778 0.200 0.533 1.0001709 0.8888888888888888 0.100 0.400 1.0001710 1.0 0.000 0.250 1.0001711 }1712 }1713 "brown-to-blue" {1714 return {1715 0.0 0.200 0.100 0.0001716 0.09090909090909091 0.400 0.187 0.0001717 0.18181818181818182 0.600 0.379 0.2101718 0.2727272727272727 0.800 0.608 0.4801719 0.36363636363636365 0.850 0.688 0.5951720 0.45454545454545453 0.950 0.855 0.8081721 0.5454545454545454 0.800 0.993 1.0001722 0.6363636363636364 0.600 0.973 1.0001723 0.7272727272727273 0.400 0.940 1.0001724 0.8181818181818182 0.200 0.893 1.0001725 0.9090909090909091 0.000 0.667 0.8001726 1.0 0.000 0.480 0.6001727 }1728 }1729 "blue-to-brown" {1730 return {1731 0.0 0.000 0.480 0.6001732 0.09090909090909091 0.000 0.667 0.8001733 0.18181818181818182 0.200 0.893 1.0001734 0.2727272727272727 0.400 0.940 1.0001735 0.36363636363636365 0.600 0.973 1.0001736 0.45454545454545453 0.800 0.993 1.0001737 0.5454545454545454 0.950 0.855 0.8081738 0.6363636363636364 0.850 0.688 0.5951739 0.7272727272727273 0.800 0.608 0.4801740 0.8181818181818182 0.600 0.379 0.2101741 0.9090909090909091 0.400 0.187 0.0001742 1.0 0.200 0.100 0.0001743 }1744 }1745 "blue-to-orange" {1746 return {1747 0.0 0.000 0.167 1.0001748 0.09090909090909091 0.100 0.400 1.0001749 0.18181818181818182 0.200 0.600 1.0001750 0.2727272727272727 0.400 0.800 1.0001751 0.36363636363636365 0.600 0.933 1.0001752 0.45454545454545453 0.800 1.000 1.0001753 0.5454545454545454 1.000 1.000 0.8001754 0.6363636363636364 1.000 0.933 0.6001755 0.7272727272727273 1.000 0.800 0.4001756 0.8181818181818182 1.000 0.600 0.2001757 0.9090909090909091 1.000 0.400 0.1001758 1.0 1.000 0.167 0.0001759 }1760 }1761 "orange-to-blue" {1762 return {1763 0.0 1.000 0.167 0.0001764 0.09090909090909091 1.000 0.400 0.1001765 0.18181818181818182 1.000 0.600 0.2001766 0.2727272727272727 1.000 0.800 0.4001767 0.36363636363636365 1.000 0.933 0.6001768 0.45454545454545453 1.000 1.000 0.8001769 0.5454545454545454 0.800 1.000 1.0001770 0.6363636363636364 0.600 0.933 1.0001771 0.7272727272727273 0.400 0.800 1.0001772 0.8181818181818182 0.200 0.600 1.0001773 0.9090909090909091 0.100 0.400 1.0001774 1.0 0.000 0.167 1.0001775 }1776 }1777 "rainbow" {1778 set clist {1779 "#EE82EE"1780 "#4B0082"1781 "blue"1782 "#008000"1783 "yellow"1784 "#FFA500"1785 "red"1786 }1787 }1788 "BGYOR" {1789 set clist {1790 "blue"1791 "#008000"1792 "yellow"1793 "#FFA500"1794 "red"1795 }1796 }1797 "ROYGB" {1798 set clist {1799 "red"1800 "#FFA500"1801 "yellow"1802 "#008000"1803 "blue"1804 }1805 }1806 "RYGCB" {1807 set clist {1808 "red"1809 "yellow"1810 "green"1811 "cyan"1812 "blue"1813 }1814 }1815 "BCGYR" {1816 set clist {1817 "blue"1818 "cyan"1819 "green"1820 "yellow"1821 "red"1822 }1823 }1824 "spectral" {1825 return {1826 0.0 0.150 0.300 1.0001827 0.1 0.250 0.630 1.0001828 0.2 0.450 0.850 1.0001829 0.3 0.670 0.970 1.0001830 0.4 0.880 1.000 1.0001831 0.5 1.000 1.000 0.7501832 0.6 1.000 0.880 0.6001833 0.7 1.000 0.680 0.4501834 0.8 0.970 0.430 0.3701835 0.9 0.850 0.150 0.1961836 1.0 0.650 0.000 0.1301837 }1838 }1839 "green-to-magenta" {1840 return {1841 0.0 0.000 0.316 0.0001842 0.06666666666666667 0.000 0.526 0.0001843 0.13333333333333333 0.000 0.737 0.0001844 0.2 0.000 0.947 0.0001845 0.26666666666666666 0.316 1.000 0.3161846 0.3333333333333333 0.526 1.000 0.5261847 0.4 0.737 1.000 0.7371848 0.4666666666666667 1.000 1.000 1.0001849 0.5333333333333333 1.000 0.947 1.0001850 0.6 1.000 0.737 1.0001851 0.6666666666666666 1.000 0.526 1.0001852 0.7333333333333333 1.000 0.316 1.0001853 0.8 0.947 0.000 0.9471854 0.8666666666666667 0.737 0.000 0.7371855 0.9333333333333333 0.526 0.000 0.5261856 1.0 0.316 0.000 0.3161857 }1858 }1859 "greyscale" {1860 return {1861 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.01862 }1863 }1864 "nanohub" {1865 set clist "white yellow green cyan blue magenta"1866 }1867 default {1868 set clist $colors1869 }1870 }1871 set cmap {}1872 for {set i 0} {$i < [llength $clist]} {incr i} {1873 set x [expr {double($i)/([llength $clist]-1)}]1874 set color [lindex $clist $i]1875 append cmap "$x [Color2RGB $color] "1876 }1877 return $cmap1878 }1879 1672 1880 1673 #
Note: See TracChangeset
for help on using the changeset viewer.