- Timestamp:
- Jan 9, 2012, 1:28:43 AM (13 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/field2dresult.tcl
r2744 r2758 71 71 puts stderr "unknown render mode \"$flags(-mode)\"" 72 72 } 73 } 73 } 74 74 if {"" != $servers && $flags(-mode) != "vtk"} { 75 75 switch -- $flags(-mode) { … … 103 103 #destroy $itk_component(renderer) 104 104 } 105 } 105 } 106 106 107 107 if {![info exists itk_component(renderer)]} { -
trunk/gui/scripts/vtkvolumeviewer.tcl
r2756 r2758 262 262 cutplane-opacity 100 263 263 volume-lighting 1 264 volume-material 80 264 265 volume-opacity 40 266 volume-quality 50 265 267 volume-visible 1 266 volume-wireframe 0267 268 legend-visible 1 268 269 }] … … 995 996 set _first "" 996 997 InitSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \ 997 axis-visible axis-labels cutplane-visible \ 998 cutplane-xposition cutplane-yposition cutplane-zposition \ 999 cutplane-xvisible cutplane-yvisible cutplane-zvisible 998 axis-visible axis-labels 1000 999 1001 1000 SendCmd "imgflush" … … 1101 1100 } 1102 1101 1103 InitSettings volume-palette volume-visible 1102 InitSettings volume-palette volume-material volume-quality volume-visible \ 1103 cutplane-visible \ 1104 cutplane-xposition cutplane-yposition cutplane-zposition \ 1105 cutplane-xvisible cutplane-yvisible cutplane-zvisible 1104 1106 1105 1107 if { $_reset } { … … 1364 1366 } 1365 1367 } 1368 "volume-material" { 1369 set val $_settings(volume-material) 1370 set diffuse [expr {0.01*$val}] 1371 set specular [expr {0.01*$val}] 1372 #set power [expr {sqrt(160*$val+1.0)}] 1373 set power [expr {$val+1.0}] 1374 foreach dataset [CurrentDatasets -visible] { 1375 SendCmd "volume shading diffuse $diffuse $dataset" 1376 SendCmd "volume shading specular $specular $power $dataset" 1377 } 1378 } 1366 1379 "volume-lighting" { 1367 1380 set bool $_settings(volume-lighting) 1368 1381 foreach dataset [CurrentDatasets -visible] { 1369 1382 SendCmd "volume lighting $bool $dataset" 1383 } 1384 } 1385 "volume-quality" { 1386 set val $_settings(volume-quality) 1387 set val [expr {0.01*$val}] 1388 foreach dataset [CurrentDatasets -visible] { 1389 SendCmd "volume quality $val $dataset" 1370 1390 } 1371 1391 } … … 1804 1824 1805 1825 set opaqueWmap "0.0 1.0 1.0 1.0" 1806 set wmap "0.0 0.0 0.1 0.0 0.2 0.8 0.98 0.8 0.99 0.0 1.0 0.0" 1826 #set wmap "0.0 0.0 0.1 0.0 0.2 0.8 0.98 0.8 0.99 0.0 1.0 0.0" 1827 # Approximate cubic opacity curve 1828 set wmap "0.0 0.0 0.1 0.001 0.2 0.008 0.3 0.027 0.4 0.064 0.5 0.125 0.6 0.216 0.7 0.343 0.8 0.512 0.9 0.729 1.0 1.0" 1807 1829 SendCmd "colormap add $name { $cmap } { $wmap }" 1808 1830 SendCmd "colormap add $name-opaque { $cmap } { $opaqueWmap }" … … 1923 1945 -font "Arial 9" 1924 1946 1947 label $inner.dim_l -text "Dim" -font "Arial 9" 1948 ::scale $inner.material -from 0 -to 100 -orient horizontal \ 1949 -variable [itcl::scope _settings(volume-material)] \ 1950 -width 10 \ 1951 -showvalue off -command [itcl::code $this AdjustSetting volume-material] 1952 label $inner.bright_l -text "Bright" -font "Arial 9" 1953 1925 1954 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1926 1955 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ … … 1929 1958 -showvalue off \ 1930 1959 -command [itcl::code $this AdjustSetting volume-opacity] 1960 1961 label $inner.quality_l -text "Quality" -font "Arial 9" 1962 ::scale $inner.quality -from 0 -to 100 -orient horizontal \ 1963 -variable [itcl::scope _settings(volume-quality)] \ 1964 -width 10 \ 1965 -showvalue off -command [itcl::code $this AdjustSetting volume-quality] 1931 1966 1932 1967 label $inner.field_l -text "Field" -font "Arial 9" … … 1964 1999 1965 2000 blt::table $inner \ 1966 0,0 $inner.volume -anchor w -pady 2 \ 1967 2,0 $inner.lighting -anchor w -pady 2 \ 1968 6,0 $inner.field_l -anchor w -pady 2 \ 1969 6,1 $inner.field -anchor w -pady 2 \ 1970 7,0 $inner.palette_l -anchor w -pady 2 \ 1971 7,1 $inner.palette -anchor w -pady 2 \ 2001 0,0 $inner.volume -anchor w -pady 2 -cspan 4 \ 2002 2,0 $inner.lighting -anchor w -pady 2 -cspan 4 \ 2003 3,0 $inner.dim_l -anchor e -pady 2 \ 2004 3,1 $inner.material -fill x -pady 2 \ 2005 3,2 $inner.bright_l -anchor w -pady 2 \ 2006 4,0 $inner.quality_l -anchor w -pady 2 -cspan 2 \ 2007 5,0 $inner.quality -fill x -pady 2 -cspan 2 \ 2008 6,0 $inner.field_l -anchor w -pady 2 \ 2009 6,1 $inner.field -anchor w -pady 2 -cspan 2 \ 2010 7,0 $inner.palette_l -anchor w -pady 2 \ 2011 7,1 $inner.palette -anchor w -pady 2 -cspan 2 \ 1972 2012 1973 2013 blt::table configure $inner r* c* -resize none 1974 blt::table configure $inner r8 c 1-resize expand2014 blt::table configure $inner r8 c3 -resize expand 1975 2015 } 1976 2016
Note: See TracChangeset
for help on using the changeset viewer.