- Timestamp:
- Nov 8, 2014, 5:32:52 AM (10 years ago)
- Location:
- branches/1.3/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/field.tcl
r4520 r4664 427 427 set min "" 428 428 set max "" 429 blt::vector tmp zero430 429 431 430 foreach cname [array names _comp2dims] { 431 puts stderr "cname=$cname dims=$_comp2dims($cname)" 432 432 switch -- $_comp2dims($cname) { 433 433 1D { … … 453 453 454 454 if {$log} { 455 blt::vector tmp zero 455 456 # on a log scale, use abs value and ignore 0's 456 457 $vname dup tmp … … 461 462 set axisMin [blt::vector expr min(tmp)] 462 463 set axisMax [blt::vector expr max(tmp)] 464 blt::vector destroy tmp zero 463 465 } else { 464 466 set axisMin [$vname min] … … 477 479 } 478 480 } 479 2D - 3D{481 default { 480 482 if {[info exists _comp2limits($cname)]} { 481 483 array set limits $_comp2limits($cname) … … 519 521 } 520 522 } 521 blt::vector destroy tmp zero522 523 set val [$_field get "${axis}axis.min"] 523 524 if {"" != $val && "" != $min} { … … 919 920 continue; # Ignore this component 920 921 } 921 if 0{922 if 1 { 922 923 set f [open /tmp/$_path.$cname.dx "w"] 923 924 puts -nonewline $f $contents -
branches/1.3/gui/scripts/nanovisviewer.tcl
r4662 r4664 238 238 -thickness 350 239 239 -volume 1 240 -volumeopacity 0.5240 -volumeopacity 1.0 241 241 -volumevisible 1 242 242 -xcutplaneposition 50 … … 251 251 } 252 252 array set _widget { 253 -volumeopacity 0.5253 -volumeopacity 100 254 254 } 255 255 itk_component add 3dview { … … 1314 1314 set _settings($what) [expr $_widget($what) * 0.01] 1315 1315 set _settings($_current${what}) $_settings($what) 1316 foreach tag [GetDatasetsWithComponent $_current] { 1317 SendCmd "volume shading opacity $_settings($what) $tag" 1318 } 1316 1317 foreach {cmap wmap} $_cname2transferFunction($_current) break 1318 set wmap [ComputeAlphamap $_current] 1319 set _cname2transferFunction($_current) [list $cmap $wmap] 1320 SendCmd [list transfunc define $_current $cmap $wmap] 1319 1321 } 1320 1322 "-volumevisible" { … … 2103 2105 -light2side 1 2104 2106 -thickness 350 2105 -volumeopacity 0.52107 -volumeopacity 1.0 2106 2108 -volumevisible 1 2107 2109 } { … … 2244 2246 2245 2247 # Currently using volume shading opacity to scale opacity in 2246 # the volume shader. The transfer function always sets full 2247 # opacity 2248 set max 1.0 2248 # the volume shader. 2249 set max $_settings($cname-volumeopacity) 2249 2250 2250 2251 # Use the component-wise thickness setting from the slider … … 2468 2469 itcl::body Rappture::NanovisViewer::SetObjectStyle { dataobj cname } { 2469 2470 array set styles { 2470 2471 2472 2473 2474 2475 } 2476 2477 2478 2479 2471 -opacity 0.6 2472 } 2473 array set styles [lindex [$dataobj components -style $cname] 0] 2474 set _settings($cname-volumeopacity) $styles(-opacity) 2475 NameTransferFunction $dataobj $cname 2476 } 2477 2478 2479 2480
Note: See TracChangeset
for help on using the changeset viewer.