[vtkusers] VTK File with Multiple Wariables ASCII to Binary Problem

Chris Hood Chris.Hood at noaa.gov
Mon Aug 18 12:55:35 EDT 2003


   I've created a VTK file with mutilple variables in ASCII format that my 
VTK program reads fine, but when I try to convert it to binary format to 
improve the speed, it only creates a file with the point locations and the 
first variable. How do I get all the variables in there? Is this a vtk bug 
that'll be fixed in a future version? I'll put a copy of the function I'm 
using below.
   I'm using vtk with java on xp.


    void BianryConversion(String filename) {
       vtkStructuredGridReader fileIn = new vtkStructuredGridReader();
       fileIn.SetFileName(filename);
     //vtkStructuredGrid data = fileIn.GetOutput();
       vtkStructuredGridWriter fileOut = new vtkStructuredGridWriter();
       fileOut.SetFileName(filename);
       fileOut.SetFileTypeToBinary();
       fileOut.SetInput(fileIn.GetOutput());
       fileOut.Write();
       }


____________________________________
Chris Hood
Graduate Student Research Assistant
University of Colorado, Boulder
Space Environment Center - NOAA 




More information about the vtkusers mailing list