- Timestamp:
- Mar 11, 2014 8:18:02 AM (10 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
-
branches/1.3/gui/scripts/vtkvolumeviewer.tcl
r3844 r4216 219 219 axis-ygrid 0 220 220 axis-zgrid 0 221 axis-xcutplane 0222 axis-ycutplane 0223 axis-zcutplane 0224 axis-xposition 0225 axis-yposition 0226 axis-zposition 0227 221 axesVisible 1 228 222 axisLabels 1 229 223 cutplaneEdges 0 230 cutplane-xvisible 0231 cutplane-yvisible 0232 cutplane-zvisible 0224 cutplane-xvisible 1 225 cutplane-yvisible 1 226 cutplane-zvisible 1 233 227 cutplane-xposition 50 234 228 cutplane-yposition 50 235 229 cutplane-zposition 50 236 cutplaneVisible 1230 cutplaneVisible 0 237 231 cutplaneLighting 1 238 232 cutplaneWireframe 0 … … 337 331 -command [itcl::code $this AdjustSetting cutplaneVisible] 338 332 } 339 $itk_component(cutplane) select340 333 Rappture::Tooltip::for $itk_component(cutplane) \ 341 334 "Show/Hide cutplanes" … … 1019 1012 foreach { label units components } \ 1020 1013 [$_first fieldinfo $fname] break 1021 $itk_component(field) choices insert end "$fname" "$label" 1022 $itk_component(fieldmenu) add radiobutton -label "$label" \ 1023 -value $label -variable [itcl::scope _curFldLabel] \ 1024 -selectcolor red \ 1025 -activebackground $itk_option(-plotbackground) \ 1026 -activeforeground $itk_option(-plotforeground) \ 1027 -font "Arial 8" \ 1028 -command [itcl::code $this Combo invoke] 1029 set _fields($fname) [list $label $units $components] 1030 if { $_curFldName == "" } { 1031 set _curFldName $fname 1032 set _curFldLabel $label 1014 # Only scalar fields are valid 1015 if {$components == 1} { 1016 $itk_component(field) choices insert end "$fname" "$label" 1017 $itk_component(fieldmenu) add radiobutton -label "$label" \ 1018 -value $label -variable [itcl::scope _curFldLabel] \ 1019 -selectcolor red \ 1020 -activebackground $itk_option(-plotbackground) \ 1021 -activeforeground $itk_option(-plotforeground) \ 1022 -font "Arial 8" \ 1023 -command [itcl::code $this Combo invoke] 1024 set _fields($fname) [list $label $units $components] 1025 if { $_curFldName == "" } { 1026 set _curFldName $fname 1027 set _curFldLabel $label 1028 } 1033 1029 } 1034 1030 } … … 1421 1417 foreach { label units components } $_fields($fname) break 1422 1418 if { $components > 1 } { 1423 set _colorMode vmag 1419 puts stderr "Can't use a vector field in a volume" 1420 return 1424 1421 } else { 1425 1422 set _colorMode scalar … … 1431 1428 return 1432 1429 } 1433 SendCmd "volume colormode $_colorMode ${name} $dataset" 1434 SendCmd "cutplane colormode $_colorMode ${name} $dataset" 1430 foreach dataset [CurrentDatasets -visible $_first] { 1431 #SendCmd "volume colormode $_colorMode ${fname} $dataset" 1432 SendCmd "cutplane colormode $_colorMode ${fname} $dataset" 1433 } 1435 1434 SendCmd "camera reset" 1436 1435 DrawLegend … … 1811 1810 Rappture::Tooltip::for $itk_component(xCutButton) \ 1812 1811 "Toggle the X-axis cutplane on/off" 1812 $itk_component(xCutButton) select 1813 1813 1814 1814 itk_component add xCutScale { … … 1838 1838 Rappture::Tooltip::for $itk_component(yCutButton) \ 1839 1839 "Toggle the Y-axis cutplane on/off" 1840 $itk_component(yCutButton) select 1840 1841 1841 1842 itk_component add yCutScale { … … 1865 1866 Rappture::Tooltip::for $itk_component(zCutButton) \ 1866 1867 "Toggle the Z-axis cutplane on/off" 1868 $itk_component(zCutButton) select 1867 1869 1868 1870 itk_component add zCutScale { … … 1878 1880 $itk_component(zCutScale) set 50 1879 1881 $itk_component(zCutScale) configure -state disabled 1880 #$itk_component(zCutScale) configure -state disabled1881 1882 Rappture::Tooltip::for $itk_component(zCutScale) \ 1882 1883 "@[itcl::code $this Slice tooltip z]" … … 2024 2025 SendCmd "volume add $tag" 2025 2026 SendCmd "cutplane add $tag" 2026 SendCmd "cutplane edges 0 $tag" 2027 SendCmd "cutplane wireframe 0 $tag" 2028 SendCmd "cutplane lighting 1 $tag" 2029 SendCmd "cutplane linewidth 1 $tag" 2030 #SendCmd "cutplane linecolor 1 1 1 $tag" 2031 #SendCmd "cutplane visible $tag" 2032 foreach axis { x y z } { 2033 SendCmd "cutplane slice $axis 0.5 $tag" 2034 SendCmd "cutplane axis $axis 0 $tag" 2035 } 2027 SendCmd "cutplane visible 0 $tag" 2036 2028 2037 2029 SendCmd "volume lighting $settings(-lighting) $tag" … … 2224 2216 "move" { 2225 2217 set axis [lindex $args 0] 2226 set oldval $_settings(axis-${axis}position)2227 2218 set newval [lindex $args 1] 2228 2219 if {[llength $args] != 2} {
Note: See TracChangeset
for help on using the changeset viewer.