Changeset 4765 for trunk/gui/scripts/vtkvolumeviewer.tcl
- Timestamp:
- Nov 23, 2014 12:58:31 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkvolumeviewer.tcl
r4764 r4765 63 63 public method updateTransferFunctions {} 64 64 65 private method AddNewMarker { x y } 65 66 private method BuildVolumeComponents {} 66 67 private method ComputeAlphamap { cname } … … 69 70 private method GetDatasetsWithComponent { cname } 70 71 private method HideAllMarkers {} 71 private method AddNewMarker { x y }72 72 private method InitComponentSettings { cname } 73 73 private method ParseLevelsOption { cname levels } 74 74 private method ParseMarkersOption { cname markers } 75 private method RemoveMarker { x y } 75 76 private method ResetColormap { cname color } 76 77 private method SendTransferFunctions {} 77 78 private method SetInitialTransferFunction { dataobj cname } 78 private method SetOrientation { side }79 79 private method SwitchComponent { cname } 80 private method RemoveMarker { x y }81 private method ViewToQuaternion {} {82 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)]83 }84 private method QuaternionToView { q } {85 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break86 }87 80 88 81 private variable _alphamap … … 98 91 private variable _transferFunctionEditors 99 92 100 protected method Connect {}101 protected method CurrentDatasets {args}102 protected method Disconnect {}103 protected method DoResize {}104 protected method DoRotate {}105 protected method AdjustSetting {what {value ""}}106 protected method InitSettings { args }107 protected method Pan {option x y}108 protected method Pick {x y}109 protected method Rebuild {}110 protected method ReceiveDataset { args }111 protected method ReceiveImage { args }112 protected method ReceiveLegend { colormap title vmin vmax size }113 protected method Rotate {option x y}114 protected method Zoom {option}115 116 93 # The following methods are only used by this class. 117 94 private method AdjustSetting {what {value ""}} 118 95 private method BuildAxisTab {} 119 96 private method BuildCameraTab {} … … 125 102 private method DrawLegendOld {} 126 103 private method Combo { option } 104 private method Connect {} 105 private method CurrentDatasets {args} 106 private method Disconnect {} 107 private method DoResize {} 108 private method DoRotate {} 127 109 private method EnterLegend { x y } 128 110 private method EventuallyResize { w h } … … 132 114 private method GetImage { args } 133 115 private method GetVtkData { args } 116 private method InitSettings { args } 134 117 private method IsValidObject { dataobj } 135 118 private method LeaveLegend {} 136 private method MotionLegend { x y } 119 private method MotionLegend { x y } 120 private method Pan {option x y} 137 121 private method PanCamera {} 122 private method Pick {x y} 123 private method QuaternionToView { q } { 124 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break 125 } 126 private method Rebuild {} 127 private method ReceiveDataset { args } 128 private method ReceiveImage { args } 129 private method ReceiveLegend { colormap title vmin vmax size } 138 130 private method RequestLegend {} 131 private method Rotate {option x y} 139 132 private method SetLegendTip { x y } 140 133 private method SetObjectStyle { dataobj comp } 134 private method SetOrientation { side } 141 135 private method Slice {option args} 136 private method ViewToQuaternion {} { 137 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)] 138 } 139 private method Zoom {option} 142 140 143 141 private variable _arcball "" … … 234 232 # Initialize the view to some default parameters. 235 233 array set _view { 234 -ortho 0 236 235 -qw 0.853553 237 236 -qx -0.353553 238 237 -qy 0.353553 239 238 -qz 0.146447 240 -zoom 1.0241 239 -xpan 0 242 240 -ypan 0 243 - ortho 0241 -zoom 1.0 244 242 } 245 243 set _arcball [blt::arcball create 100 100] … … 414 412 bind $itk_component(view) <ButtonRelease-1> \ 415 413 [itcl::code $this Rotate release %x %y] 416 bind $itk_component(view) <Configure> \417 [itcl::code $this EventuallyResize %w %h]418 414 419 415 # Bindings for panning via mouse … … 1057 1053 lappend info "dataset_size" $length 1058 1054 lappend info "dataset_tag" $tag 1059 SendCmd [list "clientinfo" $info]1060 } 1061 append _outbuf "dataset add $tag data follows $length\n"1055 SendCmd "clientinfo [list $info]" 1056 } 1057 SendCmd "dataset add $tag data follows $length" 1062 1058 append _outbuf $bytes 1063 1059 set _datasets($tag) 1 … … 1209 1205 -qy 0.353553 1210 1206 -qz 0.146447 1207 -xpan 0 1208 -ypan 0 1211 1209 -zoom 1.0 1212 -xpan 01213 -ypan 01214 1210 } 1215 1211 if { $_first != "" } { … … 1231 1227 SendCmd "camera pan $x $y" 1232 1228 } 1233 1234 1229 1235 1230 # ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.