Changeset 3969 for trunk/gui/scripts/vtkvolumeviewer.tcl
- Timestamp:
- Oct 1, 2013, 5:36:54 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkvolumeviewer.tcl
r3967 r3969 64 64 public method updateTransferFunctions {} 65 65 66 private method SetOrientation { side } 66 67 private method HideAllMarkers {} 67 68 private method GetColormap { cname color } … … 1555 1556 set h [winfo height $c] 1556 1557 set h [expr {$h-$lineht-20}] 1557 puts stderr "legend w=$w h=$h"1558 set w [expr {$w-20}] 1558 1559 # Set the legend on the first volume dataset. 1559 1560 foreach dataset [CurrentDatasets -visible $_first] { … … 1777 1778 [itcl::code $this AdjustSetting volumeColormap] 1778 1779 1779 label $inner.blendmode_l -text "Blend Mode" -font "Arial 9"1780 label $inner.blendmode_l -text "Blend Mode" -font $font 1780 1781 itk_component add blendmode { 1781 1782 Rappture::Combobox $inner.blendmode -editable no … … 1795 1796 1,0 $inner.field_l -anchor e -cspan 2 \ 1796 1797 1,2 $inner.field -cspan 3 -fill x \ 1797 2, 1$inner.lighting_l -anchor w -cspan 4 \1798 2,0 $inner.lighting_l -anchor w -cspan 4 \ 1798 1799 3,1 $inner.lighting -anchor w -cspan 3 \ 1799 1800 4,1 $inner.ambient_l -anchor e -pady 2 \ … … 1808 1809 9,1 $inner.quality_l -anchor e -pady 2 \ 1809 1810 9,2 $inner.quality -cspan 3 -fill x \ 1810 10, 1$inner.transferfunction_l -anchor w -cspan 4 \1811 10,0 $inner.transferfunction_l -anchor w -cspan 4 \ 1811 1812 11,1 $inner.opacity_l -anchor e -pady 2 \ 1812 1813 11,2 $inner.opacity -cspan 3 -fill x \ … … 1896 1897 $inner configure -borderwidth 4 1897 1898 1899 label $inner.view_l -text "view" -font "Arial 9" 1900 set f [frame $inner.view] 1901 foreach side { front back left right top bottom } { 1902 button $f.$side -image [Rappture::icon view$side] \ 1903 -command [itcl::code $this SetOrientation $side] 1904 Rappture::Tooltip::for $f.$side "Change the view to $side" 1905 pack $f.$side -side left 1906 } 1907 blt::table $inner \ 1908 0,0 $inner.view_l -anchor e -pady 2 \ 1909 0,1 $inner.view -anchor w -pady 2 1910 1911 set row 1 1912 1898 1913 set labels { qx qy qz qw xpan ypan zoom } 1899 set row 01900 1914 foreach tag $labels { 1901 1915 label $inner.${tag}label -text $tag -font "Arial 9" … … 1920 1934 incr row 1921 1935 1922 blt::table configure $inner c0 c1 -resize none1936 blt::table configure $inner r* c0 c1 -resize none 1923 1937 blt::table configure $inner c2 -resize expand 1924 1938 blt::table configure $inner r$row -resize expand … … 2221 2235 } 2222 2236 $_image(legend) configure -data $bytes 2223 puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"2237 #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>" 2224 2238 if { [catch {DrawLegend} errs] != 0 } { 2225 2239 puts stderr errs=$errs … … 2634 2648 set _cname2transferFunction($cname) [list $cmap $wmap] 2635 2649 SendCmd [list colormap add $cname $cmap $wmap] 2636 DrawLegend2650 EventuallyRequestLegend 2637 2651 } 2638 2652 … … 2648 2662 ComputeTransferFunction $cname 2649 2663 } 2650 DrawLegend 2664 EventuallyRequestLegend 2665 } 2666 2667 itcl::body Rappture::VtkVolumeViewer::SetOrientation { side } { 2668 array set positions { 2669 front "1 0 0 0" 2670 back "0 0 1 0" 2671 left "0.707107 0 -0.707107 0" 2672 right "0.707107 0 0.707107 0" 2673 top "0.707107 -0.707107 0 0" 2674 bottom "0.707107 0.707107 0 0" 2675 } 2676 foreach name { qw qx qy qz } value $positions($side) { 2677 set _view($name) $value 2678 } 2679 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 2680 $_arcball quaternion $q 2681 SendCmd "camera orient $q" 2682 SendCmd "camera reset" 2683 set _view(xpan) 0 2684 set _view(ypan) 0 2685 set _view(zoom) 1.0 2686 set _settings($this-xpan) $_view(xpan) 2687 set _settings($this-ypan) $_view(ypan) 2688 set _settings($this-zoom) $_view(zoom) 2651 2689 } 2652 2690
Note: See TracChangeset
for help on using the changeset viewer.