Changeset 3930


Ignore:
Timestamp:
Sep 17, 2013, 9:32:26 AM (11 years ago)
Author:
gah
Message:

fix limits in nanovis to display title/units

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

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

    r3917 r3930  
    102102    public method numComponents {cname}
    103103    public method fieldlimits {}
     104    public method valueLimits { cname }
    104105    public method flowhints { cname }
    105106    public method hints {{key ""}}
     
    404405    }
    405406    error "can't get field blob: Unknown component \"$cname\": should be one of [join [lsort [array names _comp2dims]] {, }]"
     407}
     408
     409itcl::body Rappture::Field::valueLimits { cname } {
     410    if { [info exists _comp2limits($cname)] } {
     411        return $_comp2limits($cname)
     412    }
     413    return ""
    406414}
    407415
     
    900908            set _dim 3
    901909            set _comp2dims($cname) "3D"
     910            set data [$_field get -decode no $cname.$type]
     911            set contents [Rappture::encoding::decode -as zb64 $data]
     912            if { $contents == "" } {
     913                puts stderr "WARNING: no data for \"$_path.$cname.$type\""
     914                continue;               # Ignore this component
     915            }
     916            if 1 {
     917                set f [open /tmp/$_path.$cname.dx "w"]
     918                puts -nonewline $f $contents
     919                close $f
     920            }
     921            if { [catch { Rappture::DxToVtk $contents } vtkdata] == 0 } {
     922                ReadVtkDataSet $cname $vtkdata
     923            } else {
     924                puts stderr "Can't parse dx data: $vtkdata"
     925            }
     926            if 1 {
     927                set f [open /tmp/$_path.$cname.vtk "w"]
     928                puts -nonewline $f $vtkdata
     929                close $f
     930            }
    902931            if { $_viewer != "nanovis" } {
    903                 set vtkdata  [$_field get -decode yes $cname.$type]
    904                 if { $vtkdata == "" } {
    905                     puts stderr "WARNING: no data for \"$_path.$cname.$type\""
    906                     continue;               # Ignore this component
    907                 }
    908                 if 0 {
    909                     set f [open /tmp/$_path.$cname.dx "w"]
    910                     puts -nonewline $f $vtkdata
    911                     close $f
    912                 }
    913                 set vtkdata  [Rappture::DxToVtk $vtkdata]
    914                 if 0 {
    915                     set f [open /tmp/$_path.$cname.vtk "w"]
    916                     puts -nonewline $f $vtkdata
    917                     close $f
    918                 }
    919                 ReadVtkDataSet $cname $vtkdata
    920932                set _type "vtk"
    921933                set _comp2vtk($cname) $vtkdata
    922934            } else {
    923                 set contents [$_field get -decode no $cname.$type]
    924                 if { $contents == "" } {
    925                     puts stderr "WARNING: no data for \"$_path.$cname.$type\""
    926                     continue;               # Ignore this component
    927                 }
    928935                set _type "dx"
    929                 set _comp2dx($cname) $contents
     936                set _comp2dx($cname) $data
    930937            }
    931938            set _comp2style($cname) [$_field get $cname.style]
     
    934941                    [Rappture::FlowHints ::\#auto $_field $cname $_units]
    935942            }
     943            set _dim 3
    936944            incr _counter
    937945        } elseif { $type == "ucd"} {
  • trunk/gui/scripts/isomarker.tcl

    r3362 r3930  
    3030    private common   _normalIcon [Rappture::icon nvlegendmark]
    3131    private common   _activeIcon [Rappture::icon nvlegendmark2]
     32    private method EnterTick {}
     33    private method LeaveTick {}
     34    private method StartDrag { x y }
     35    private method ContinueDrag { x y }
     36    private method StopDrag { x y }
    3237
    33     constructor {c obj tf args} {
    34         set _canvas $c
    35         set _nvobj $obj
    36         set _tf $tf
    37         set w [winfo width $_canvas]
    38         set h [winfo height $_canvas]
    39         set _tick [$c create image 0 $h \
    40                 -image $_normalIcon -anchor s \
    41                 -tags "$this $obj" -state hidden]
    42         set _label [$c create text 0 $h \
    43                 -anchor n -fill white -font "Helvetica 8" \
    44                 -tags "$this $obj" -state hidden]
    45         $c bind $_tick <Enter> [itcl::code $this HandleEvent "enter"]
    46         $c bind $_tick <Leave> [itcl::code $this HandleEvent "leave"]
    47         $c bind $_tick <ButtonPress-1> \
    48             [itcl::code $this HandleEvent "start" %x %y]
    49         $c bind $_tick <B1-Motion> \
    50             [itcl::code $this HandleEvent "update" %x %y]
    51         $c bind $_tick <ButtonRelease-1> \
    52             [itcl::code $this HandleEvent "end" %x %y]
     38    constructor {c obj tf args} {}
     39    destructor {}
     40    public method transferfunc {}
     41    public method activate { bool }
     42    public method visible { bool }
     43    public method screenpos {}
     44    public method absval { {x "-get"} }
     45    public method relval  { {x "-get"} }
     46}
     47
     48itcl::body Rappture::IsoMarker::constructor {c obj tf args} {
     49    set _canvas $c
     50    set _nvobj $obj
     51    set _tf $tf
     52    set w [winfo width $_canvas]
     53    set h [winfo height $_canvas]
     54    set _tick [$c create image 0 $h \
     55                   -image $_normalIcon -anchor s \
     56                   -tags "$this $obj" -state hidden]
     57    set _label [$c create text 0 $h \
     58                    -anchor n -fill white -font "Helvetica 8" \
     59                    -tags "$this $obj" -state hidden]
     60    $c bind $_tick <Enter>           [itcl::code $this EnterTick]
     61    $c bind $_tick <Leave>           [itcl::code $this LeaveTick]
     62    $c bind $_tick <ButtonPress-1>   [itcl::code $this StartDrag %x %y]
     63    $c bind $_tick <B1-Motion>       [itcl::code $this ContinueDrag %x %y]
     64    $c bind $_tick <ButtonRelease-1> [itcl::code $this StopDrag %x %y]
     65}
     66
     67itcl::body Rappture::IsoMarker::destructor {} {
     68    $_canvas delete $this
     69}
     70
     71itcl::body Rappture::IsoMarker::transferfunc {} {
     72    return $_tf
     73}
     74
     75itcl::body Rappture::IsoMarker::activate { bool } {
     76    if  { $bool || $_activePress || $_activeMotion } {
     77        $_canvas itemconfigure $_label -state normal
     78        $_canvas itemconfigure $_tick -image $_activeIcon
     79        $_canvas itemconfigure title -state hidden
     80    } else {
     81        $_canvas itemconfigure $_label -state hidden
     82        $_canvas itemconfigure $_tick -image $_normalIcon
     83        $_canvas itemconfigure title -state normal
    5384    }
    54     destructor {
    55         $_canvas delete $this
     85}
     86
     87itcl::body Rappture::IsoMarker::visible { bool } {
     88    if { $bool } {
     89        absval $_value
     90        $_canvas itemconfigure $_tick -state normal
     91        $_canvas raise $_tick
     92    } else {
     93        $_canvas itemconfigure $_tick -state hidden
    5694    }
    57     public method transferfunc {} {
    58         return $_tf
     95}
     96
     97itcl::body Rappture::IsoMarker::screenpos { } {
     98    set x [relval]
     99    if { $x < 0.0 } {
     100        set x 0.0
     101    } elseif { $x > 1.0 } {
     102        set x 1.0
    59103    }
    60     public method activate { bool } {
    61         if  { $bool || $_activePress || $_activeMotion } {
    62             $_canvas itemconfigure $_label -state normal
    63             $_canvas itemconfigure $_tick -image $_activeIcon
    64         } else {
    65             $_canvas itemconfigure $_label -state hidden
    66             $_canvas itemconfigure $_tick -image $_normalIcon
    67         }
     104    set low 10
     105    set w [winfo width $_canvas]
     106    set high [expr {$w  - 10}]
     107    set x [expr {round($x*($high - $low) + $low)}]
     108    return $x
     109}
     110
     111itcl::body Rappture::IsoMarker::absval { {x "-get"} } {
     112    if { $x != "-get" } {
     113        set _value $x
     114        set y 31
     115        $_canvas itemconfigure $_label -text [format %.2g $_value]
     116        set x [screenpos]
     117        $_canvas coords $_tick $x [expr {$y+3}]
     118        $_canvas coords $_label $x [expr {$y+5}]
    68119    }
    69     public method visible { bool } {
    70         if { $bool } {
    71             absval $_value
    72             $_canvas itemconfigure $_tick -state normal
    73             $_canvas raise $_tick
    74         } else {
    75             $_canvas itemconfigure $_tick -state hidden
    76         }
    77     }
    78     public method screenpos { } {
    79         set x [relval]
    80         if { $x < 0.0 } {
    81             set x 0.0
    82         } elseif { $x > 1.0 } {
    83             set x 1.0
    84         }
    85         set low 10
    86         set w [winfo width $_canvas]
    87         set high [expr {$w  - 10}]
    88         set x [expr {round($x*($high - $low) + $low)}]
    89         return $x
    90     }
    91     public method absval { {x "-get"} } {
    92         if { $x != "-get" } {
    93             set _value $x
    94             set y 31
    95             $_canvas itemconfigure $_label -text [format %.2g $_value]
    96             set x [screenpos]
    97             $_canvas coords $_tick $x [expr {$y+3}]
    98             $_canvas coords $_label $x [expr {$y+5}]
    99         }
    100         return $_value
    101     }
    102     public method relval  { {x "-get"} } {
    103         if { $x == "-get" } {
    104             array set limits [$_nvobj limits $_tf]
    105             if { $limits(vmax) == $limits(vmin) } {
    106                 if { $limits(vmax) == 0.0 } {
    107                     set limits(vmin) 0.0
    108                     set limits(vmax) 1.0
    109                 } else {
    110                     set limits(vmax) [expr $limits(vmin) + 1.0]
    111                 }
    112             }
    113             return [expr {($_value-$limits(vmin))/
    114                           ($limits(vmax) - $limits(vmin))}]
    115         }
    116         array set limits [$_nvobj limits $_tf]
    117         if { $limits(vmax) == $limits(vmin) } {
    118             set limits(vmin) 0.0
    119             set limits(vmax) 1.0
    120         }
    121         if { [catch {expr $limits(vmax) - $limits(vmin)} r] != 0 } {
    122             return 0.0
    123         }           
    124         absval [expr {($x * $r) + $limits(vmin)}]
    125     }
    126     private method HandleEvent { option args } {
    127         switch -- $option {
    128             enter {
    129                 set _activeMotion 1
    130                 activate yes
    131                 $_canvas raise $_tick
    132             }
    133             leave {
    134                 set _activeMotion 0
    135                 activate no
    136             }
    137             start {
    138                 $_canvas raise $_tick
    139                 set _activePress 1
    140                 activate yes
    141                 $_canvas itemconfigure limits -state hidden
    142             }
    143             update {
    144                 set w [winfo width $_canvas]
    145                 set x [lindex $args 0]
    146                 relval [expr {double($x-10)/($w-20)}]
    147                 $_nvobj overmarker $this $x
    148                 $_nvobj updatetransferfuncs
    149             }
    150             end {
    151                 set x [lindex $args 0]
    152                 if { ![$_nvobj rmdupmarker $this $x]} {
    153                     eval HandleEvent update $args
    154                 }
    155                 set _activePress 0
    156                 activate no
    157                 $_canvas itemconfigure limits -state normal
    158             }
    159             default {
    160                 error "bad option \"$option\": should be start, update, end"
     120    return $_value
     121}
     122
     123itcl::body Rappture::IsoMarker::relval  { {x "-get"} } {
     124    foreach {min max} [$_nvobj limits $_tf] break
     125    if { $x == "-get" } {
     126        if { $max == $min } {
     127            if { $max == 0.0 } {
     128                set min 0.0
     129                set max 1.0
     130            } else {
     131                set max [expr $min + 1.0]
    161132            }
    162133        }
     134        return [expr {($_value - $min) / ($max - $min)}]
     135    }
     136    if { $max == $min } {
     137        set min 0.0
     138        set max 1.0
    163139    }
     140    if { [catch {expr $max - $min} r] != 0 } {
     141        return 0.0
     142    }           
     143    absval [expr {($x * $r) + $min}]
    164144}
     145
     146itcl::body Rappture::IsoMarker::EnterTick {} {
     147    set _activeMotion 1
     148    activate yes
     149    $_canvas raise $_tick
     150}
     151
     152itcl::body Rappture::IsoMarker::LeaveTick {} {
     153    set _activeMotion 0
     154    activate no
     155}
     156
     157itcl::body Rappture::IsoMarker::StartDrag { x y } {
     158    $_canvas raise $_tick
     159    set _activePress 1
     160    activate yes
     161    $_canvas itemconfigure limits -state hidden
     162    $_canvas itemconfigure title -state hidden
     163}
     164
     165itcl::body Rappture::IsoMarker::StopDrag { x y } {
     166    if { ![$_nvobj removeDuplicateMarker $this $x]} {
     167        ContinueDrag $x $y
     168    }
     169    set _activePress 0
     170    activate no
     171    $_canvas itemconfigure limits -state normal
     172    $_canvas itemconfigure title -state normal
     173}
     174
     175itcl::body Rappture::IsoMarker::ContinueDrag { x y } {
     176    set w [winfo width $_canvas]
     177    relval [expr {double($x-10)/($w-20)}]
     178    $_nvobj overMarker $this $x
     179    $_nvobj updateTransferFunctions
     180    $_canvas raise $_tick
     181    set _activePress 1
     182    activate yes
     183    $_canvas itemconfigure limits -state hidden
     184    $_canvas itemconfigure title -state hidden
     185}
     186
  • trunk/gui/scripts/nanovisviewer.tcl

    r3925 r3930  
    7676    public method isconnected {}
    7777    public method limits { tf }
    78     public method overmarker { m x }
     78    public method overMarker { m x }
    7979    public method parameters {title args} {
    8080        # do nothing
    8181    }
    82     public method rmdupmarker { m x }
     82    public method removeDuplicateMarker { m x }
    8383    public method scale {args}
    84     public method updatetransferfuncs {}
     84    public method updateTransferFunctions {}
    8585
    8686    protected method Connect {}
     
    9696    protected method ReceiveImage { args }
    9797    protected method ReceiveLegend { tf vmin vmax size }
     98    protected method DrawLegend { cname }
    9899    protected method Rotate {option x y}
    99100    protected method SendTransferFuncs {}
     
    136137    private variable _serverTfs    ;# contains all the transfer functions
    137138                                   ;# in the server.
    138     private variable _recvdDatasets    ;# list of data objs to send to server
    139     private variable _dataset2style    ;# maps dataobj-component to transfunc
    140     private variable _style2datasets   ;# maps tf back to list of
    141                                     # dataobj-components using the tf.
    142 
    143     private variable _reset 1;          # Connection to server has been reset 
    144     private variable _click        ;# info used for rotate operations
    145     private variable _limits       ;# autoscale min/max for all axes
    146     private variable _view         ;# view params for 3D view
    147     private variable _isomarkers    ;# array of isosurface level values 0..1
     139    private variable _recvdDatasets;    # list of data objs to send to server
     140    private variable _dataset2style;    # maps dataobj-component to transfunc
     141    private variable _style2datasets;   # maps tf back to list of
     142                                        # dataobj-components using the tf.
     143
     144    private variable _reset 1;          # Connection to server has been reset.
     145    private variable _click;            # Info used for rotate operations.
     146    private variable _limits;           # Autoscale min/max for all axes
     147    private variable _view;             # View params for 3D view
     148    private variable _isomarkers;       # Array of isosurface level values 0..1
    148149    private variable  _settings
    149150    # Array of transfer functions in server.  If 0 the transfer has been
     
    220221    $_arcball quaternion $q
    221222
    222     set _limits(vmin) 0.0
    223     set _limits(vmax) 1.0
     223    set _limits(v) [list 0.0 1.0]
    224224    set _reset 1
    225225
     
    530530        if { $pos >= 0 } {
    531531            set _dlist [lreplace $_dlist $pos $pos]
    532             array unset _limits $dataobj*
    533532            array unset _obj2ovride $dataobj-*
    534533            array unset _dataset2style $dataobj-*
     
    552551# ----------------------------------------------------------------------
    553552itcl::body Rappture::NanovisViewer::scale {args} {
    554     foreach val {xmin xmax ymin ymax zmin zmax vmin vmax} {
    555         set _limits($val) ""
    556     }
     553    array set style {
     554        -color BCGYR
     555        -levels 6
     556        -opacity 1.0
     557        -markers ""
     558    }
     559    array unset _limits
    557560    array unset _volcomponents
    558561    foreach dataobj $args {
     
    569572            }
    570573            lappend _volcomponents($cname) $dataobj-$cname
     574            array unset limits
     575            array set limits [$dataobj valueLimits $cname]
     576            set _limits($cname) $limits(v)
    571577        }
    572578        foreach axis {x y z v} {
    573579            foreach { min max } [$dataobj limits $axis] break
    574580            if {"" != $min && "" != $max} {
    575                 if {"" == $_limits(${axis}min)} {
    576                     set _limits(${axis}min) $min
    577                     set _limits(${axis}max) $max
     581                if { ![info exists _limits($axis)] } {
     582                    set _limits($axis) [list $min $max]
    578583                } else {
    579                     if {$min < $_limits(${axis}min)} {
    580                         set _limits(${axis}min) $min
     584                    foreach {amin amax} $_limits($axis) break
     585                    if {$min < $amin} {
     586                        set amin $min
    581587                    }
    582                     if {$max > $_limits(${axis}max)} {
    583                         set _limits(${axis}max) $max
     588                    if {$max > $amax} {
     589                        set amax $max
    584590                    }
     591                    set _limits($axis) [list $amin $amax]
    585592                }
    586593            }
     
    760767
    761768#
    762 # ReceiveLegend --
    763 #
    764 #       The procedure is the response from the render server to each "legend"
    765 #       command.  The server sends back a "legend" command invoked our
    766 #       the slave interpreter.  The purpose is to collect data of the image
    767 #       representing the legend in the canvas.  In addition, the isomarkers
    768 #       of the active transfer function are displayed.
    769 #
    770 #       I don't know is this is the right place to display the isomarkers.
    771 #       I don't know all the different paths used to draw the plot. There's
    772 #       "Rebuild", "add", etc.
    773 #
    774 itcl::body Rappture::NanovisViewer::ReceiveLegend { tf vmin vmax size } {
    775     if { ![isconnected] } {
    776         return
    777     }
    778     set bytes [ReceiveBytes $size]
    779     $_image(legend) configure -data $bytes
    780     ReceiveEcho <<line "<read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
    781 
     769# DrawLegend --
     770#
     771itcl::body Rappture::NanovisViewer::DrawLegend { cname } {
    782772    set c $itk_component(legend)
    783773    set w [winfo width $c]
     
    789779            -image $_image(legend) -tags transfunc
    790780        $c create text $lx $ly -anchor sw \
    791             -fill $itk_option(-plotforeground) -tags "limits vmin"
     781            -fill $itk_option(-plotforeground) -tags "limits text vmin"
    792782        $c create text [expr {$w-$lx}] $ly -anchor se \
    793             -fill $itk_option(-plotforeground) -tags "limits vmax"
     783            -fill $itk_option(-plotforeground) -tags "limits text vmax"
     784        $c create text [expr {$w/2}] $ly -anchor s \
     785            -fill $itk_option(-plotforeground) -tags "limits text title"
    794786        $c lower transfunc
    795787        $c bind transfunc <ButtonRelease-1> \
     
    798790    # Display the markers used by the active transfer function.
    799791
    800     array set limits [limits $tf]
    801     $c itemconfigure vmin -text [format %.2g $limits(min)]
     792    foreach {min max} $_limits($cname) break
     793    $c itemconfigure vmin -text [format %.2g $min]
    802794    $c coords vmin $lx $ly
    803795
    804     $c itemconfigure vmax -text [format %.2g $limits(max)]
     796    $c itemconfigure vmax -text [format %.2g $max]
    805797    $c coords vmax [expr {$w-$lx}] $ly
    806798
     799    set title [$_first hints label]
     800    set units [$_first hints units]
     801    if { $units != "" } {
     802        set title "$title ($units)"
     803    }
     804    $c itemconfigure title -text $title
     805    $c coords title [expr {$w/2}] $ly
    807806
    808807    HideAllMarkers
    809     if { [info exists _isomarkers($tf)] } {
    810         foreach m $_isomarkers($tf) {
     808    if { [info exists _isomarkers($cname)] } {
     809        foreach m $_isomarkers($cname) {
    811810            $m visible yes
    812811        }
     
    833832
    834833#
     834#
     835# ReceiveLegend --
     836#
     837#       The procedure is the response from the render server to each "legend"
     838#       command.  The server sends back a "legend" command invoked our
     839#       the slave interpreter.  The purpose is to collect data of the image
     840#       representing the legend in the canvas.  In addition, the isomarkers
     841#       of the active transfer function are displayed.
     842#
     843#       I don't know is this is the right place to display the isomarkers.
     844#       I don't know all the different paths used to draw the plot. There's
     845#       "Rebuild", "add", etc.
     846#
     847itcl::body Rappture::NanovisViewer::ReceiveLegend { cname vmin vmax size } {
     848    if { ![isconnected] } {
     849        return
     850    }
     851    set bytes [ReceiveBytes $size]
     852    $_image(legend) configure -data $bytes
     853    ReceiveEcho <<line "<read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
     854
     855    DrawLegend $_current
     856}
     857
     858#
    835859# ReceiveData --
    836860#
     
    872896        SendCmd "volume state 1 $tag"
    873897    }
    874     set _limits($tag-min)  $info(min);  # Minimum value of the volume.
    875     set _limits($tag-max)  $info(max);  # Maximum value of the volume.
    876     set _limits(vmin)      $info(vmin); # Overall minimum value.
    877     set _limits(vmax)      $info(vmax); # Overall maximum value.
     898    set _limits($tag) [list $info(min)  $info(max)]
     899    set _limits(v)    [list $info(vmin) $info(vmax)]
    878900
    879901    unset _recvdDatasets($tag)
     
    882904        # the first data object.  This assumes that the data is always
    883905        # successfully transferred.
    884         updatetransferfuncs
     906        updateTransferFunctions
    885907    }
    886908}
     
    10081030        set cname [lindex [$_first components] 0]
    10091031        if { [info exists _serverDatasets($_first-$cname)] } {
    1010             updatetransferfuncs
     1032            updateTransferFunctions
    10111033        }
    10121034    }
     
    10981120
    10991121itcl::body Rappture::NanovisViewer::PanCamera {} {
    1100     #set x [expr ($_view(xpan)) / $_limits(xrange)]
    1101     #set y [expr ($_view(ypan)) / $_limits(yrange)]
    11021122    set x $_view(xpan)
    11031123    set y $_view(ypan)
     
    12781298        opacity {
    12791299            error "this should not be called"
    1280             set val $_settings($this-opacity)
    1281             set sval [expr { 0.01 * double($val) }]
    1282             set _settings($this-opacity) $sval
    1283             set _settings($_current-opacity) $sval
    1284             updatetransferfuncs
     1300            set _settings($_current-opacity) $_settings($this-opacity)
     1301            updateTransferFunctions
    12851302        }
    12861303        thickness {
    12871304            set val $_settings($this-thickness)
    12881305            set _settings($_current-thickness) $val
    1289             # Scale values between 0.00001 and 0.01000
    1290             set sval [expr {0.0001*double($val)}]
    1291             updatetransferfuncs
     1306            updateTransferFunctions
    12921307        }
    12931308        "outline" {
     
    15531568# USAGE: UndateTransferFuncs
    15541569# ----------------------------------------------------------------------
    1555 itcl::body Rappture::NanovisViewer::updatetransferfuncs {} {
     1570itcl::body Rappture::NanovisViewer::updateTransferFunctions {} {
    15561571    $_dispatcher event -idle !send_transfunc
    15571572}
     
    15681583    $m relval [expr {double($x-10)/($w-20)}]
    15691584    lappend _isomarkers($cname) $m
    1570     updatetransferfuncs
     1585    updateTransferFunctions
    15711586    return 1
    15721587}
    15731588
    1574 itcl::body Rappture::NanovisViewer::rmdupmarker { marker x } {
     1589itcl::body Rappture::NanovisViewer::removeDuplicateMarker { marker x } {
    15751590    set bool 0
    15761591    if { [info exists _isomarkers($_current)] } {
     
    15911606        }
    15921607        set _isomarkers($_current) $list
    1593         updatetransferfuncs
     1608        updateTransferFunctions
    15941609    }
    15951610    return $bool
    15961611}
    15971612
    1598 itcl::body Rappture::NanovisViewer::overmarker { marker x } {
     1613itcl::body Rappture::NanovisViewer::overMarker { marker x } {
    15991614    if { [info exists _isomarkers($_current)] } {
    16001615        set marker [namespace tail $marker]
     
    16171632    }
    16181633    set min ""; set max ""
    1619     foreach tag $_style2datasets($cname) {
    1620         if { ![info exists _serverDatasets($tag)] } {
     1634    foreach tag [GetDatasetsWithComponent $cname] {
     1635        if { ![info exists _limits($tag)] } {
    16211636            continue
    16221637        }
    1623         if { ![info exists _limits($tag-min)] } {
    1624             continue
    1625         }
    1626         if { $min == "" || $min > $_limits($tag-min) } {
    1627             set min $_limits($tag-min)
    1628         }
    1629         if { $max == "" || $max < $_limits($tag-max) } {
    1630             set max $_limits($tag-max)
     1638        foreach {amin amax} $_limits($tag) break
     1639        if { $min == "" || $min > $amin } {
     1640            set min $amin
     1641        }
     1642        if { $max == "" || $max < $amax } {
     1643            set max $amax
    16311644        }
    16321645    }
     
    16371650        set _limits(max) $max
    16381651    }
    1639     return [array get _limits]
     1652    return [list $_limits(min) $_limits(max)]
    16401653}
    16411654
     
    17491762        -command [itcl::code $this AdjustSetting specularExponent]
    17501763
    1751     label $inner.transp_l -text "Transparency" -font $font
    1752     ::scale $inner.transp -from 100 -to 0 -orient horizontal \
     1764    label $inner.transp_l -text "Opacity" -font $font
     1765    ::scale $inner.transp -from 0 -to 100 -orient horizontal \
    17531766        -variable [itcl::scope _settings($this-transp)] \
    17541767        -showvalue off -command [itcl::code $this AdjustSetting transp]
     
    20152028itcl::body Rappture::NanovisViewer::SlicerTip {axis} {
    20162029    set val [$itk_component(${axis}CutScale) get]
    2017 #    set val [expr {0.01*($val-50)
    2018 #        *($_limits(${axis}max)-$_limits(${axis}min))
    2019 #          + 0.5*($_limits(${axis}max)+$_limits(${axis}min))}]
    20202030    return "Move the [string toupper $axis] cut plane.\nCurrently:  $axis = $val%"
    20212031}
Note: See TracChangeset for help on using the changeset viewer.