Changeset 4187 for branches/1.3
- Timestamp:
- Feb 20, 2014, 3:18:27 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/vtkglyphviewer.tcl
r3844 r4187 230 230 cutplaneEdges 0 231 231 cutplaneLighting 1 232 cutplanePreinterp 0232 cutplanePreinterp 1 233 233 cutplaneOpacity 100 234 234 cutplaneVisible 0 … … 765 765 if { $_reportClientInfo } { 766 766 # Tell the server the viewer, hub, user and session. 767 # Do this immediately on connect before buff ing any commands767 # Do this immediately on connect before buffering any commands 768 768 global env 769 769 … … 868 868 set _hardcopy($tag) $bytes 869 869 } 870 EventuallyRequestLegend871 870 } 872 871 … … 971 970 if { ![info exists _datasets($tag)] } { 972 971 set bytes [$dataobj vtkdata $comp] 973 if 1{972 if 0 { 974 973 set f [open "/tmp/glyph.vtk" "w"] 975 974 puts $f $bytes … … 1486 1485 set font "Arial 8" 1487 1486 set lineht [font metrics $font -linespace] 1488 set c $itk_component(view)1489 1487 set w 12 1490 1488 set h [expr {$_height - 2 * ($lineht + 2)}] 1491 if { $h < 1 } {1489 if { $h < 1 } { 1492 1490 return 1493 1491 } … … 1719 1717 "static_triad" "static" \ 1720 1718 "closest_triad" "closest" \ 1721 "furthest_triad" "f urthest" \1719 "furthest_triad" "farthest" \ 1722 1720 "outer_edges" "outer" 1723 1721 $itk_component(axisMode) value "static" … … 2052 2050 array set style { 2053 2051 -color BCGYR 2052 -edgecolor black 2054 2053 -edges 0 2055 -edgecolor black 2054 -gscale 1 2055 -lighting 1 2056 2056 -linewidth 1.0 2057 -normscale 1 2057 2058 -opacity 1.0 2059 -orientGlyphs 1 2060 -outline 0 2061 -ptsize 1.0 2062 -quality 1 2063 -scaleMode "vmag" 2064 -shape "arrow" 2058 2065 -wireframe 0 2059 -lighting 1 2060 -outline 0 2061 -levels 10 2066 } 2067 set numComponents [$dataobj numComponents $comp] 2068 if {$numComponents == 3} { 2069 set style(-shape) "arrow" 2070 set style(-orientGlyphs) 1 2071 set style(-scaleMode) "vmag" 2072 } else { 2073 set style(-shape) "sphere" 2074 set style(-orientGlyphs) 0 2075 set style(-scaleMode) "scalar" 2062 2076 } 2063 2077 array set style [$dataobj style $comp] … … 2065 2079 set style(-opacity) 1 2066 2080 } 2067 if { $_currentColormap == "" } {2068 set stylelist [$dataobj style $comp]2069 if { $stylelist != "" } {2070 array set style $stylelist2071 set stylelist [array get style]2072 SetCurrentColormap $stylelist2073 }2074 $itk_component(colormap) value $style(-color)2075 }2076 2081 if 0 { 2077 2082 SendCmd "cutplane add $tag" 2078 SendCmd "cutplane edges 0 $tag" 2079 SendCmd "cutplane wireframe 0 $tag" 2080 SendCmd "cutplane lighting 1 $tag" 2081 SendCmd "cutplane linewidth 1 $tag" 2082 2083 foreach axis { x y z } { 2084 SendCmd "cutplane slice $axis 0.5 $tag" 2085 SendCmd "cutplane axis $axis 0 $tag" 2086 } 2083 SendCmd "cutplane visible 0 $tag" 2087 2084 } 2088 2085 # This is too complicated. We want to set the colormap, number of … … 2105 2102 } 2106 2103 set _currentOpacity $style(-opacity) 2107 SendCmd "glyphs add arrow$tag"2104 SendCmd "glyphs add $style(-shape) $tag" 2108 2105 SendCmd "glyphs edges $style(-edges) $tag" 2109 2106 # normscale=1 and gscale=1 are defaults 2110 #SendCmd "glyphs normscale 1 $tag" 2111 #SendCmd "glyphs gscale 1 $tag" 2112 2107 if {$style(-normscale) != 1} { 2108 SendCmd "glyphs normscale $style(-normscale) $tag" 2109 } 2110 if {$style(-gscale) != 1} { 2111 SendCmd "glyphs gscale $style(-gscale) $tag" 2112 } 2113 2113 SendCmd "outline add $tag" 2114 2114 SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag" … … 2116 2116 set _settings(glyphOutline) $style(-outline) 2117 2117 set _settings(glyphEdges) $style(-edges) 2118 #SendCmd "glyphs color [Color2RGB $settings(-color)] $tag" 2118 # constant color only used if colormode set to constant 2119 SendCmd "glyphs color [Color2RGB $itk_option(-plotforeground)] $tag" 2120 # Omitting field name for gorient and smode commands 2121 # defaults to active scalars or vectors depending on mode 2122 SendCmd "glyphs gorient $style(-orientGlyphs) {} $tag" 2123 SendCmd "glyphs smode $style(-scaleMode) {} $tag" 2124 SendCmd "glyphs quality $style(-quality) $tag" 2119 2125 SendCmd "glyphs lighting $style(-lighting) $tag" 2120 2126 set _settings(glyphLighting) $style(-lighting) 2121 2127 SendCmd "glyphs linecolor [Color2RGB $style(-edgecolor)] $tag" 2122 2128 SendCmd "glyphs linewidth $style(-linewidth) $tag" 2129 SendCmd "glyphs ptsize $style(-ptsize) $tag" 2123 2130 SendCmd "glyphs opacity $_currentOpacity $tag" 2124 2131 set _settings(glyphOpacity) $style(-opacity) … … 2234 2241 "move" { 2235 2242 set axis [lindex $args 0] 2236 set a [string toupper $axis]2237 set oldval $_settings(cutplane${a}Position)2238 2243 set newval [lindex $args 1] 2239 2244 if {[llength $args] != 2} {
Note: See TracChangeset
for help on using the changeset viewer.