# atob.tcl
# by Wolfram Volpi 4/23/99
# ASCII TO BINARY
# This program will convert ascii files to binary files.
# But first you should check four lines in this source code:
# 1) Is type for "reader" correct for the file you are converting?
# 2) Is the input file name correct (reader SetFileName "???.vtk")?
# 3) Is type for "binWriter" correct for the file you are converting to?
# 4) Is the outputfile name correct (binWriter SetFileName "???.vtk")?
catch {load vtktcl}
# create pipeline
# reader UG179
# writer UG180
vtkStructuredPointsReader reader
reader SetFileName "carotidAscii.vtk"
#vtkPolyDataWriter binWriter
vtkStructuredPointsWriter binWriter
binWriter SetInput [reader GetOutput]
binWriter SetFileName "carotid.vtk"
binWriter SetFileTypeToBinary
binWriter Write
# prevent the tk window from showing up then start the event loop
wm withdraw .