Changeset 2470 for trunk/gui/apps/vtkviewer-test
- Timestamp:
- Sep 4, 2011, 2:33:59 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/apps/vtkviewer-test
r2465 r2470 78 78 } { 79 79 set _data [lindex $args 0] 80 set _type [lindex $args 1] 80 81 } 81 82 … … 96 97 } 97 98 public method type {args} { 98 return ""99 return $_type 99 100 } 100 101 101 102 private variable _data "" 103 private variable _type "" 102 104 } 103 105 … … 118 120 close $fid 119 121 }] == 0} { 120 set obj [visData #auto $info] 122 set obj [visData #auto $info ""] 123 $widgets(vtkviewer) add $obj 124 } 125 } 126 127 # ---------------------------------------------------------------------- 128 # USAGE: send_streamlines_file 129 # 130 # Prompts the user for a text file, and then sends the text within 131 # that file along to the rendering widget. 132 # ---------------------------------------------------------------------- 133 proc send_streamlines_file {} { 134 global widgets 135 136 set file [tk_getOpenFile -title "Open VTK File as Streamlines"] 137 if {"" != $file && [catch { 138 set fid [open $file r] 139 fconfigure $fid -translation binary 140 set info [read $fid] 141 close $fid 142 }] == 0} { 143 set obj [visData #auto $info "streamlines"] 121 144 $widgets(vtkviewer) add $obj 122 145 } … … 319 342 menu .mbar.file 320 343 .mbar.file add command -label "Send VTK File..." -underline 0 -command send_file 344 .mbar.file add command -label "Send VTK File as Streamlines..." -underline 0 -command send_streamlines_file 321 345 .mbar.file add command -label "Load script..." -underline 0 -command load_script 322 346 .mbar.file add command -label "Reset" -underline 0 -command reset
Note: See TracChangeset
for help on using the changeset viewer.