Ignore:
Timestamp:
Dec 13, 2011 1:28:39 PM (12 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r2728 r2730  
    10251025                SendCmd "dataset visible 0 $tag"
    10261026            }
     1027            break
    10271028        }
    10281029    }
     
    10731074        }
    10741075        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 ??? } {
    10751088            set _scalarFields($title) $name
    10761089            $itk_component(field) choices insert end "$name" "$title"
     
    14591472            }
    14601473            foreach dataset [CurrentDatasets -visible] {
    1461                 puts stderr "volume colormode $_colorMode ${name} $dataset"
     1474                #puts stderr "volume colormode $_colorMode ${name} $dataset"
    14621475                puts stderr "cutplane colormode $_colorMode ${name} $dataset"
    1463                 SendCmd "volume colormode $_colorMode ${name} $dataset"
     1476                #SendCmd "volume colormode $_colorMode ${name} $dataset"
    14641477                SendCmd "cutplane colormode $_colorMode ${name} $dataset"
    14651478            }
     
    17571770    }
    17581771    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        }
    17631782    }
    17641783    return $cmap
     
    17801799
    17811800    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"
    17821802    SendCmd "colormap add $name { $cmap } { $wmap }"
    17831803}
     
    19331953        "orange-to-blue"     "orange-to-blue"   
    19341954
    1935     $itk_component(palette) value "BCGYR"
     1955    $itk_component(palette) value "nanohub"
    19361956    bind $inner.palette <<Value>> \
    19371957        [itcl::code $this AdjustSetting volume-palette]
Note: See TracChangeset for help on using the changeset viewer.