Changeset 5241
- Timestamp:
- Apr 15, 2015 2:22:49 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/vtkvolumeviewer.tcl
r5240 r5241 220 220 axesVisible 1 221 221 axisLabels 1 222 cutplaneEdges 0223 222 cutplane-xvisible 1 224 223 cutplane-yvisible 1 … … 229 228 cutplaneVisible 0 230 229 cutplaneLighting 1 231 cutplaneWireframe 0232 230 cutplane-opacity 100 233 231 volumeLighting 1 234 232 volume-material 80 235 volume-opacity 40233 volume-opacity 50 236 234 volume-quality 50 237 235 volumeVisible 1 … … 1346 1344 SendCmd "axis flymode $mode" 1347 1345 } 1348 "cutplaneEdges" {1349 set bool $_settings($what)1350 foreach dataset [CurrentDatasets -visible] {1351 SendCmd "$_cutplaneCmd edges $bool $dataset"1352 }1353 }1354 1346 "cutplaneVisible" { 1355 1347 set bool $_settings($what) 1356 1348 foreach dataset [CurrentDatasets -visible] { 1357 1349 SendCmd "$_cutplaneCmd visible $bool $dataset" 1358 }1359 }1360 "cutplaneWireframe" {1361 set bool $_settings($what)1362 foreach dataset [CurrentDatasets -visible] {1363 SendCmd "$_cutplaneCmd wireframe $bool $dataset"1364 1350 } 1365 1351 } … … 1718 1704 4,3 $inner.zgrid -anchor w \ 1719 1705 5,0 $inner.mode_l -anchor w -padx { 2 0 } \ 1720 6,0$inner.mode -fill x -cspan 31706 5,1 $inner.mode -fill x -cspan 3 1721 1707 1722 1708 blt::table configure $inner r* c* -resize none … … 1777 1763 -font "Arial 9" 1778 1764 1779 checkbutton $inner.wireframe \1780 -text "Show Wireframe" \1781 -variable [itcl::scope _settings(cutplaneWireframe)] \1782 -command [itcl::code $this AdjustSetting cutplaneWireframe] \1783 -font "Arial 9"1784 1785 1765 checkbutton $inner.lighting \ 1786 1766 -text "Enable Lighting" \ 1787 1767 -variable [itcl::scope _settings(cutplaneLighting)] \ 1788 1768 -command [itcl::code $this AdjustSetting cutplaneLighting] \ 1789 -font "Arial 9"1790 1791 checkbutton $inner.edges \1792 -text "Show Edges" \1793 -variable [itcl::scope _settings(cutplaneEdges)] \1794 -command [itcl::code $this AdjustSetting cutplaneEdges] \1795 1769 -font "Arial 9" 1796 1770 … … 1889 1863 0,0 $inner.visible -anchor w -pady 2 -cspan 4 \ 1890 1864 1,0 $inner.lighting -anchor w -pady 2 -cspan 4 \ 1891 2,0 $inner.wireframe -anchor w -pady 2 -cspan 4 \ 1892 3,0 $inner.edges -anchor w -pady 2 -cspan 4 \ 1893 4,0 $inner.opacity_l -anchor w -pady 2 -cspan 3 \ 1894 5,0 $inner.opacity -fill x -pady 2 -cspan 3 \ 1895 6,0 $itk_component(xCutButton) -anchor e -padx 2 -pady 2 \ 1896 7,0 $itk_component(xCutScale) -fill y \ 1897 6,1 $itk_component(yCutButton) -anchor e -padx 2 -pady 2 \ 1898 7,1 $itk_component(yCutScale) -fill y \ 1899 6,2 $itk_component(zCutButton) -anchor e -padx 2 -pady 2 \ 1900 7,2 $itk_component(zCutScale) -fill y \ 1865 2,0 $inner.opacity_l -anchor w -pady 2 -cspan 3 \ 1866 3,0 $inner.opacity -fill x -pady 2 -cspan 3 \ 1867 4,0 $itk_component(xCutButton) -anchor e -padx 2 -pady 2 \ 1868 5,0 $itk_component(xCutScale) -fill y \ 1869 4,1 $itk_component(yCutButton) -anchor e -padx 2 -pady 2 \ 1870 5,1 $itk_component(yCutScale) -fill y \ 1871 4,2 $itk_component(zCutButton) -anchor e -padx 2 -pady 2 \ 1872 5,2 $itk_component(zCutScale) -fill y \ 1901 1873 1902 1874 blt::table configure $inner r* c* -resize none 1903 blt::table configure $inner r 7c3 -resize expand1875 blt::table configure $inner r5 c3 -resize expand 1904 1876 } 1905 1877 … … 2009 1981 # Parse style string. 2010 1982 set tag $dataobj-$cname 2011 set style [$dataobj style $cname] 2012 array set settings { 2013 -color \#808080 2014 -edges 0 2015 -edgecolor black 2016 -linewidth 1.0 2017 -opacity 0.4 2018 -wireframe 0 2019 -lighting 1 2020 -visible 1 2021 } 2022 if { $dataobj != $_first } { 2023 set settings(-opacity) 1 2024 } 2025 array set settings $style 2026 SendCmd "volume add $tag" 1983 array set style { 1984 -color BCGYR 1985 -lighting 1 1986 -opacity 0.5 1987 -outline 0 1988 -visible 1 1989 } 1990 array set style [$dataobj style $cname] 1991 set _settings(volumeLighting) $style(-lighting) 1992 set _settings(volume-opacity) [expr $style(-opacity) * 100] 1993 set _settings(volumeVisible) $style(-visible) 1994 1995 $itk_component(palette) value $style(-color) 1996 2027 1997 SendCmd "$_cutplaneCmd add $tag" 2028 1998 SendCmd "$_cutplaneCmd visible 0 $tag" 2029 1999 2030 SendCmd "volume lighting $settings(-lighting) $tag" 2031 set _settings(volumeLighting) $settings(-lighting) 2000 SendCmd "volume add $tag" 2001 SendCmd "volume lighting $style(-lighting) $tag" 2002 SendCmd "volume opacity $style(-opacity) $tag" 2003 SendCmd "volume visible $style(-visible) $tag" 2004 2032 2005 SetColormap $dataobj $cname 2033 2006 } … … 2049 2022 itcl::body Rappture::VtkVolumeViewer::ReceiveLegend { colormap title vmin vmax size } { 2050 2023 set _legendPending 0 2051 #puts stderr "ReceiveLegend colormap=$colormap title=$title range=$vmin,$vmax size=$size" 2052 if { [IsConnected] } { 2024 if { [isconnected] } { 2053 2025 set bytes [ReceiveBytes $size] 2054 2026 if { ![info exists _image(legend)] } {
Note: See TracChangeset
for help on using the changeset viewer.