Changeset 4766 for branches/1.3/gui/scripts/vtkvolumeviewer.tcl
- Timestamp:
- Nov 23, 2014 1:12:25 AM (9 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
-
branches/1.3/gui/scripts/vtkvolumeviewer.tcl
r4750 r4766 62 62 public method scale {args} 63 63 64 private method SetOrientation { side }65 private method ViewToQuaternion {} {66 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)]67 }68 private method QuaternionToView { q } {69 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break70 }71 72 protected method Connect {}73 protected method CurrentDatasets {args}74 protected method Disconnect {}75 protected method DoResize {}76 protected method DoRotate {}77 protected method AdjustSetting {what {value ""}}78 protected method InitSettings { args }79 protected method Pan {option x y}80 protected method Pick {x y}81 protected method Rebuild {}82 protected method ReceiveDataset { args }83 protected method ReceiveImage { args }84 protected method ReceiveLegend { colormap title vmin vmax size }85 protected method Rotate {option x y}86 protected method Zoom {option}87 88 64 # The following methods are only used by this class. 65 private method AdjustSetting {what {value ""}} 89 66 private method BuildAxisTab {} 90 67 private method BuildCameraTab {} … … 95 72 private method BuildVolumeTab {} 96 73 private method DrawLegend {} 74 private method ChangeColormap { dataobj comp color } 97 75 private method Combo { option } 76 private method Connect {} 77 private method CurrentDatasets {args} 78 private method Disconnect {} 79 private method DoResize {} 80 private method DoRotate {} 98 81 private method EnterLegend { x y } 99 82 private method EventuallyResize { w h } … … 103 86 private method GetImage { args } 104 87 private method GetVtkData { args } 88 private method InitSettings { args } 105 89 private method IsValidObject { dataobj } 106 90 private method LeaveLegend {} 107 private method MotionLegend { x y } 91 private method MotionLegend { x y } 92 private method Pan {option x y} 108 93 private method PanCamera {} 94 private method Pick {x y} 95 private method QuaternionToView { q } { 96 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break 97 } 98 private method Rebuild {} 99 private method ReceiveDataset { args } 100 private method ReceiveImage { args } 101 private method ReceiveLegend { colormap title vmin vmax size } 109 102 private method RequestLegend {} 110 103 private method SetColormap { dataobj comp } 111 private method ChangeColormap { dataobj comp color}104 private method Rotate {option x y} 112 105 private method SetLegendTip { x y } 113 106 private method SetObjectStyle { dataobj comp } 107 private method SetOrientation { side } 114 108 private method Slice {option args} 109 private method ViewToQuaternion {} { 110 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)] 111 } 112 private method Zoom {option} 115 113 116 114 private variable _arcball "" … … 206 204 # Initialize the view to some default parameters. 207 205 array set _view { 206 -ortho 0 208 207 -qw 0.853553 209 208 -qx -0.353553 210 209 -qy 0.353553 211 210 -qz 0.146447 212 -zoom 1.0213 211 -xpan 0 214 212 -ypan 0 215 - ortho 0213 -zoom 1.0 216 214 } 217 215 set _arcball [blt::arcball create 100 100] … … 377 375 bind $itk_component(view) <ButtonRelease-1> \ 378 376 [itcl::code $this Rotate release %x %y] 379 bind $itk_component(view) <Configure> \380 [itcl::code $this EventuallyResize %w %h]381 377 382 378 # Bindings for panning via mouse … … 986 982 lappend info "dataset_size" $length 987 983 lappend info "dataset_tag" $tag 988 SendCmd [list "clientinfo" $info]989 } 990 append _outbuf "dataset add $tag data follows $length\n"984 SendCmd "clientinfo [list $info]" 985 } 986 SendCmd "dataset add $tag data follows $length" 991 987 append _outbuf $bytes 992 988 set _datasets($tag) 1 … … 1135 1131 -qy 0.353553 1136 1132 -qz 0.146447 1133 -xpan 0 1134 -ypan 0 1137 1135 -zoom 1.0 1138 -xpan 01139 -ypan 01140 1136 } 1141 1137 if { $_first != "" } { … … 1157 1153 SendCmd "camera pan $x $y" 1158 1154 } 1159 1160 1155 1161 1156 # ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.