- Timestamp:
- Oct 6, 2011, 10:07:24 AM (13 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/bugreport.tcl
r2599 r2604 155 155 raise .bugreport 156 156 157 catch {grab set .bugreport}157 catch {grab set -local .bugreport} 158 158 update 159 159 } -
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r2603 r2604 151 151 private variable _vectorFields 152 152 private variable _scalarFields 153 private variable _fields 153 154 private variable _currentField 154 155 private variable _numSeeds 200 … … 1019 1020 } 1020 1021 } 1022 array unset _scalarFields 1021 1023 array set _scalarFields [$_first hints scalars] 1024 array unset _vectorFields 1022 1025 array set _vectorFields [$_first hints vectors] 1023 1026 set _currentField [$_first hints default] 1024 1027 $itk_component(field) choices delete 0 end 1028 array unset _fields 1025 1029 foreach name [array names _vectorFields] { 1026 1030 set value $_vectorFields($name) 1027 1031 $itk_component(field) choices insert end "$value" "$name" 1032 set _fields($value) $name 1028 1033 } 1029 1034 foreach name [array names _scalarFields] { 1030 1035 set value $_scalarFields($name) 1031 1036 $itk_component(field) choices insert end "$value" "$name" 1037 set _fields($value) $name 1032 1038 } 1033 1039 $itk_component(field) value $_currentField … … 1035 1041 InitSettings streamlines-seeds streamlines-visible streamlines-opacity \ 1036 1042 streamlines-numpoints streamlines-lighting streamlines-palette \ 1037 streamlines-field \1038 1043 volume-edges volume-lighting volume-opacity volume-visible \ 1039 1044 volume-wireframe \ … … 1466 1471 } 1467 1472 "streamlines-field" { 1468 set field [$itk_component(field) value] 1469 set value [$itk_component(axismode) translate $field] 1473 set new [$itk_component(field) value] 1474 set value [$itk_component(axismode) translate $new] 1475 puts stderr "streamlines-field old field=$_currentField new field = $new value=$value" 1470 1476 set _settings(streamlines-field) $value 1471 if { [info exists _scalarFields($ field)] } {1472 set name $_scalarFields($ field)1473 set colorMode scalar1477 if { [info exists _scalarFields($new)] } { 1478 set name $_scalarFields($new) 1479 set _colorMode scalar 1474 1480 set fieldType scalar 1475 } elseif { [info exists _vectorFields($field)] } { 1476 set name $_vectorFields($field) 1481 set _currentField $new 1482 } elseif { [info exists _vectorFields($new)] } { 1483 set name $_vectorFields($new) 1477 1484 set _colorMode vmag 1478 1485 set fieldType vector 1486 set _currentField $new 1479 1487 } else { 1480 error "unknown field \"$field\"" 1488 puts stderr "unknown field \"$new\"" 1489 return 1481 1490 } 1482 1491 foreach dataset [CurrentDatasets -visible] { 1492 puts stderr "dataset ${fieldType} ${name} $dataset" 1493 puts stderr "streamlines colormode $_colorMode $dataset" 1494 puts stderr "cutplane colormode $_colorMode $dataset" 1483 1495 SendCmd "dataset ${fieldType} ${name} $dataset" 1484 1496 SendCmd "streamlines colormode $_colorMode $dataset" … … 2503 2515 $_image(legend) configure -data $bytes 2504 2516 #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>" 2505 DrawLegend $ title2517 DrawLegend $_currentField 2506 2518 } 2507 2519 } … … 2521 2533 2522 2534 regsub {\(mag\)} $title "" title 2535 if { [info exists _fields($title)] } { 2536 set title $_fields($title) 2537 } 2523 2538 if { $_settings(legend-visible) } { 2524 2539 set x [expr $w - 2]
Note: See TracChangeset
for help on using the changeset viewer.