Changeset 3963
- Timestamp:
- Sep 27, 2013, 3:05:18 AM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r3934 r3963 159 159 private variable _curFldName "" 160 160 private variable _curFldLabel "" 161 private variable _colorMode " vmag";# Mode of colormap (vmag or scalar)161 private variable _colorMode "scalar";# Mode of colormap (vmag or scalar) 162 162 } 163 163 -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r3923 r3963 150 150 private variable _legendPending 0 151 151 private variable _field "" 152 private variable _colorMode " vmag"; # Mode of colormap (vmag or scalar)152 private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar) 153 153 private variable _fieldNames {} 154 154 private variable _fields -
trunk/gui/scripts/vtkvolumeviewer.tcl
r3923 r3963 143 143 private variable _curFldName "" 144 144 private variable _curFldLabel "" 145 private variable _colorMode " vmag";# Mode of colormap (vmag or scalar)145 private variable _colorMode "scalar";# Mode of colormap (vmag or scalar) 146 146 } 147 147 … … 232 232 cutplaneWireframe 0 233 233 cutplane-opacity 100 234 volume-blendmode composite 234 235 volumeLighting 1 235 volume-material 80 236 volume-opacity 40 236 volume-ambient 40 237 volume-diffuse 60 238 volume-specularLevel 30 239 volume-specularExponent 90 240 volume-opacity 50 237 241 volume-quality 50 238 242 volumeVisible 1 … … 1033 1037 } 1034 1038 1035 InitSettings volume-palette volume-material volume-quality volumeVisible \ 1039 InitSettings volume-palette \ 1040 volume-ambient volume-diffuse volume-specularLevel volume-specularExponent \ 1041 volume-opacity volume-quality volumeVisible \ 1036 1042 cutplaneVisible \ 1037 1043 cutplane-xposition cutplane-yposition cutplane-zposition \ … … 1296 1302 } 1297 1303 } 1298 "volume-material" { 1299 set val $_settings(volume-material) 1304 "volume-blendmode" { 1305 set val [$itk_component(blendmode) value] 1306 set mode [$itk_component(blendmode) translate $val] 1307 set _settings(volume-blendmode) $mode 1308 foreach dataset [CurrentDatasets -visible] { 1309 SendCmd "volume blendmode $mode $dataset" 1310 } 1311 } 1312 "volume-ambient" { 1313 set val $_settings(volume-ambient) 1314 set ambient [expr {0.01*$val}] 1315 foreach dataset [CurrentDatasets -visible] { 1316 SendCmd "volume shading ambient $ambient $dataset" 1317 } 1318 } 1319 "volume-diffuse" { 1320 set val $_settings(volume-diffuse) 1300 1321 set diffuse [expr {0.01*$val}] 1301 set specular [expr {0.01*$val}]1302 #set power [expr {sqrt(160*$val+1.0)}]1303 set power [expr {$val+1.0}]1304 1322 foreach dataset [CurrentDatasets -visible] { 1305 1323 SendCmd "volume shading diffuse $diffuse $dataset" 1306 SendCmd "volume shading specular $specular $power $dataset" 1324 } 1325 } 1326 "volume-specularLevel" - "volume-specularExponent" { 1327 set val $_settings(volume-specularLevel) 1328 set specularLevel [expr {0.01*$val}] 1329 set specularExponent $_settings(volume-specularExponent) 1330 foreach dataset [CurrentDatasets -visible] { 1331 SendCmd "volume shading specular $specularLevel $specularExponent $dataset" 1307 1332 } 1308 1333 } … … 1311 1336 foreach dataset [CurrentDatasets -visible] { 1312 1337 SendCmd "volume lighting $bool $dataset" 1338 } 1339 } 1340 "volume-opacity" { 1341 set val $_settings(volume-opacity) 1342 set val [expr {0.01*$val}] 1343 foreach dataset [CurrentDatasets -visible] { 1344 SendCmd "volume opacity $val $dataset" 1313 1345 } 1314 1346 } … … 1391 1423 } 1392 1424 set _cutplanePending 0 1393 }1394 "volume-palette" {1395 set palette [$itk_component(palette) value]1396 set _settings(volume-palette) $palette1397 foreach dataset [CurrentDatasets -visible $_first] {1398 foreach {dataobj comp} [split $dataset -] break1399 ChangeColormap $dataobj $comp $palette1400 }1401 set _legendPending 11402 1425 } 1403 1426 "volume-palette" { … … 1562 1585 1563 1586 itcl::body Rappture::VtkVolumeViewer::BuildVolumeTab {} { 1564 1565 set fg [option get $itk_component(hull) font Font] 1566 #set bfg [option get $itk_component(hull) boldFont Font] 1587 set font [option get $itk_component(hull) font Font] 1588 #set bfont [option get $itk_component(hull) boldFont Font] 1567 1589 1568 1590 set inner [$itk_component(main) insert end \ … … 1571 1593 $inner configure -borderwidth 4 1572 1594 1573 checkbutton $inner.volume \ 1574 -text "Show Volume" \ 1595 checkbutton $inner.visibility \ 1596 -text "Visible" \ 1597 -font $font \ 1575 1598 -variable [itcl::scope _settings(volumeVisible)] \ 1576 -command [itcl::code $this AdjustSetting volumeVisible] \ 1577 -font "Arial 9" 1599 -command [itcl::code $this AdjustSetting volumeVisible] 1600 1601 label $inner.lighting_l \ 1602 -text "Lighting / Material Properties" \ 1603 -font "Arial 9 bold" 1578 1604 1579 1605 checkbutton $inner.lighting \ 1580 1606 -text "Enable Lighting" \ 1607 -font $font \ 1581 1608 -variable [itcl::scope _settings(volumeLighting)] \ 1582 -command [itcl::code $this AdjustSetting volumeLighting] \ 1583 -font "Arial 9" 1584 1585 label $inner.dim_l -text "Dim" -font "Arial 9" 1586 ::scale $inner.material -from 0 -to 100 -orient horizontal \ 1587 -variable [itcl::scope _settings(volume-material)] \ 1588 -width 10 \ 1589 -showvalue off -command [itcl::code $this AdjustSetting volume-material] 1590 label $inner.bright_l -text "Bright" -font "Arial 9" 1591 1592 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1609 -command [itcl::code $this AdjustSetting volumeLighting] 1610 1611 label $inner.ambient_l \ 1612 -text "Ambient" \ 1613 -font $font 1614 ::scale $inner.ambient -from 0 -to 100 -orient horizontal \ 1615 -variable [itcl::scope _settings(volume-ambient)] \ 1616 -showvalue off -command [itcl::code $this AdjustSetting volume-ambient] \ 1617 -troughcolor grey92 1618 1619 label $inner.diffuse_l -text "Diffuse" -font $font 1620 ::scale $inner.diffuse -from 0 -to 100 -orient horizontal \ 1621 -variable [itcl::scope _settings(volume-diffuse)] \ 1622 -showvalue off -command [itcl::code $this AdjustSetting volume-diffuse] \ 1623 -troughcolor grey92 1624 1625 label $inner.specularLevel_l -text "Specular" -font $font 1626 ::scale $inner.specularLevel -from 0 -to 100 -orient horizontal \ 1627 -variable [itcl::scope _settings(volume-specularLevel)] \ 1628 -showvalue off -command [itcl::code $this AdjustSetting volume-specularLevel] \ 1629 -troughcolor grey92 1630 1631 label $inner.specularExponent_l -text "Shininess" -font $font 1632 ::scale $inner.specularExponent -from 10 -to 128 -orient horizontal \ 1633 -variable [itcl::scope _settings(volume-specularExponent)] \ 1634 -showvalue off -command [itcl::code $this AdjustSetting volume-specularExponent] \ 1635 -troughcolor grey92 1636 1637 label $inner.opacity_l -text "Opacity" -font $font 1593 1638 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1594 1639 -variable [itcl::scope _settings(volume-opacity)] \ 1595 -width 10 \ 1596 -showvalue off \ 1597 -command [itcl::code $this AdjustSetting volume-opacity] 1598 1599 label $inner.quality_l -text "Quality" -font "Arial 9" 1640 -showvalue off -command [itcl::code $this AdjustSetting volume-opacity] \ 1641 -troughcolor grey92 1642 1643 label $inner.quality_l -text "Quality" -font $font 1600 1644 ::scale $inner.quality -from 0 -to 100 -orient horizontal \ 1601 1645 -variable [itcl::scope _settings(volume-quality)] \ 1602 -width 10 \ 1603 -showvalue off -command [itcl::code $this AdjustSetting volume-quality] 1604 1605 itk_component add field_l { 1606 label $inner.field_l -text "Field" -font "Arial 9" 1607 } { 1608 ignore -font 1609 } 1646 -showvalue off -command [itcl::code $this AdjustSetting volume-quality] \ 1647 -troughcolor grey92 1648 1649 label $inner.field_l -text "Field" -font $font 1610 1650 itk_component add field { 1611 Rappture::Combobox $inner.field - width 10 -editable no1651 Rappture::Combobox $inner.field -editable no 1612 1652 } 1613 1653 bind $inner.field <<Value>> \ 1614 1654 [itcl::code $this AdjustSetting field] 1615 1655 1616 label $inner.palette_l -text "Palette" -font "Arial 9" 1656 label $inner.transferfunction_l \ 1657 -text "Transfer Function" -font "Arial 9 bold" 1658 1659 label $inner.palette_l -text "Colormap" -font $font 1617 1660 itk_component add palette { 1618 1661 Rappture::Combobox $inner.palette -width 10 -editable no … … 1640 1683 [itcl::code $this AdjustSetting volume-palette] 1641 1684 1685 label $inner.blendmode_l -text "Blend Mode" -font "Arial 9" 1686 itk_component add blendmode { 1687 Rappture::Combobox $inner.blendmode -editable no 1688 } 1689 $inner.blendmode choices insert end \ 1690 "composite" "Composite" \ 1691 "max_intensity" "Maximum Intensity" \ 1692 "additive" "Additive" 1693 1694 $itk_component(blendmode) value "composite" 1695 bind $inner.blendmode <<Value>> \ 1696 [itcl::code $this AdjustSetting volume-blendmode] 1697 1642 1698 blt::table $inner \ 1643 0,0 $inner.field_l -anchor w -pady 2 \ 1644 0,1 $inner.field -anchor w -pady 2 -cspan 2 \ 1645 1,0 $inner.volume -anchor w -pady 2 -cspan 4 \ 1646 2,0 $inner.lighting -anchor w -pady 2 -cspan 4 \ 1647 3,0 $inner.dim_l -anchor e -pady 2 \ 1648 3,1 $inner.material -fill x -pady 2 \ 1649 3,2 $inner.bright_l -anchor w -pady 2 \ 1650 4,0 $inner.quality_l -anchor w -pady 2 -cspan 2 \ 1651 5,0 $inner.quality -fill x -pady 2 -cspan 2 \ 1652 7,0 $inner.palette_l -anchor w -pady 2 \ 1653 7,1 $inner.palette -anchor w -pady 2 -cspan 2 \ 1699 0,0 $inner.field_l -anchor e -cspan 2 \ 1700 0,2 $inner.field -cspan 3 -fill x \ 1701 1,1 $inner.lighting_l -anchor w -cspan 4 \ 1702 2,1 $inner.lighting -anchor w -cspan 3 \ 1703 3,1 $inner.ambient_l -anchor e -pady 2 \ 1704 3,2 $inner.ambient -cspan 3 -fill x \ 1705 4,1 $inner.diffuse_l -anchor e -pady 2 \ 1706 4,2 $inner.diffuse -cspan 3 -fill x \ 1707 5,1 $inner.specularLevel_l -anchor e -pady 2 \ 1708 5,2 $inner.specularLevel -cspan 3 -fill x \ 1709 6,1 $inner.specularExponent_l -anchor e -pady 2 \ 1710 6,2 $inner.specularExponent -cspan 3 -fill x \ 1711 7,1 $inner.visibility -anchor w -cspan 3 \ 1712 8,1 $inner.quality_l -anchor e -pady 2 \ 1713 8,2 $inner.quality -cspan 3 -fill x \ 1714 9,1 $inner.transferfunction_l -anchor w -cspan 4 \ 1715 10,1 $inner.opacity_l -anchor e -pady 2 \ 1716 10,2 $inner.opacity -cspan 3 -fill x \ 1717 11,1 $inner.palette_l -anchor e \ 1718 11,2 $inner.palette -padx 2 -cspan 3 -fill x \ 1719 12,1 $inner.blendmode_l -anchor e \ 1720 12,2 $inner.blendmode -padx 2 -cspan 3 -fill x \ 1654 1721 1655 1722 blt::table configure $inner r* c* -resize none 1656 blt::table configure $inner r8 -resize expand 1723 blt::table configure $inner r* -pady { 2 0 } 1724 blt::table configure $inner c2 c3 r13 -resize expand 1725 blt::table configure $inner c0 -width .1i 1657 1726 } 1658 1727
Note: See TracChangeset
for help on using the changeset viewer.