- Timestamp:
- Apr 15, 2015 1:54:57 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/vtkvolumeviewer.tcl
r5236 r5239 785 785 itcl::body Rappture::VtkVolumeViewer::disconnect {} { 786 786 Disconnect 787 set _reset 1 787 788 } 788 789 … … 942 943 set _first "" 943 944 944 SendCmd "dataset visible 0"945 946 945 # No volumes are active (i.e. in the working set of displayed volumes). 947 946 # A volume is always invisible if it's not in the working set. A 948 947 # volume in the working set may be visible/invisible depending upon the 949 948 # global visibility value. 949 SendCmd "dataset visible 0" 950 950 foreach dataobj [get -objects] { 951 951 if { [info exists _obj2ovride($dataobj-raise)] && $_first == "" } { … … 1362 1362 set bool $_settings($what) 1363 1363 foreach dataset [CurrentDatasets -visible] { 1364 SendCmd "$_cutplaneCmd lighting $bool $dataset" 1364 if {$_cutplaneCmd != "imgcutplane"} { 1365 SendCmd "$_cutplaneCmd lighting $bool $dataset" 1366 } else { 1367 if {$bool} { 1368 set ambient 0.0 1369 set diffuse 1.0 1370 } else { 1371 set ambient 1.0 1372 set diffuse 0.0 1373 } 1374 SendCmd "imgcutplane material $ambient $diffuse $dataset" 1375 } 1365 1376 } 1366 1377 } … … 1393 1404 } 1394 1405 set _cutplanePending 0 1395 }1396 "volume-palette" {1397 set palette [$itk_component(palette) value]1398 set _settings(volume-palette) $palette1399 foreach dataset [CurrentDatasets -visible $_first] {1400 foreach {dataobj comp} [split $dataset -] break1401 ChangeColormap $dataobj $comp $palette1402 }1403 set _legendPending 11404 1406 } 1405 1407 "volume-palette" { … … 1648 1650 1649 1651 itcl::body Rappture::VtkVolumeViewer::BuildAxisTab {} { 1650 1651 1652 set fg [option get $itk_component(hull) font Font] 1652 1653 #set bfg [option get $itk_component(hull) boldFont Font] … … 1654 1655 set inner [$itk_component(main) insert end \ 1655 1656 -title "Axis Settings" \ 1656 -icon [Rappture::icon axis 1]]1657 -icon [Rappture::icon axis2]] 1657 1658 $inner configure -borderwidth 4 1658 1659 1659 1660 checkbutton $inner.visible \ 1660 -text " ShowAxes" \1661 -text "Axes" \ 1661 1662 -variable [itcl::scope _settings(axesVisible)] \ 1662 1663 -command [itcl::code $this AdjustSetting axesVisible] \ … … 1664 1665 1665 1666 checkbutton $inner.labels \ 1666 -text " ShowAxis Labels" \1667 -text "Axis Labels" \ 1667 1668 -variable [itcl::scope _settings(axisLabels)] \ 1668 1669 -command [itcl::code $this AdjustSetting axisLabels] \ 1669 1670 -font "Arial 9" 1670 1671 checkbutton $inner. gridx\1672 -text " Show X Grid" \1671 label $inner.grid_l -text "Grid" -font "Arial 9" 1672 checkbutton $inner.xgrid \ 1673 -text "X" \ 1673 1674 -variable [itcl::scope _settings(axis-xgrid)] \ 1674 1675 -command [itcl::code $this AdjustSetting axis-xgrid] \ 1675 1676 -font "Arial 9" 1676 checkbutton $inner. gridy\1677 -text " Show Y Grid" \1677 checkbutton $inner.ygrid \ 1678 -text "Y" \ 1678 1679 -variable [itcl::scope _settings(axis-ygrid)] \ 1679 1680 -command [itcl::code $this AdjustSetting axis-ygrid] \ 1680 1681 -font "Arial 9" 1681 checkbutton $inner. gridz\1682 -text " Show Z Grid" \1682 checkbutton $inner.zgrid \ 1683 -text "Z" \ 1683 1684 -variable [itcl::scope _settings(axis-zgrid)] \ 1684 1685 -command [itcl::code $this AdjustSetting axis-zgrid] \ … … 1699 1700 1700 1701 blt::table $inner \ 1701 0,0 $inner.visible -anchor w -cspan 2 \ 1702 1,0 $inner.labels -anchor w -cspan 2 \ 1703 2,0 $inner.gridx -anchor w -cspan 2 \ 1704 3,0 $inner.gridy -anchor w -cspan 2 \ 1705 4,0 $inner.gridz -anchor w -cspan 2 \ 1706 5,0 $inner.mode_l -anchor w -cspan 2 -padx { 2 0 } \ 1707 6,0 $inner.mode -fill x -cspan 2 1702 0,0 $inner.visible -anchor w -cspan 4 \ 1703 1,0 $inner.labels -anchor w -cspan 4 \ 1704 2,0 $inner.minorticks -anchor w -cspan 4 \ 1705 4,0 $inner.grid_l -anchor w \ 1706 4,1 $inner.xgrid -anchor w \ 1707 4,2 $inner.ygrid -anchor w \ 1708 4,3 $inner.zgrid -anchor w \ 1709 5,0 $inner.mode_l -anchor w -padx { 2 0 } \ 1710 6,0 $inner.mode -fill x -cspan 3 1708 1711 1709 1712 blt::table configure $inner r* c* -resize none 1710 blt::table configure $inner r7 c1 -resize expand 1713 blt::table configure $inner r7 c6 -resize expand 1714 blt::table configure $inner r3 -height 0.125i 1711 1715 } 1712 1716 … … 1992 1996 } 1993 1997 1994 itcl::body Rappture::VtkVolumeViewer::SetObjectStyle { dataobj c omp} {1998 itcl::body Rappture::VtkVolumeViewer::SetObjectStyle { dataobj cname } { 1995 1999 # Parse style string. 1996 set tag $dataobj-$c omp1997 set style [$dataobj style $c omp]2000 set tag $dataobj-$cname 2001 set style [$dataobj style $cname] 1998 2002 array set settings { 1999 2003 -color \#808080 … … 2016 2020 SendCmd "volume lighting $settings(-lighting) $tag" 2017 2021 set _settings(volumeLighting) $settings(-lighting) 2018 SetColormap $dataobj $c omp2022 SetColormap $dataobj $cname 2019 2023 } 2020 2024 … … 2190 2194 } 2191 2195 2192 2193 2196 # ---------------------------------------------------------------------- 2194 2197 # USAGE: Slice move x|y|z <newval> … … 2220 2223 } 2221 2224 } 2222 2223 2225 2224 2226 # ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.