Changeset 2730 for trunk/gui/scripts/vtkvolumeviewer.tcl
- Timestamp:
- Dec 13, 2011 1:28:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkvolumeviewer.tcl
r2728 r2730 1025 1025 SendCmd "dataset visible 0 $tag" 1026 1026 } 1027 break 1027 1028 } 1028 1029 } … … 1073 1074 } 1074 1075 foreach { name title units } [$_first hints scalars] { 1076 set _scalarFields($title) $name 1077 $itk_component(field) choices insert end "$name" "$title" 1078 $itk_component(fieldmenu) add radiobutton -label "$title" \ 1079 -value $title -variable [itcl::scope _currentField] \ 1080 -selectcolor red \ 1081 -activebackground black \ 1082 -activeforeground white \ 1083 -font "Arial 8" \ 1084 -command [itcl::code $this Combo invoke] 1085 set _fields($name) [list $title $units] 1086 } 1087 foreach { name title units } { default Default ??? } { 1075 1088 set _scalarFields($title) $name 1076 1089 $itk_component(field) choices insert end "$name" "$title" … … 1459 1472 } 1460 1473 foreach dataset [CurrentDatasets -visible] { 1461 puts stderr "volume colormode $_colorMode ${name} $dataset"1474 #puts stderr "volume colormode $_colorMode ${name} $dataset" 1462 1475 puts stderr "cutplane colormode $_colorMode ${name} $dataset" 1463 SendCmd "volume colormode $_colorMode ${name} $dataset"1476 #SendCmd "volume colormode $_colorMode ${name} $dataset" 1464 1477 SendCmd "cutplane colormode $_colorMode ${name} $dataset" 1465 1478 } … … 1757 1770 } 1758 1771 set cmap {} 1759 for {set i 0} {$i < [llength $clist]} {incr i} { 1760 set x [expr {double($i)/([llength $clist]-1)}] 1761 set color [lindex $clist $i] 1762 append cmap "$x [Color2RGB $color] " 1772 set nColors [llength $clist] 1773 if { $nColors == 1 } { 1774 append cmap "0.0 [Color2RGB $colors] " 1775 append cmap "1.0 [Color2RGB $colors] " 1776 } else { 1777 for {set i 0} {$i < [llength $clist]} {incr i} { 1778 set x [expr {double($i)/([llength $clist]-1)}] 1779 set color [lindex $clist $i] 1780 append cmap "$x [Color2RGB $color] " 1781 } 1763 1782 } 1764 1783 return $cmap … … 1780 1799 1781 1800 set wmap "0.0 1.0 1.0 1.0" 1801 set wmap "0.0 0.0 0.1 0.0 0.2 0.8 0.98 0.8 0.99 0.0 1.0 0.0" 1782 1802 SendCmd "colormap add $name { $cmap } { $wmap }" 1783 1803 } … … 1933 1953 "orange-to-blue" "orange-to-blue" 1934 1954 1935 $itk_component(palette) value " BCGYR"1955 $itk_component(palette) value "nanohub" 1936 1956 bind $inner.palette <<Value>> \ 1937 1957 [itcl::code $this AdjustSetting volume-palette]
Note: See TracChangeset
for help on using the changeset viewer.