Changeset 3421 for trunk/gui/scripts/vtkvolumeviewer.tcl
- Timestamp:
- Mar 3, 2013, 12:52:51 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkvolumeviewer.tcl
r3395 r3421 59 59 public method isconnected {} 60 60 public method limits { colormap } 61 public method sendto { string }62 61 public method parameters {title args} { 63 62 # do nothing … … 80 79 protected method ReceiveLegend { colormap title vmin vmax size } 81 80 protected method Rotate {option x y} 82 protected method SendCmd {string}83 protected method SendCmdNoWait {string}84 81 protected method Zoom {option} 85 82 … … 113 110 114 111 private variable _arcball "" 115 private variable _outbuf ; # buffer for outgoing commands116 117 112 private variable _dlist "" ; # list of data objects 118 113 private variable _obj2datasets … … 135 130 private variable _first "" ; # This is the topmost dataset. 136 131 private variable _start 0 137 private variable _buffering 0138 132 private variable _title "" 139 133 private variable _seeds … … 838 832 } 839 833 840 #841 # sendto --842 #843 itcl::body Rappture::VtkVolumeViewer::sendto { bytes } {844 SendBytes "$bytes\n"845 StartWaiting846 }847 848 #849 # SendCmd850 #851 # Send commands off to the rendering server. If we're currently852 # sending data objects to the server, buffer the commands to be853 # sent later.854 #855 itcl::body Rappture::VtkVolumeViewer::SendCmd {string} {856 if { $_buffering } {857 append _outbuf $string "\n"858 } else {859 SendBytes "$string\n"860 StartWaiting861 }862 }863 864 #865 # SendCmdNoWait866 #867 # Send commands off to the rendering server. If we're currently868 # sending data objects to the server, buffer the commands to be869 # sent later.870 #871 itcl::body Rappture::VtkVolumeViewer::SendCmdNoWait {string} {872 if { $_buffering } {873 append _outbuf $string "\n"874 } else {875 SendBytes "$string\n"876 }877 }878 879 834 # ---------------------------------------------------------------------- 880 835 # USAGE: ReceiveImage -bytes <size> -type <type> -token <token> … … 978 933 # be preempted by a server disconnect/reconnect (which automatically 979 934 # generates a new call to Rebuild). 980 set _buffering 1 935 StartBufferingCommands 936 981 937 set _legendPending 1 982 938 983 939 if { $_reset } { 984 if 1{940 if { $_reportClientInfo } { 985 941 # Tell the server the name of the tool, the version, and dataset 986 942 # that we are rendering. Have to do it here because we don't know … … 1040 996 set bytes [$dataobj vtkdata $comp] 1041 997 set length [string length $bytes] 1042 if 1 {998 if { $_reportClientInfo } { 1043 999 set info {} 1044 1000 lappend info "tool_id" [$dataobj hints toolId] … … 1136 1092 set _reset 0 1137 1093 } 1138 set _buffering 0; # Turn off buffering.1139 1140 1094 # Actually write the commands to the server socket. If it fails, we don't 1141 1095 # care. We're finished here. 1142 1096 blt::busy hold $itk_component(hull) 1143 sendto $_outbuf;1097 StopBufferingCommands 1144 1098 blt::busy release $itk_component(hull) 1145 set _outbuf ""; # Clear the buffer.1146 1099 } 1147 1100
Note: See TracChangeset
for help on using the changeset viewer.